blob: 238e30a19303c96ede94559679613e10d2dfbcc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
cmake_minimum_required(VERSION 3.24)
project(cxx_modules_objlib CXX)
include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
add_library(objlib OBJECT)
target_sources(objlib
PUBLIC
FILE_SET CXX_MODULES
BASE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}"
FILES
importable.cxx)
target_compile_features(objlib PUBLIC cxx_std_20)
add_executable(objmain)
target_sources(objmain
PRIVATE
main.cxx)
target_link_libraries(objmain PRIVATE objlib)
add_test(NAME objmain COMMAND objmain)
|