From 8617d4b7448638edcd77f9c4113b860daf693b0d Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 14 Nov 2024 15:36:12 -0500 Subject: [PATCH] Removed leftover setting of CMAKE_REQUIRED_FLAGS Back in 88d91f709c86fad6c0cc8b1f15706216cba81ffe I removed a `check_c_source_compiles` to detect some pthread stuff and converted to std::mutex instead. This stuff I believe I should have removed back then too. The -Werror caused a problem in VTK, which still has the `check_c_source_compiles`, because a totally unrelated warning made the try-compile fail when it should have passed. --- CMakeLists.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c9de0f644..0b724de8dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -289,14 +289,6 @@ if(Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) "${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}") endif() -include(CheckCSourceCompiles) -if(MSVC) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} /WX /W4") -else() - set(CMAKE_REQUIRED_LIBRARIES m) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall") -endif() - # Set a default build type for single-configuration cmake generators if # no build type is set. if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)