From 3967634933937fa41b8ea96609efab1fc39a8eb6 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 21 Feb 2024 16:31:12 +0300 Subject: [PATCH] Try to find atomics only after setting up compiler flags, because the test will never work without C++11. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51cd1c7ea..e386de4e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,14 +129,14 @@ if (THREADS_HAVE_PTHREAD_ARG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") endif() +include(TdSetUpCompiler) +td_set_up_compiler() + find_package(Atomics REQUIRED) if (ATOMICS_LIBRARY_FLAGS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ATOMICS_LIBRARY_FLAGS}") endif() -include(TdSetUpCompiler) -td_set_up_compiler() - if (MSVC) option(TD_ENABLE_MULTI_PROCESSOR_COMPILATION "Use \"ON\" to enable multi-processor compilation.")