Skip to content
Extraits de code Groupes Projets
Vérifiée Valider cd2daa69 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

FIX: Try more ways to test for OpenMP and rectify the test program compilation

parent e5f2b87c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!189Resolve "Dépendance manquante OpenMP"
......@@ -17,6 +17,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
set(CMAKE_COLOR_MAKEFILE ON)
include(TestBigEndian) # Needed for endianness tests
include(FindOpenMP) # Test OpenMP support
include(GNUInstallDirs) # Needed for installation things
set(${CMAKE_C_COMPILER_ID}_C_FLAGS)
......@@ -233,15 +234,21 @@ set(SQL_SOURCE_FILES
### ###
try_compile(OPENMP_SUPPORT_OK
${CMAKE_BINARY_DIR/___openmp_test_ok
${CMAKE_BINARY_DIR}/___openmp_test_ok
${CMAKE_CURRENT_SOURCE_DIR}/utils/cmake/TestOpenMP.c}
LINK_LIBRARIES -fopenmp
)
if(OPENMP_SUPPORT_OK)
message(STATUS "Compiler has OpenMP support")
message(STATUS "Compiler has OpenMP support (test program compiles)")
else()
message(FATAL_ERROR "Compiler doesn't have OpenMP support")
message(FATAL_ERROR "Compiler doesn't have OpenMP support (test program doesn't compile)")
endif()
if(OpenMP_FOUND)
message(STATUS "OpenMP found by CMake for C and C++")
else()
message(FATAL_ERROR "OpenMP not found by CMake for C and C++")
endif()
### ###
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter