Added -pthread by default if threads are found. USE_PTHREAD is ON and can be turned OFF

to disable this feature.
This commit is contained in:
Robert Kloefkorn
2016-04-15 14:04:14 +02:00
parent 03e833db1b
commit bead5d2e99
3 changed files with 58 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ endif (CMAKE_VERSION VERSION_LESS "2.8.3")
if (CMAKE_VERSION VERSION_LESS "2.8.5")
message (STATUS "Enabling compatibility modules for CMake 2.8.5")
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.5")
endif (CMAKE_VERSION VERSION_LESS "2.8.5")
endif (CMAKE_VERSION VERSION_LESS "2.8.5")
if (CMAKE_VERSION VERSION_LESS "2.8.7")
message (STATUS "Enabling compatibility modules for CMake 2.8.7")
@@ -93,6 +93,8 @@ endif (NOT USE_MPI)
# parallel programming
include (UseOpenMP)
find_openmp (${project})
include (UseThreads)
find_threads (${project})
# callback hook to setup additional dependencies
if (COMMAND prereqs_hook)