From 41f49b8991342289fd1cd8e016d758c6ca93f828 Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Tue, 2 Mar 2021 20:17:38 +0100 Subject: [PATCH] prevent cxxopts from adding tests. fixes #90. --- standalone/CMakeLists.txt | 2 ++ test/CMakeLists.txt | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/standalone/CMakeLists.txt b/standalone/CMakeLists.txt index a8248f1..981646f 100644 --- a/standalone/CMakeLists.txt +++ b/standalone/CMakeLists.txt @@ -10,7 +10,9 @@ include(../cmake/tools.cmake) include(../cmake/CPM.cmake) +set(CXXOPTS_BUILD_TESTS NO) CPMAddPackage("gh:jarro2783/cxxopts@2.2.0") + CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) # ---- Create standalone executable ---- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4390d09..68e6cf0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,6 +16,7 @@ include(../cmake/tools.cmake) include(../cmake/CPM.cmake) CPMAddPackage("gh:onqtam/doctest#2.4.5") +CPMAddPackage("gh:TheLartians/Format.cmake@1.7.0") if(TEST_INSTALLED_VERSION) find_package(Greeter REQUIRED) @@ -23,8 +24,6 @@ else() CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) endif() -CPMAddPackage("gh:TheLartians/Format.cmake@1.7.0") - # ---- Create binary ---- file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)