1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From 3967634933937fa41b8ea96609efab1fc39a8eb6 Mon Sep 17 00:00:00 2001
From: levlam <levlam@telegram.org>
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.
Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -132,14 +132,14 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif()
+include(TdSetUpCompiler)
+td_set_up_compiler()
+
find_package(Atomics REQUIRED)
if (ATOMICS_LIBRARIES)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ATOMICS_LIBRARIES}")
endif()
-include(TdSetUpCompiler)
-td_set_up_compiler()
-
if (MSVC)
option(TD_ENABLE_MULTI_PROCESSOR_COMPILATION "Use \"ON\" to enable multi-processor compilation.")
|