From b4d492f2af6e12a9f77dac209b6cdb0866097557 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 5 Feb 2022 16:01:19 +0100 Subject: [PATCH] Change cmake option TESTS --> PKMNLIB_TESTS --- .drone.yml | 8 ++++---- CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index dd9c5a4..8d506ce 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ steps: CC: clang CXX: clang++ commands: - - cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-debug -DSTATICC=ON -DTESTS=ON -DSHARED=ON + - cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-debug -DSTATICC=ON -DPKMNLIB_TESTS=ON -DSHARED=ON - cmake --build build-debug --target all -- -j 4 - build-debug/pkmnLibTests -s --duration=true --force-colors=true - name: test-release-linux @@ -23,7 +23,7 @@ steps: CC: clang CXX: clang++ commands: - - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-release -DSTATICC=ON -DTESTS=ON -DSHARED=ON + - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ . -B build-release -DSTATICC=ON -DPKMNLIB_TESTS=ON -DSHARED=ON - cmake --build build-release --target all -- -j 4 - build-release/pkmnLibTests -s --duration=true --force-colors=true - name: valgrind-release-linux @@ -50,13 +50,13 @@ steps: STRIP: x86_64-w64-mingw32-strip RC: x86_64-w64-mingw32-windres 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 -DSHARED=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 -DPKMNLIB_TESTS=ON -DSHARED=ON - cmake --build build-release-windows --target all -- -j 4 - find . -name '*.dll*' -exec cp {} . \; - export WINEARCH=win64 - wine64 build-release-windows/pkmnLibTests.exe -s --duration=true --force-colors=true --- kind: signature -hmac: b3b11a98050648beb846956c73c1fccb44395297c7bac25c7f26106d0af5b46f +hmac: 80877c7755787d96552c1966c9591d153cc5957d7a34d620e0b4163e6dddb8c0 ... diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b1288e..62840ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) 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." ON) -option(TESTS "Whether the test executable should be build as well." OFF) +option(PKMNLIB_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) set(SCRIPT_PROVIDER "angelscript" CACHE STRING "Which script provider to use.") set(LEVEL_SIZE "8" CACHE STRING "Number of bits to store the level as. Can be 8") @@ -205,7 +205,7 @@ endif () target_link_libraries(pkmnLib PRIVATE ${_LINKS}) -if (TESTS) +if (PKMNLIB_TESTS) # Create Test executable file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp") add_executable(pkmnLibTests ${TEST_FILES} extern/doctest.hpp)