diff --git a/CMakeLists.txt b/CMakeLists.txt index 26df32f..d68071c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,11 +29,16 @@ if (CMAKE_TOOLCHAIN_FILE AND VCPKG_MANIFEST_FEATURES) set(OMATH_IMGUI_INTEGRATION ON) elseif (omath_feature STREQUAL "avx2") set(OMATH_USE_AVX2 ${COMPILER_SUPPORTS_AVX2}) - else() + elseif (omath_feature STREQUAL "tests") + set(OMATH_BUILD_TESTS ON) + elseif (omath_feature STREQUAL "benchmark") + set(OMATH_BUILD_BENCHMARK ON) + else () message(WARNING "[${PROJECT_NAME}]: UNKNOWN VCPKG LIBRARY FEATURE CALLED \"${omath_feature}\" ") endif () endforeach () endif () + if (OMATH_USE_AVX2 AND NOT COMPILER_SUPPORTS_AVX2) message(WARNING "OMATH_USE_AVX2 requested, but compiler/target does not support AVX2. Disabling.") set(OMATH_USE_AVX2 OFF CACHE BOOL "Omath will use AVX2 to boost performance" FORCE) diff --git a/vcpkg.json b/vcpkg.json index 0a8c9c1..1fd4afc 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -14,7 +14,6 @@ "name": "vcpkg-cmake-config", "host": true } - ], "features": { "avx2": { @@ -26,6 +25,18 @@ "dependencies": [ "imgui" ] + }, + "tests": { + "description": "Build unit-tests using GTest", + "dependencies": [ + "gtest" + ] + }, + "benchmark": { + "description": "Build benchmarks", + "dependencies": [ + "benchmark" + ] } } } \ No newline at end of file