summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CXXModules/InstallBMI-check.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-04-22 22:00:47 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-07-06 14:15:23 (GMT)
commit29118091dc323d3b48b58155ac0e30b47ca60fb6 (patch)
tree26f9e67c1254ce95c798dffc588bdda1d036b923 /Tests/RunCMake/CXXModules/InstallBMI-check.cmake
parentf3cfde394a903928cc379f3a56a9cb9618def665 (diff)
downloadCMake-29118091dc323d3b48b58155ac0e30b47ca60fb6.zip
CMake-29118091dc323d3b48b58155ac0e30b47ca60fb6.tar.gz
CMake-29118091dc323d3b48b58155ac0e30b47ca60fb6.tar.bz2
install: support `CXX_MODULES_BMI` installation bits
Diffstat (limited to 'Tests/RunCMake/CXXModules/InstallBMI-check.cmake')
-rw-r--r--Tests/RunCMake/CXXModules/InstallBMI-check.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/CXXModules/InstallBMI-check.cmake b/Tests/RunCMake/CXXModules/InstallBMI-check.cmake
new file mode 100644
index 0000000..f891c80
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/InstallBMI-check.cmake
@@ -0,0 +1,24 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake" install_script)
+
+if (NOT install_script MATCHES [[\(CMAKE_INSTALL_COMPONENT STREQUAL "bmi" OR NOT CMAKE_INSTALL_COMPONENT\)]])
+ list(APPEND RunCMake_TEST_FAILED
+ "Could not find BMI install script component for `bmi`")
+endif ()
+
+if (NOT install_script MATCHES [[include\("[^)]*/CMakeFiles/install-bmi\.dir/install-cxx-module-bmi-[^.]*\.cmake" OPTIONAL\)]])
+ list(APPEND RunCMake_TEST_FAILED
+ "Could not find BMI install script inclusion")
+endif ()
+
+if (NOT install_script MATCHES [[\(CMAKE_INSTALL_COMPONENT STREQUAL "bmi-optional"\)]])
+ list(APPEND RunCMake_TEST_FAILED
+ "Could not find BMI install script component for `bmi-optional`")
+endif ()
+
+if (NOT install_script MATCHES [[\(CMAKE_INSTALL_COMPONENT STREQUAL "bmi-only-debug" OR NOT CMAKE_INSTALL_COMPONENT\)
+ if\(CMAKE_INSTALL_CONFIG_NAME MATCHES "\^\(\[Dd\]\[Ee\]\[Bb\]\[Uu\]\[Gg\]\)\$"\)]])
+ list(APPEND RunCMake_TEST_FAILED
+ "Could not find BMI install script component for `bmi-only-debug`")
+endif ()
+
+string(REPLACE ";" "; " RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}")