From 3685145f1d9c467d013279d2e395edcf6dc7d7bd Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 3 Dec 2022 16:19:01 -0800 Subject: [PATCH] Explicit library flags for vendor library builds. --- .cmake/CheckAtomic.cmake | 4 ++-- script/build-vendor-libraries.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cmake/CheckAtomic.cmake b/.cmake/CheckAtomic.cmake index 0cc051c3c..2a2e20b94 100644 --- a/.cmake/CheckAtomic.cmake +++ b/.cmake/CheckAtomic.cmake @@ -8,7 +8,7 @@ INCLUDE(CheckLibraryExists) function(check_working_cxx_atomics varname) set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11") + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++17") CHECK_CXX_SOURCE_COMPILES(" #include std::atomic x; @@ -21,7 +21,7 @@ endfunction(check_working_cxx_atomics) function(check_working_cxx_atomics64 varname) set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}") + set(CMAKE_REQUIRED_FLAGS "-std=c++17 ${CMAKE_REQUIRED_FLAGS}") CHECK_CXX_SOURCE_COMPILES(" #include #include diff --git a/script/build-vendor-libraries.sh b/script/build-vendor-libraries.sh index e050990fe..b21858839 100755 --- a/script/build-vendor-libraries.sh +++ b/script/build-vendor-libraries.sh @@ -20,7 +20,7 @@ # export CFLAGS="-fPIC" -export CXXFLAGS="-fPIC" +export CXXFLAGS="-fPIC -std=c++17" RPATH="@rpath" @@ -106,7 +106,7 @@ function fetch_packages() { # function build_boost() { - BOOST_CXX_FLAGS="-fPIC" + BOOST_CXX_FLAGS="-fPIC -std=c++17" if [[ $OS == "Darwin" ]]; then BOOST_CXX_FLAGS="-fPIC -std=c++17 -stdlib=libc++" fi