Automatically get proper compiler version.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2019-12-31 14:42:14 +01:00
parent eb80f5284b
commit e9f43709c1
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@ message(STATUS "Using ${CMAKE_CXX_COMPILER}")
if (NOT EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) if (NOT EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
message(WARNING "The file conanbuildinfo.cmake doesn't exist, running conan install.") message(WARNING "The file conanbuildinfo.cmake doesn't exist, running conan install.")
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build missing -s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=8) string(REPLACE "." ";" VERSION_LIST "${CMAKE_CXX_COMPILER_VERSION}")
list(GET VERSION_LIST 0 MAJOR)
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build missing -s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=${MAJOR})
endif () endif ()
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup() conan_basic_setup()