mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 16:30:26 +08:00
26 lines
872 B
Diff
26 lines
872 B
Diff
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
index 92592ec..8bfcd60 100644
|
||
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -644,7 +644,9 @@ if (NOT Windows)
|
||
|
}
|
||
|
]=])
|
||
|
string(REPLACE "std::atomic<int>" "std::atomic<std::int64_t>" ATOMICS64_TEST_SOURCE "${ATOMICS_TEST_SOURCE}")
|
||
|
-
|
||
|
+ if(APPLE)
|
||
|
+ set(CMAKE_REQUIRED_FLAGS "-std=c++11")
|
||
|
+ endif()
|
||
|
check_cxx_source_compiles("${ATOMICS_TEST_SOURCE}" HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||
|
check_cxx_source_compiles("${ATOMICS64_TEST_SOURCE}" HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||
|
if((NOT HAVE_CXX_ATOMICS_WITHOUT_LIB) OR (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB))
|
||
|
@@ -659,6 +661,9 @@ if (NOT Windows)
|
||
|
target_link_libraries(torrent-rasterbar PUBLIC atomic)
|
||
|
endif()
|
||
|
endif()
|
||
|
+ if(APPLE)
|
||
|
+ unset(CMAKE_REQUIRED_FLAGS)
|
||
|
+ endif()
|
||
|
endif()
|
||
|
|
||
|
feature_option(build_tests "build tests" OFF)
|