Change cmake option TESTS --> CREATURELIB_TESTS
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

This commit is contained in:
Deukhoofd 2022-02-05 15:52:03 +01:00
parent 712be48e06
commit 2a8126e151
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ steps:
CC: /usr/bin/clang CC: /usr/bin/clang
CXX: /usr/bin/clang++ CXX: /usr/bin/clang++
commands: commands:
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-debug -DSTATICC=ON -DTESTS=ON - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-debug -DSTATICC=ON -DCREATURELIB_TESTS=ON
- cmake --build build-debug --target all -- -j 4 - cmake --build build-debug --target all -- -j 4
- build-debug/CreatureLibTests -s --duration=true --force-colors=true - build-debug/CreatureLibTests -s --duration=true --force-colors=true
- name: test-release-linux - name: test-release-linux
@ -24,14 +24,14 @@ steps:
CC: /usr/bin/clang CC: /usr/bin/clang
CXX: /usr/bin/clang++ CXX: /usr/bin/clang++
commands: commands:
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-release -DSTATICC=ON -DTESTS=ON - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-release -DSTATICC=ON -DCREATURELIB_TESTS=ON
- cmake --build build-release --target all -- -j 4 - cmake --build build-release --target all -- -j 4
- build-release/CreatureLibTests -s --duration=true --force-colors=true - build-release/CreatureLibTests -s --duration=true --force-colors=true
- valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no --error-exitcode=1 build-release/CreatureLibTests ~\[Exception\] - valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no --error-exitcode=1 build-release/CreatureLibTests ~\[Exception\]
- name: test-release-windows - name: test-release-windows
image: deukhoofd/windowsbuilder image: deukhoofd/windowsbuilder
commands: commands:
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc -D CMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DWINDOWS=ON -DSTATICC=ON -DTESTS=ON - cmake -GNinja -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc -D CMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DWINDOWS=ON -DSTATICC=ON -DCREATURELIB_TESTS=ON
- cmake --build build-release-windows --target all -- -j 4 - cmake --build build-release-windows --target all -- -j 4
- export WINEARCH=win64 - export WINEARCH=win64
- wine build-release-windows/CreatureLibTests.exe -s --duration=true --force-colors=true - wine build-release-windows/CreatureLibTests.exe -s --duration=true --force-colors=true
@ -54,6 +54,6 @@ steps:
- ( cat Doxyfile ; echo "OUTPUT_DIRECTORY=/docs"; echo "GENERATE_TAGFILE=/docs/html/CreatureLib.tag" ) | doxygen - - ( cat Doxyfile ; echo "OUTPUT_DIRECTORY=/docs"; echo "GENERATE_TAGFILE=/docs/html/CreatureLib.tag" ) | doxygen -
--- ---
kind: signature kind: signature
hmac: 3a5498fe78603829e724df143abff88da2f5118bb4ae48d639171fc1ac8eb87c hmac: 898d10cca3267eb3643779b10100aeccef4f5066b7895fdb8758448641ff4705
... ...

View File

@ -11,7 +11,7 @@ set(CMAKE_CXX_STANDARD 20)
option(WINDOWS "Whether the build target is Windows or not." OFF) option(WINDOWS "Whether the build target is Windows or not." OFF)
option(SHARED "Whether we should build a shared library, instead of a static one." OFF) option(SHARED "Whether we should build a shared library, instead of a static one." OFF)
option(TESTS "Whether the test executable should be build as well." OFF) option(CREATURELIB_TESTS "Whether the test executable should be build as well." OFF)
option(STATICC "Whether gcc and stdc++ should be linked statically to the library." OFF) option(STATICC "Whether gcc and stdc++ should be linked statically to the library." OFF)
set(LEVEL_SIZE "8" CACHE STRING "Number of bits to store the level as. Currently reserved, and can only be 8") set(LEVEL_SIZE "8" CACHE STRING "Number of bits to store the level as. Currently reserved, and can only be 8")
@ -108,7 +108,7 @@ endif ()
# And link the libraries together # And link the libraries together
target_link_libraries(CreatureLib PUBLIC ${_LIBRARYLINKS} Threads::Threads) target_link_libraries(CreatureLib PUBLIC ${_LIBRARYLINKS} Threads::Threads)
if (TESTS) if (CREATURELIB_TESTS)
CPMAddPackage( CPMAddPackage(
NAME doctest NAME doctest
GITHUB_REPOSITORY doctest/doctest GITHUB_REPOSITORY doctest/doctest