diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2015-09-22 15:50:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-25 14:08:35 (GMT) |
commit | fff9434d455600320be1809c6d64577eeb21d6aa (patch) | |
tree | 4361b549a5831e97aed0b01a7298056cc8410210 /Tests/FindThreads/CXX-only/CMakeLists.txt | |
parent | 66db914adfd8cbb846fcf82e290fe006a800a36d (diff) | |
download | CMake-fff9434d455600320be1809c6d64577eeb21d6aa.zip CMake-fff9434d455600320be1809c6d64577eeb21d6aa.tar.gz CMake-fff9434d455600320be1809c6d64577eeb21d6aa.tar.bz2 |
FindThreads: officially announce it works with only C++ enabled
Diffstat (limited to 'Tests/FindThreads/CXX-only/CMakeLists.txt')
-rw-r--r-- | Tests/FindThreads/CXX-only/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/FindThreads/CXX-only/CMakeLists.txt b/Tests/FindThreads/CXX-only/CMakeLists.txt new file mode 100644 index 0000000..9993123 --- /dev/null +++ b/Tests/FindThreads/CXX-only/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(FindThreads_CXX-only CXX) + +set(CMAKE_THREAD_PREFER_PTHREAD On) +find_package(Threads REQUIRED) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/CheckForPthreads.c + ${CMAKE_CURRENT_BINARY_DIR}/CheckForPthreads.cxx) + +if (NOT WIN32) + add_executable(thr ${CMAKE_CURRENT_BINARY_DIR}/CheckForPthreads.cxx) + target_link_libraries(thr Threads::Threads) +endif () |