Explicit library flags for vendor library builds.

This commit is contained in:
casey langen 2022-12-03 16:19:01 -08:00
parent 90a92c80bd
commit 3685145f1d
2 changed files with 4 additions and 4 deletions

View File

@ -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 <atomic>
std::atomic<int> 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 <atomic>
#include <cstdint>

View File

@ -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