From a2d7181700ac64b8e7a4472ec26dfa253b38f188 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sat, 28 Jun 2025 19:25:55 +0100 Subject: split nihil into separate modules --- nihil.cli/CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 nihil.cli/CMakeLists.txt (limited to 'nihil.cli/CMakeLists.txt') diff --git a/nihil.cli/CMakeLists.txt b/nihil.cli/CMakeLists.txt new file mode 100644 index 0000000..a677798 --- /dev/null +++ b/nihil.cli/CMakeLists.txt @@ -0,0 +1,32 @@ +# This source code is released into the public domain. + +add_library(nihil.cli STATIC) +target_link_libraries(nihil.cli PRIVATE nihil.util) +target_sources(nihil.cli + PUBLIC FILE_SET modules TYPE CXX_MODULES FILES + nihil.cli.ccm + + command_map.ccm + usage_error.ccm + + PRIVATE + command_map.cc +) + +if(NIHIL_TESTS) + enable_testing() + + add_executable(nihil.cli.test + test_command_map.cc + ) + target_link_libraries(nihil.cli.test PRIVATE + nihil.cli + Catch2::Catch2WithMain + ) + + find_package(Catch2 REQUIRED) + + include(CTest) + include(Catch) + catch_discover_tests(nihil.cli.test) +endif() -- cgit v1.2.3