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
1 changed files with 3 additions and 3 deletions

View File

@ -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.")