File: 0005-Try-to-find-atomics-only-after-setting-up-compiler-f.patch

package info (click to toggle)
td1.8.11 1.8.11~git20230202.3179d35%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,056 kB
  • sloc: cpp: 266,976; ansic: 4,457; javascript: 1,708; php: 1,474; java: 740; cs: 254; sh: 87; python: 87; makefile: 58
file content (31 lines) | stat: -rw-r--r-- 889 bytes parent folder | download | duplicates (2)
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.")