diff options
author | Brad King <brad.king@kitware.com> | 2023-09-27 15:25:10 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-09-27 15:25:22 (GMT) |
commit | 6bb05172acc8519a174a4f6294dd96d82c846d4c (patch) | |
tree | 5c4c29e5905a1a73e47539e3399561e27fda849e /Tests/RunCMake/CXXModules/examples | |
parent | 2a12a83037dead14173fcf0219f4669229c67147 (diff) | |
parent | 42654cc8183af23a0d570355571d0a9d52a9d84d (diff) | |
download | CMake-6bb05172acc8519a174a4f6294dd96d82c846d4c.zip CMake-6bb05172acc8519a174a4f6294dd96d82c846d4c.tar.gz CMake-6bb05172acc8519a174a4f6294dd96d82c846d4c.tar.bz2 |
Merge topic 'cxxmodules-export-dirs-with-prefix'
42654cc818 Tests/CXXModules: add tests for modules with include requirements
7217cb78cf Tests/CXXModules: relax line number matching in stderr
b3d1bbbbcc cmExportFileGenerator: relocate include directories for C++ modules
349ff8b080 cmGeneratorTarget: remove not-INTERFACE assertion
681a763425 cmGeneratorTarget: use a character literal
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8838
Diffstat (limited to 'Tests/RunCMake/CXXModules/examples')
49 files changed, 323 insertions, 39 deletions
diff --git a/Tests/RunCMake/CXXModules/examples/circular-stderr.txt b/Tests/RunCMake/CXXModules/examples/circular-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/circular-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/circular-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt b/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt index 659414d..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:15 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt b/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt index e868787..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:9 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt new file mode 100644 index 0000000..28a7b1f --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt @@ -0,0 +1,4 @@ +CMake Warning \(dev\) at CMakeLists.txt:[0-9] \(target_sources\): + CMake's C\+\+ module support is experimental. It is meant only for + experimentation and feedback to CMake developers. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt new file mode 100644 index 0000000..bc2ae7f --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt @@ -0,0 +1,63 @@ +cmake_minimum_required(VERSION 3.24) +project(cxx_modules_export_include_directories CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +add_library(export_include_directories STATIC + include/include.h) +target_sources(export_include_directories + PRIVATE + forward.cxx + PRIVATE + FILE_SET modules_private TYPE CXX_MODULES + BASE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}" + FILES + private.cxx + PUBLIC + FILE_SET modules TYPE CXX_MODULES + BASE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}" + FILES + importable.cxx + subdir/importable.cxx + ) +target_compile_features(export_include_directories PUBLIC cxx_std_20) +target_include_directories(export_include_directories + PRIVATE + "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>") + +add_library(no_modules STATIC no_modules.cxx) + +install(TARGETS export_include_directories no_modules + EXPORT CXXModules + FILE_SET modules DESTINATION "lib/cxx/miu") +export(EXPORT CXXModules + NAMESPACE CXXModules:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/export_include_directories-targets.cmake" + CXX_MODULES_DIRECTORY "export_include_directories-cxx-modules") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/export_include_directories-config.cmake" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/export_include_directories-targets.cmake\") +set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND 1) +") + +set(generator + -G "${CMAKE_GENERATOR}") +if (CMAKE_GENERATOR_TOOLSET) + list(APPEND generator + -T "${CMAKE_GENERATOR_TOOLSET}") +endif () +if (CMAKE_GENERATOR_PLATFORM) + list(APPEND generator + -A "${CMAKE_GENERATOR_PLATFORM}") +endif () + +add_test(NAME export_include_directories_build + COMMAND + "${CMAKE_COMMAND}" + "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" + "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" + "-Dexport_include_directories_DIR=${CMAKE_CURRENT_BINARY_DIR}" + ${generator} + -S "${CMAKE_CURRENT_SOURCE_DIR}/test" + -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/forward.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/forward.cxx new file mode 100644 index 0000000..7f53271 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/forward.cxx @@ -0,0 +1,6 @@ +import priv; + +int forwarding() +{ + return from_private(); +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/importable.cxx new file mode 100644 index 0000000..6a1d83e --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/importable.cxx @@ -0,0 +1,18 @@ +module; + +#include "include/include.h" + +#ifndef include_h_included +# error "include define not found" +#endif + +export module importable; + +extern "C++" { +int forwarding(); +} + +export int from_import() +{ + return forwarding(); +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/include/include.h b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/include/include.h new file mode 100644 index 0000000..e3eee34 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/include/include.h @@ -0,0 +1,3 @@ +#pragma once + +#define include_h_included diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/no_modules.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/no_modules.cxx new file mode 100644 index 0000000..eea854f --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/no_modules.cxx @@ -0,0 +1,3 @@ +void no_modules() +{ +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/private.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/private.cxx new file mode 100644 index 0000000..c5b719a --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/private.cxx @@ -0,0 +1,6 @@ +export module priv; + +export int from_private() +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/subdir/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/subdir/importable.cxx new file mode 100644 index 0000000..07d6af6 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/subdir/importable.cxx @@ -0,0 +1,6 @@ +export module subdir_importable; + +export int from_subdir() +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/test/CMakeLists.txt new file mode 100644 index 0000000..f5bdfd4 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/test/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.24) +project(cxx_modules_library NONE) + +set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") + +find_package(export_include_directories REQUIRED) + +if (NOT TARGET CXXModules::export_include_directories) + message(FATAL_ERROR + "Missing imported target") +endif () + +get_property(include_directories TARGET CXXModules::export_include_directories + PROPERTY IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES) +foreach (include_directory IN LISTS include_directories) + if (NOT EXISTS "${include_directory}") + message(FATAL_ERROR + "Missing include directory in C++ module interface CXXModules::export_include_directories:\n ${include_directory}") + endif () +endforeach () diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt new file mode 100644 index 0000000..be89b8c --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt @@ -0,0 +1,4 @@ +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): + CMake's C\+\+ module support is experimental. It is meant only for + experimentation and feedback to CMake developers. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt new file mode 100644 index 0000000..444882d --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.24) +project(cxx_modules_export_include_directories CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +add_library(export_include_directories STATIC + include/include.h) +target_sources(export_include_directories + PRIVATE + forward.cxx + PRIVATE + FILE_SET modules_private TYPE CXX_MODULES + BASE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}" + FILES + private.cxx + PUBLIC + FILE_SET modules TYPE CXX_MODULES + BASE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}" + FILES + importable.cxx + subdir/importable.cxx + ) +target_compile_features(export_include_directories PUBLIC cxx_std_20) +target_include_directories(export_include_directories + PRIVATE + "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" + "$<INSTALL_INTERFACE:include>") + +add_library(no_modules STATIC no_modules.cxx) + +install(TARGETS export_include_directories no_modules + EXPORT CXXModules + FILE_SET modules DESTINATION "lib/cxx/miu") +install(DIRECTORY include + DESTINATION "include") +install(EXPORT CXXModules + NAMESPACE CXXModules:: + DESTINATION "lib/cmake/export_include_directories" + FILE "export_include_directories-targets.cmake" + CXX_MODULES_DIRECTORY "export_include_directories-cxx-modules") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/export_include_directories-config.cmake" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/export_include_directories-targets.cmake\") +set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND 1) +") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/export_include_directories-config.cmake" + DESTINATION "lib/cmake/export_include_directories") + +set(generator + -G "${CMAKE_GENERATOR}") +if (CMAKE_GENERATOR_TOOLSET) + list(APPEND generator + -T "${CMAKE_GENERATOR_TOOLSET}") +endif () +if (CMAKE_GENERATOR_PLATFORM) + list(APPEND generator + -A "${CMAKE_GENERATOR_PLATFORM}") +endif () + +add_test(NAME export_include_directories_build + COMMAND + "${CMAKE_COMMAND}" + "-Dexpected_source_dir=${CMAKE_INSTALL_PREFIX}/lib/cxx/miu" + "-Dexpected_binary_dir=${CMAKE_INSTALL_PREFIX}/lib/cxx/bmi" + "-Dexport_include_directories_DIR=${CMAKE_INSTALL_PREFIX}/lib/cmake/export_include_directories" + ${generator} + -S "${CMAKE_CURRENT_SOURCE_DIR}/test" + -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/forward.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/forward.cxx new file mode 100644 index 0000000..7f53271 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/forward.cxx @@ -0,0 +1,6 @@ +import priv; + +int forwarding() +{ + return from_private(); +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/importable.cxx new file mode 100644 index 0000000..6a1d83e --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/importable.cxx @@ -0,0 +1,18 @@ +module; + +#include "include/include.h" + +#ifndef include_h_included +# error "include define not found" +#endif + +export module importable; + +extern "C++" { +int forwarding(); +} + +export int from_import() +{ + return forwarding(); +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/include/include.h b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/include/include.h new file mode 100644 index 0000000..e3eee34 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/include/include.h @@ -0,0 +1,3 @@ +#pragma once + +#define include_h_included diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/no_modules.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/no_modules.cxx new file mode 100644 index 0000000..eea854f --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/no_modules.cxx @@ -0,0 +1,3 @@ +void no_modules() +{ +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/private.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/private.cxx new file mode 100644 index 0000000..c5b719a --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/private.cxx @@ -0,0 +1,6 @@ +export module priv; + +export int from_private() +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/subdir/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/subdir/importable.cxx new file mode 100644 index 0000000..07d6af6 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/subdir/importable.cxx @@ -0,0 +1,6 @@ +export module subdir_importable; + +export int from_subdir() +{ + return 0; +} diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt new file mode 100644 index 0000000..9cdb7ff --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.24) +project(cxx_modules_library NONE) + +set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") + +find_package(export_include_directories REQUIRED) + +if (NOT TARGET CXXModules::export_include_directories) + message(FATAL_ERROR + "Missing imported target") +endif () + +get_property(file_sets TARGET CXXModules::export_include_directories + PROPERTY INTERFACE_CXX_MODULE_SETS) +if (NOT file_sets STREQUAL "modules") + message(FATAL_ERROR + "Incorrect exported file sets in CXXModules::export_include_directories:\n ${file_sets}") +endif () diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt b/Tests/RunCMake/CXXModules/examples/generated-stderr.txt index 06160ce..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/generated-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:16 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt index 71ee795..e2970ec 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-targets.cmake:[0-9]* \(target_sources\): +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-targets.cmake:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-config.cmake:1 \(include\) - CMakeLists.txt:15 \(find_package\) + .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt index d22b2a1..ec5dd1f 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-targets.cmake:[0-9]* \(target_sources\): +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-targets.cmake:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-config.cmake:1 \(include\) - CMakeLists.txt:15 \(find_package\) + .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt new file mode 100644 index 0000000..4ea3679 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-include-directories-build-build/export_include_directories-targets.cmake:[0-9]+ \(target_sources\): + CMake's C\+\+ module support is experimental. It is meant only for + experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Tests/RunCMake/CXXModules/examples/export-include-directories-build-build/export_include_directories-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt new file mode 100644 index 0000000..50ad6b9 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-include-directories-install-install/lib/cmake/export_include_directories/export_include_directories-targets.cmake:[0-9]+ \(target_sources\): + CMake's C\+\+ module support is experimental. It is meant only for + experimentation and feedback to CMake developers. +Call Stack \(most recent call first\): + .*/Tests/RunCMake/CXXModules/examples/export-include-directories-install-install/lib/cmake/export_include_directories/export_include_directories-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt index f79abbc..10404c6 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-targets.cmake:[0-9]* \(target_sources\): +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-targets.cmake:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-config.cmake:1 \(include\) - CMakeLists.txt:15 \(find_package\) + .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt index 32f9452..04124cd 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-targets.cmake:[0-9]* \(target_sources\): +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-targets.cmake:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-config.cmake:1 \(include\) - CMakeLists.txt:15 \(find_package\) + .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt index 9254936..dcf6498 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-targets.cmake:[0-9]* \(target_sources\): +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-targets.cmake:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-config.cmake:1 \(include\) - CMakeLists.txt:15 \(find_package\) + .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt index 71269f4..7073b4a 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-targets.cmake:[0-9]* \(target_sources\): +CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-targets.cmake:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. Call Stack \(most recent call first\): - .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-config.cmake:1 \(include\) - CMakeLists.txt:15 \(find_package\) + .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-config.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(find_package\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt index 3e6f379..946792c 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt @@ -7,6 +7,8 @@ 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 () diff --git a/Tests/RunCMake/CXXModules/examples/import-modules/use.cxx b/Tests/RunCMake/CXXModules/examples/import-modules/use.cxx index feb38d2..2da1913 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules/use.cxx +++ b/Tests/RunCMake/CXXModules/examples/import-modules/use.cxx @@ -1,3 +1,9 @@ +#if defined(__has_include) +# if __has_include(<include/include.h>) +# error "include directories leaked from private module requirements" +# endif +#endif + import importable; int main(int argc, char* argv[]) diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt b/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt index 79c5637..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:10 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt b/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt index 79c5637..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:10 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt b/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt index 79c5637..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/library-static-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:10 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/object-library-stderr.txt b/Tests/RunCMake/CXXModules/examples/object-library-stderr.txt index 4709399..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/object-library-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/object-library-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]* \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt b/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt index 79c5637..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/partitions-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:10 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt b/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt b/Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt b/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt index 34f3f85..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:25 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/simple-stderr.txt b/Tests/RunCMake/CXXModules/examples/simple-stderr.txt index 78bdf2b..be89b8c 100644 --- a/Tests/RunCMake/CXXModules/examples/simple-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/simple-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt b/Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt index 571bb9c..a121e86 100644 --- a/Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]* \(try_compile\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(try_compile\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/try-run-stderr.txt b/Tests/RunCMake/CXXModules/examples/try-run-stderr.txt index 508db55..8eea7a6 100644 --- a/Tests/RunCMake/CXXModules/examples/try-run-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/try-run-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:[0-9]* \(try_run\): +CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(try_run\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. |