summaryrefslogtreecommitdiffstats
path: root/Modules/FindThreads.cmake
diff options
context:
space:
mode:
authorPavel Otchertsov <pavel.otchertsov@gmail.com>2020-09-18 20:24:56 (GMT)
committerPavel Otchertsov <pavel.otchertsov@gmail.com>2020-09-18 20:24:56 (GMT)
commit6ef64013baf8e43d025dc2a129b538bf875721f9 (patch)
tree47675ad7561c78751a5a849a261532a21fa5e8b5 /Modules/FindThreads.cmake
parentce89f54ee30038fea7abe7a25a2bfe5c14f08cce (diff)
downloadCMake-6ef64013baf8e43d025dc2a129b538bf875721f9.zip
CMake-6ef64013baf8e43d025dc2a129b538bf875721f9.tar.gz
CMake-6ef64013baf8e43d025dc2a129b538bf875721f9.tar.bz2
FindThreads: Add missing static keyword in pthread test code
When CMAKE_C_FLAGS contains '-Werror -Wmissing-prototypes' the pthread test code check fails with error: "src.c:3:7: error: no previous prototype for 'test_func' [-Werror=missing-prototypes]". Adding 'static' keyword to 'test_func' fixes it.
Diffstat (limited to 'Modules/FindThreads.cmake')
-rw-r--r--Modules/FindThreads.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index ee49867..e3e6591 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -66,7 +66,7 @@ endif()
set(PTHREAD_C_CXX_TEST_SOURCE [====[
#include <pthread.h>
-void* test_func(void* data)
+static void* test_func(void* data)
{
return data;
}