FindThreads: search test source relative to module

This is a simpler way to reference the location of FindThreads.cmake.
This commit is contained in:
Timo Rothenpieler 2014-10-02 21:47:36 +02:00 committed by Rolf Eike Beer
parent 99d34f46fa
commit cbd5db6485
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ else()
message(STATUS "Check if compiler accepts -pthread")
try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckForPthreads.c
${CMAKE_CURRENT_LIST_DIR}/CheckForPthreads.c
CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread
COMPILE_OUTPUT_VARIABLE OUTPUT)