| 1 |
cmake_minimum_required(VERSION 3.28) |
| 2 |
project(cxx_modules_library NONE) |
| 3 |
|
| 4 |
find_package(export_transitive_modules REQUIRED) |
| 5 |
find_package(export_transitive_modules_cps REQUIRED) |
| 6 |
|
| 7 |
function(test_namespace namespace namespace1) |
| 8 |
if (NOT TARGET ${namespace1}::export_transitive_modules1) |
| 9 |
message(FATAL_ERROR |
| 10 |
"Missing transitive imported target") |
| 11 |
endif () |
| 12 |
|
| 13 |
if (NOT TARGET ${namespace}::export_transitive_modules) |
| 14 |
message(FATAL_ERROR |
| 15 |
"Missing imported target") |
| 16 |
endif () |
| 17 |
endfunction() |
| 18 |
|
| 19 |
test_namespace(CXXModules CXXModules) |
| 20 |
test_namespace(export_transitive_modules_cps export_transitive_modules1_cps) |