Added support for OpenMP in Coloquinte

This commit is contained in:
Gabriel Gouvine 2015-04-23 18:02:00 +02:00
parent bded70971e
commit 4b628baa17
2 changed files with 14 additions and 2 deletions

View File

@ -19,7 +19,11 @@
find_package(Libexecinfo REQUIRED)
if(WITH_OPENMP)
add_definitions( -fopenmp )
find_package(OpenMP REQUIRED)
add_definitions(${OpenMP_CXX_FLAGS})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
add_subdirectory(src)

View File

@ -33,7 +33,15 @@
find_package(KITE REQUIRED)
#find_package(EQUINOX REQUIRED)
#find_package(SOLSTICE REQUIRED)
if(WITH_OPENMP)
find_package(OpenMP REQUIRED)
add_definitions(${OpenMP_CXX_FLAGS})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
endif(WITH_OPENMP)
add_subdirectory(src)
add_subdirectory(python)
add_subdirectory(cmake_modules)