blob: 946792cba05cb453df8a1a26c3d2f1fe76ec482b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
cmake_minimum_required(VERSION 3.24)
project(cxx_modules_import_interfaces CXX)
include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
if (NO_PROPERTIES)
set(package_name "export_interfaces_no_properties")
elseif (WITH_BMIS)
set(package_name "export_bmi_and_interfaces")
elseif (INCLUDE_PROPERTIES)
set(package_name "export_include_directories")
else ()
set(package_name "export_interfaces")
endif ()
set(target_name "CXXModules::${package_name}")
find_package("${package_name}" REQUIRED)
add_executable(use_import_interfaces)
target_sources(use_import_interfaces
PRIVATE
use.cxx)
target_compile_features(use_import_interfaces PRIVATE cxx_std_20)
target_link_libraries(use_import_interfaces PRIVATE "${target_name}")
add_test(NAME use_import_interfaces COMMAND use_import_interfaces)
|