File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,4 +48,4 @@ target_link_libraries(another_main PRIVATE myproj::lib myproj::lib2)
4848
4949# tests
5050enable_testing ()
51- add_test ( NAME another_main COMMAND another_main )
51+ add_executable_test ( another_main no_arg )
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ add_subdirectory(libs)
9797
9898## tests
9999enable_testing ()
100- add_test ( NAME main COMMAND main )
100+ add_executable_test ( main no_arg )
101101
102102# Header-only library
103103add_library (lib INTERFACE )
@@ -120,6 +120,17 @@ target_link_libraries(lib2 PRIVATE myproj_project_options myproj_project_warning
120120target_link_system_libraries (lib2 PRIVATE fmt::fmt Eigen3::Eigen )
121121target_link_system_libraries (lib2 PRIVATE mythirdpartylib )
122122
123+ add_test_config (common
124+ DEPENDENCIES_CONFIG
125+ ut
126+
127+ SYSTEM_LIBRARIES
128+ Boost::ut
129+ )
130+
131+ add_library_test (lib lib CONFIGS common SOURCES tests/mylib/lib.cpp )
132+ add_library_test (lib2 lib CONFIGS common SOURCES tests/mylib2/lib.cpp )
133+
123134# package everything automatically
124135package_project (
125136 # NAME
Original file line number Diff line number Diff line change 1+ #include " mylib/lib.hpp"
2+
3+ #include < boost/ut.hpp>
4+
5+ int main () { // NOLINT(bugprone-exception-escape)
6+ using namespace boost ::ut; // NOLINT(*using-namespace*)
7+
8+ " lib" _test = []() { expect (some_fun () == 0 ); };
9+ }
Original file line number Diff line number Diff line change 1+ #include " mylib2/lib.hpp"
2+
3+ #include < boost/ut.hpp>
4+
5+ int main () { // NOLINT(bugprone-exception-escape)
6+ using namespace boost ::ut; // NOLINT(*using-namespace*)
7+
8+ " lib" _test = []() { expect (some_fun2 () == 0 ); };
9+ }
Original file line number Diff line number Diff line change 1111 {
1212 "name" : " fmt" ,
1313 "version>=" : " 8.1.1"
14+ },
15+ {
16+ "name" : " bext-ut" ,
17+ "version>=" : " 1.1.9"
1418 }
1519 ]
1620}
You can’t perform that action at this time.
0 commit comments