Better handling for static c linking.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-05-03 12:51:41 +02:00
parent 93983bdf5b
commit 6e12a55c92
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 12 additions and 7 deletions

View File

@ -18,7 +18,7 @@ steps:
CXX: clang++ CXX: clang++
commands: commands:
- conan remote add epsilon-public https://packages.p-epsilon.com/ - conan remote add epsilon-public https://packages.p-epsilon.com/
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-debug - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-debug -DSTATICC=ON
- cmake --build build-debug --target all -- -j 4 - cmake --build build-debug --target all -- -j 4
- build-debug/bin/pkmnLibTests -s --durations yes --use-colour yes - build-debug/bin/pkmnLibTests -s --durations yes --use-colour yes
- name: test-release-linux - name: test-release-linux
@ -31,7 +31,7 @@ steps:
CXX: clang++ CXX: clang++
commands: commands:
- conan remote add epsilon-public https://packages.p-epsilon.com/ - conan remote add epsilon-public https://packages.p-epsilon.com/
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-release - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-release -DSTATICC=ON
- cmake --build build-release --target all -- -j 4 - cmake --build build-release --target all -- -j 4
- build-release/bin/pkmnLibTests -s --durations yes --use-colour yes - build-release/bin/pkmnLibTests -s --durations yes --use-colour yes
- name: valgrind-release-linux - name: valgrind-release-linux

View File

@ -34,12 +34,17 @@ if (NOT EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
if (NOT MINOR MATCHES 0) if (NOT MINOR MATCHES 0)
SET(VERSION ${VERSION}.${MINOR}) SET(VERSION ${VERSION}.${MINOR})
endif () endif ()
set(CONAN_STATIC_C False)
if (STATICC)
set(CONAN_STATIC_C True)
endif (STATICC)
if (NOT WINDOWS) if (NOT WINDOWS)
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated
-s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -o *:staticC=True) -s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -o *:staticC=${STATICC})
else () else ()
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated
-s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -s os=Windows -o *:staticC=True) -s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -s os=Windows -o *:staticC=${STATICC})
endif () endif ()
endif () endif ()
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)