Skip to content

Commit

Permalink
Try to find atomics only after setting up compiler flags, because the…
Browse files Browse the repository at this point in the history
… test will never work without C++11.
  • Loading branch information
levlam committed Feb 21, 2024
1 parent fe749cf commit 3967634
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit 3967634

Please sign in to comment.