<commit_before>#/*============================================================================
#
#  MYPROJECT: A software package for whatever.
#
#  Copyright (c) University College London (UCL). All rights reserved.
#
#  This software is distributed WITHOUT ANY WARRANTY; without even
#  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
#  PURPOSE.
#
#  See LICENSE.txt in the top level directory for details.
#
#============================================================================*/

if(MYPROJECT_USE_OPENMP)
  # Borrowed from PCL-1.8, and modified
  find_package(OpenMP)
  if(OpenMP_FOUND)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
    if(MSVC)
      if(MSVC_VERSION EQUAL 1500)
        set(OPENMP_DLL VCOMP90)
      elseif(MSVC_VERSION EQUAL 1600)
        set(OPENMP_DLL VCOMP100)
      elseif(MSVC_VERSION EQUAL 1700)
        set(OPENMP_DLL VCOMP110)
      elseif(MSVC_VERSION EQUAL 1800)
        set(OPENMP_DLL VCOMP120)
      elseif(MSVC_VERSION EQUAL 1900)
        set(OPENMP_DLL VCOMP140)
      elseif(MSVC_VERSION EQUAL 1910)
        set(OPENMP_DLL VCOMP140)
      endif()
      if(OPENMP_DLL)
        set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll")
        set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll")
      else(OPENMP_DLL)
        message(WARNING "Delay loading flag for OpenMP DLL is invalid.")
      endif(OPENMP_DLL)
    endif(MSVC)
  endif()
endif()<commit_msg>Issue #56: Fix finding of OpenMP to use var OPENMP_FOUND.<commit_after>#/*============================================================================
#
#  MYPROJECT: A software package for whatever.
#
#  Copyright (c) University College London (UCL). All rights reserved.
#
#  This software is distributed WITHOUT ANY WARRANTY; without even
#  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
#  PURPOSE.
#
#  See LICENSE.txt in the top level directory for details.
#
#============================================================================*/

if(MYPROJECT_USE_OPENMP)
  # Borrowed from PCL-1.8, and modified
  find_package(OpenMP)

  # Note: Convention would say that for `find_package(OpenMP)`, the variable should be OpenMP_FOUND.
  # Also: The top of the /usr/local/share/cmake/Modules/FindOpenMP.cmake says it should be OpenMP_FOUND.
  # But : Both PCL and OpenCV use OPENMP_FOUND, then I checked FindOpenMP.cmake and its OPENMP_FOUND.

  if(OPENMP_FOUND)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
    list(APPEND ALL_THIRD_PARTY_LIBRARIES ${OpenMP_CXX_LIBRARIES})
    message("OpenMP found, CMAKE_CXX_FLAGS=${OpenMP_CXX_FLAGS}")
    message("OpenMP found, OpenMP_CXX_LIBRARIES=${OpenMP_CXX_LIBRARIES}")
    if(MSVC)
      if(MSVC_VERSION EQUAL 1500)
        set(OPENMP_DLL VCOMP90)
      elseif(MSVC_VERSION EQUAL 1600)
        set(OPENMP_DLL VCOMP100)
      elseif(MSVC_VERSION EQUAL 1700)
        set(OPENMP_DLL VCOMP110)
      elseif(MSVC_VERSION EQUAL 1800)
        set(OPENMP_DLL VCOMP120)
      elseif(MSVC_VERSION EQUAL 1900)
        set(OPENMP_DLL VCOMP140)
      elseif(MSVC_VERSION EQUAL 1910)
        set(OPENMP_DLL VCOMP140)
      endif()
      if(OPENMP_DLL)
        set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll")
        set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll")
      else(OPENMP_DLL)
        message(WARNING "Delay loading flag for OpenMP DLL is invalid.")
      endif(OPENMP_DLL)
    endif(MSVC)
  endif()
endif()
{'fraction_non_alphanumeric': 0.1640169581346052, 'fraction_numerical': 0.023317435082140965, 'mean_word_length': 4.4238505747126435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4908761', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1231, 'n_words': 278}