Changes to how CMake gets compiler version to pass onto Conan.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
94c03cfaed
commit
d935b14548
|
@ -23,12 +23,16 @@ message(STATUS "Using:
|
||||||
|
|
||||||
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.")
|
||||||
string(REPLACE "." ";" VERSION_LIST "${CMAKE_CXX_COMPILER_VERSION}")
|
string(REPLACE "." ";" VERSION_LIST "${CMAKE_C_COMPILER_VERSION}")
|
||||||
list(GET VERSION_LIST 0 MAJOR)
|
list(GET VERSION_LIST 0 VERSION)
|
||||||
|
list(GET VERSION_LIST 1 MINOR)
|
||||||
|
if (NOT MINOR MATCHES 0)
|
||||||
|
SET(VERSION ${VERSION}.{MINOR})
|
||||||
|
endif()
|
||||||
if (NOT WINDOWS)
|
if (NOT WINDOWS)
|
||||||
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})
|
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=${VERSION})
|
||||||
else()
|
else()
|
||||||
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build missing -s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${MAJOR})
|
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build missing -s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION})
|
||||||
endif()
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||||
|
|
Loading…
Reference in New Issue