Better fix for conan libstdc++11 setup
This commit is contained in:
parent
247ef47f94
commit
12293c0b9e
@ -6,14 +6,20 @@ macro(setup_conan)
|
|||||||
CONANFILE conanfile.py
|
CONANFILE conanfile.py
|
||||||
BUILD missing)
|
BUILD missing)
|
||||||
else()
|
else()
|
||||||
|
# We're using set(_GLIBCXX_USE_CXX11_ABI 1), because conan_cmake_run looks at that variable
|
||||||
|
# to set conan to libstdc++11 instead of libstdc++. This would also work by passing in
|
||||||
|
# a "SETTINGS compiler.libcxx=libstdc++11" to conan_cmake_run, but for some reason the logs
|
||||||
|
# then show that conan ran with both "-s compiler.libcxx=libstdc++ -s compiler.libcxx=libstdc++11"
|
||||||
|
# which seems wrong. Using the set() approach instead, that command line only has the correct
|
||||||
|
# "-s compiler.libcxx=libstdc++11".
|
||||||
|
# See https://github.com/conan-io/cmake-conan/issues/255
|
||||||
|
# We're using set() instead of add_definitions() because of https://github.com/conan-io/cmake-conan/issues/256
|
||||||
|
set(_GLIBCXX_USE_CXX11_ABI 1)
|
||||||
conan_cmake_run(
|
conan_cmake_run(
|
||||||
CONANFILE conanfile.py
|
CONANFILE conanfile.py
|
||||||
# We'd like to use "BUILD missing" but that doesn't work because conan sometimes seems to download prebuilt packages with compiler.libcxx=libstdc++ even though we specify compiler.libcxx=libstdc++11.
|
# We'd like to use "BUILD missing" but that doesn't work because conan sometimes seems to download prebuilt packages with compiler.libcxx=libstdc++ even though we specify compiler.libcxx=libstdc++11.
|
||||||
# see https://github.com/cryfs/cryfs/issues/336 and https://github.com/conan-io/conan/issues/7264
|
# see https://github.com/cryfs/cryfs/issues/336 and https://github.com/conan-io/conan/issues/7264
|
||||||
BUILD all
|
BUILD all)
|
||||||
# Note: This way of passing compiler.libcxx seems to work, but there's an issue. See https://github.com/conan-io/cmake-conan/issues/255
|
|
||||||
# see also as a related issue: https://github.com/conan-io/cmake-conan/issues/256
|
|
||||||
SETTINGS compiler.libcxx=libstdc++11)
|
|
||||||
endif()
|
endif()
|
||||||
conan_basic_setup(TARGETS SKIP_STD)
|
conan_basic_setup(TARGETS SKIP_STD)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user