Skip to content
Snippets Groups Projects
Commit 25e0fa81 authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Switch to generic pthread detection macro.

parent f62d3d66
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ...@@ -17,6 +17,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
INCLUDE(cmake/base.cmake) INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake) INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/pthread.cmake)
SET(PROJECT_NAME dynamic-graph) SET(PROJECT_NAME dynamic-graph)
SET(PROJECT_VERSION 1.0.0.99) SET(PROJECT_VERSION 1.0.0.99)
...@@ -44,26 +45,11 @@ SET(PKG_CONFIG_EXTRA ...@@ -44,26 +45,11 @@ SET(PKG_CONFIG_EXTRA
plugindir=${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}") plugindir=${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}")
# Add dependency toward dynamic graph library in pkg-config file. # Add dependency toward dynamic graph library in pkg-config file.
SET(PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} ${LIBINCL_KW}dynamic-graph${LIB_EXT}") PKG_CONFIG_APPEND_LIBS("dynamic-graph")
# Search for Boost. # Search for Boost.
SEARCH_FOR_BOOST() SEARCH_FOR_BOOST()
SEARCH_FOR_PTHREAD()
# Search for Pthread.
INCLUDE(FindThreads)
IF(UNIX)
IF(CMAKE_USE_PTHREADS_INIT)
ADD_DEFINITIONS(-pthread)
ELSE(CMAKE_USE_PTHREADS_INIT)
MESSAGE(FATAL_ERROR
"Pthread is required on Unix, but "
${CMAKE_THREAD_LIBS_INIT} " has been detected.")
ENDIF(CMAKE_USE_PTHREADS_INIT)
ELSEIF(WIN32)
# Nothing to do.
ELSE(UNIX)
MESSAGE(FATAL_ERROR "Thread support for this platform is not implemented.")
ENDIF(UNIX)
# Remove additional warnings. # Remove additional warnings.
IF(WIN32) IF(WIN32)
......
Subproject commit 027d20357f83e69338bca882e9e8b73e89385139 Subproject commit 30f815f6d9e4d3486eca42c2445e20bc2e116a67
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment