File tree Expand file tree Collapse file tree 5 files changed +24
-8
lines changed Expand file tree Collapse file tree 5 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS
1212)
1313
1414find_package (Catch2 3.8.0 REQUIRED)
15- if (Catch2_FOUND)
15+ if (Catch2_FOUND)
1616 message (STATUS "Found Catch2 ${Catch2_VERSION} ." )
1717else ()
1818 message (FATAL_ERROR "Could not find libraries for Catch2." )
@@ -26,5 +26,10 @@ add_subdirectory(src/ystdlib)
2626
2727add_executable (unitTest)
2828target_sources (unitTest PRIVATE src/main.cpp)
29- target_link_libraries (unitTest PRIVATE ystdlib::testlib Catch2::Catch2WithMain)
29+ target_link_libraries (
30+ unitTest
31+ PRIVATE
32+ ystdlib::testlib
33+ Catch2::Catch2WithMain
34+ )
3035target_compile_features (unitTest PRIVATE cxx_std_20)
Original file line number Diff line number Diff line change 11#define CATCH_CONFIG_MAIN
22
3+ #include < catch2/catch_test_macros.hpp>
34#include < concepts>
4- #include < iostream>
5-
6- #include < catch2/catch_all.hpp>
75#include < ystdlib/testlib/hello.hpp>
86
97namespace {
@@ -15,5 +13,5 @@ requires std::integral<T>
1513}; // namespace
1614
1715TEST_CASE (" dummy" ) {
18- REQUIRE ((169 == square (ystdlib::testlib::hello ().size ())));
16+ REQUIRE ((169 == square (ystdlib::testlib::hello ().size ())));
1917}
Original file line number Diff line number Diff line change @@ -14,9 +14,22 @@ tasks:
1414
1515 clean :
1616 desc : " Removes all built artifacts."
17+ deps :
18+ - " :config-cmake-project"
1719 cmds :
1820 - >-
1921 cmake
2022 --build "{{.G_BUILD_DIR}}"
2123 --parallel {{numCPU}}
2224 --target clean
25+
26+ config-cmake-project :
27+ internal : true
28+ sources :
29+ - " CMakeLists.txt"
30+ - " {{.TASKFILE}}"
31+ generates :
32+ - " {{.G_CMAKE_CACHE}}"
33+ - " {{.G_COMPILE_COMMANDS_DB}}"
34+ cmds :
35+ - " cmake -S '{{.ROOT_DIR}}' -B '{{.G_BUILD_DIR}}'"
Original file line number Diff line number Diff line change 77 "Catch2": "v3.8.0"
88 }
99 G_DEPS_RELEASES :
10- ref : ' fromJson .G_DEPS_RELEASES_JSON'
10+ ref : " fromJson .G_DEPS_RELEASES_JSON"
1111
1212tasks :
1313 install-all :
Original file line number Diff line number Diff line change 6565 - " {{.ROOT_DIR}}/.clang-tidy"
6666 - " {{.TASKFILE}}"
6767 deps :
68- - " :config-cmake-project"
68+ - " :build: config-cmake-project"
6969 - " cpp-configs"
7070 - " venv"
7171 cmds :
You can’t perform that action at this time.
0 commit comments