Skip to content

Commit 042a2cc

Browse files
author
MarkusB
committed
Configure tests with development environment integration
Added `mb_devenv_set_target_essentials` to set up test target essentials and conditionally included `mb-devenv-ctest-root` for test builds. Updated CMake configuration to enhance compatibility with the development environment.
1 parent 7489eaa commit 042a2cc

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ option(
3636
)
3737

3838
list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/devenv/cmake")
39+
40+
if(MB_CPP_LIB_TEMPLATE_BUILD_TESTS)
41+
include(mb-devenv-ctest-root)
42+
endif()
3943
include(mb-devenv-defaults)
4044
include(mb-devenv-install-library-config)
4145

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ target_link_libraries(
1919
PRIVATE mb::cpp-lib-template GTest::gtest_main
2020
)
2121

22+
mb_devenv_set_target_essentials(mb.cpp-lib-template.test)
2223
mb_devenv_add_test(mb.cpp-lib-template.test)

0 commit comments

Comments
 (0)