Try to find atomics only after setting up compiler flags, because the test will never work without C++11.

This commit is contained in:
levlam 2024-02-21 16:31:12 +03:00
parent fe749cfb9b
commit 3967634933

View File

@ -129,14 +129,14 @@ if (THREADS_HAVE_PTHREAD_ARG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif() endif()
include(TdSetUpCompiler)
td_set_up_compiler()
find_package(Atomics REQUIRED) find_package(Atomics REQUIRED)
if (ATOMICS_LIBRARY_FLAGS) if (ATOMICS_LIBRARY_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ATOMICS_LIBRARY_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ATOMICS_LIBRARY_FLAGS}")
endif() endif()
include(TdSetUpCompiler)
td_set_up_compiler()
if (MSVC) if (MSVC)
option(TD_ENABLE_MULTI_PROCESSOR_COMPILATION "Use \"ON\" to enable multi-processor compilation.") option(TD_ENABLE_MULTI_PROCESSOR_COMPILATION "Use \"ON\" to enable multi-processor compilation.")