Skip to content

Commit eb84105

Browse files
committed
working version of module.test - woohoo!
1 parent 5f1d499 commit eb84105

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
22

3-
cmake_minimum_required(VERSION 3.25)
3+
cmake_minimum_required(VERSION 3.28)
44

55
project(
66
beman.scope
@@ -89,8 +89,7 @@ if(BEMAN_SCOPE_INSTALL_CONFIG_FILE_PACKAGE)
8989
EXPORT beman.scope-targets
9090
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/beman.scope
9191
NAMESPACE beman::
92-
CXX_MODULES_DIRECTORY
93-
cxx-modules
92+
CXX_MODULES_DIRECTORY cxx-modules
9493
COMPONENT beman.scope
9594
)
9695
endif()

tests/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ include(Catch)
1717

1818
add_executable(test.module)
1919
target_sources(test.module PRIVATE module.test.cpp)
20-
target_compile_features(test.module PRIVATE cxx_std_20)
21-
target_compile_options(test.module PRIVATE "-fmodules")
20+
target_link_libraries(test.module PRIVATE beman::scope)
21+
add_test(NAME test.module COMMAND test.module)
22+
23+
# todo: gc++15 module and catch incompatiblity?
2224
# target_link_libraries(
2325
# test.module
2426
# PUBLIC FILE_SET TYPE CXX_MODULES include/beman/scope/beman.scope.cppm
2527
# PRIVATE Catch2::Catch2WithMain beman::scope
2628
# )
2729
# catch_discover_tests(test.module)
2830

31+
2932
foreach(testname ${ALL_TESTNAMES})
3033
add_executable(test.${testname})
3134
target_sources(test.${testname} PRIVATE ${testname}.test.cpp)

0 commit comments

Comments
 (0)