don't check for omp.h if the compiler identifies as Clang since the CMake check seems broken
This commit is contained in:
@ -32,7 +32,13 @@ function(check_omp_h_include)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${OpenMP_CXX_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LINK_OPTIONS ${OpenMP_CXX_FLAGS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${OpenMP_CXX_LIBRARIES})
|
||||
check_include_file_cxx(omp.h _have_omp_h)
|
||||
# there are all kinds of problems with finding omp.h
|
||||
# for Clang and derived compilers so we pretend it is there.
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(_have_omp_h TRUE)
|
||||
else()
|
||||
check_include_file_cxx(omp.h _have_omp_h)
|
||||
endif()
|
||||
else()
|
||||
set(_have_omp_h FALSE)
|
||||
endif()
|
||||
|
||||
@ -22,7 +22,13 @@ function(check_omp_h_include)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${OpenMP_CXX_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LINK_OPTIONS ${OpenMP_CXX_FLAGS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${OpenMP_CXX_LIBRARIES})
|
||||
check_include_file_cxx(omp.h _have_omp_h)
|
||||
# there are all kinds of problems with finding omp.h
|
||||
# for Clang and derived compilers so we pretend it is there.
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(_have_omp_h TRUE)
|
||||
else()
|
||||
check_include_file_cxx(omp.h _have_omp_h)
|
||||
endif()
|
||||
else()
|
||||
set(_have_omp_h FALSE)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user