diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-01-01 09:40:08 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-01-01 09:41:07 +0100 |
commit | 1f6ee990275f412d4cc84483051fd549710da634 (patch) | |
tree | 9d41c91a67390d05329c590876da8656e4c0c4d8 /tests/src/confTest | |
parent | 281ca4edaaa40d1cbffcde1e6f593133653397b8 (diff) |
Add config parsing for cmake
cmake has not integrated yet, but it will parse...
Add test script to easily run tests
Diffstat (limited to 'tests/src/confTest')
-rw-r--r-- | tests/src/confTest/confTest.cpp | 11 | ||||
-rw-r--r-- | tests/src/confTest/validProject.conf | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/src/confTest/confTest.cpp b/tests/src/confTest/confTest.cpp index 17b5995..e508e84 100644 --- a/tests/src/confTest/confTest.cpp +++ b/tests/src/confTest/confTest.cpp @@ -27,6 +27,17 @@ TEST_CASE("parse config") const auto &catch2Dependency = sibsConfig.getDependencies()[1]; REQUIRE(catch2Dependency.name == "catch2"); REQUIRE(catch2Dependency.version == "1.0.0"); + + REQUIRE(sibsConfig.shouldUseCmake()); + + REQUIRE(sibsConfig.getCmakeDir() == TINYDIR_STRING("tests/src/confTest/cmakeGlobal")); + REQUIRE(sibsConfig.getCmakeArgs() == "\"-DCMAKE_BUILD_TYPE=Debug\" \"-DENTITYX_RUN_BENCHMARKS=0\""); + + REQUIRE(sibsConfig.getCmakeDirStatic() == TINYDIR_STRING("tests/src/confTest/cmakeStatic")); + REQUIRE(sibsConfig.getCmakeArgsStatic() == "\"-DCMAKE_BUILD_TYPE=Debug\" \"-DENTITYX_RUN_BENCHMARKS=0\" \"-DENTITYX_BUILD_TESTING=0\""); + + REQUIRE(sibsConfig.getCmakeDirDynamic() == TINYDIR_STRING("tests/src/confTest/cmakeDynamic")); + REQUIRE(sibsConfig.getCmakeArgsDynamic() == "\"-DCMAKE_BUILD_TYPE=Debug\" \"-DENTITYX_RUN_BENCHMARKS=0\" \"-DENTITYX_BUILD_TESTING=0\" \"-DENTITYX_BUILD_SHARED=1\""); } TEST_CASE("parse config - invalid object") diff --git a/tests/src/confTest/validProject.conf b/tests/src/confTest/validProject.conf index de5112d..eab258b 100644 --- a/tests/src/confTest/validProject.conf +++ b/tests/src/confTest/validProject.conf @@ -7,3 +7,15 @@ platforms = ["linux64", "win64"] [dependencies] xxhash = "0.1.0" catch2 = "1.0.0" + +[cmake] +dir = "cmakeGlobal" +args = ["ENTITYX_RUN_BENCHMARKS=0"] + +[cmake.static] +dir = "cmakeStatic" +args = ["ENTITYX_BUILD_TESTING=0"] + +[cmake.dynamic] +dir = "cmakeDynamic" +args = ["ENTITYX_BUILD_TESTING=0", "ENTITYX_BUILD_SHARED=1"] |