libcryfs/cmake-utils/conan-setup.cmake

21 lines
791 B
CMake
Raw Normal View History

2020-02-24 09:51:48 +01:00
macro(setup_conan)
include(cmake-utils/conan.cmake)
2020-06-27 09:53:55 +02:00
if(MSVC)
conan_cmake_run(
CONANFILE conanfile.py
BUILD missing)
else()
conan_cmake_run(
CONANFILE conanfile.py
BUILD missing
SETTINGS compiler.libcxx=libstdc++11)
endif()
2020-02-24 09:51:48 +01:00
conan_basic_setup(TARGETS SKIP_STD)
if(CONAN_SETTINGS_COMPILER_LIBCXX STREQUAL "libstdc++")
# TODO Test this warning works correctly and that the proposed solution in the warning message works.
message(FATAL_ERROR "Conan is set up to build against libstdc++ (i.e. the legacy GCC ABI). We only support libstdc++11 (i.e. the new GCC ABI).\nPlease add the '-s compiler.libcxx=libstdc++11' argument when running 'conan install'.")
endif()
endmacro()