summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Framework/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-03-27 14:08:11 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-03-29 11:57:11 (GMT)
commit45ac71d8bcb9c6bc0238a1a772029170cbf354dc (patch)
tree7ee6cda1a275f8a13345efbec20e129623daebac /Tests/RunCMake/Framework/RunCMakeTest.cmake
parent2a88b807ce96cd783795f6813a5789e2617175ec (diff)
downloadCMake-45ac71d8bcb9c6bc0238a1a772029170cbf354dc.zip
CMake-45ac71d8bcb9c6bc0238a1a772029170cbf354dc.tar.gz
CMake-45ac71d8bcb9c6bc0238a1a772029170cbf354dc.tar.bz2
Ensure targets which are frameworks can be used freely
Ensure flag -F/path/to/framework is specified during compilation step of consumers of the framework. Fixes: #23336
Diffstat (limited to 'Tests/RunCMake/Framework/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/Framework/RunCMakeTest.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/Framework/RunCMakeTest.cmake b/Tests/RunCMake/Framework/RunCMakeTest.cmake
index 2f8fdc7..a767130 100644
--- a/Tests/RunCMake/Framework/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Framework/RunCMakeTest.cmake
@@ -105,3 +105,15 @@ function(framework_system_include_test)
endfunction()
framework_system_include_test()
+
+function(framework_consumption)
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/FrameworkConsumption-build")
+ set(RunCMake_TEST_NO_CLEAN 1)
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake(FrameworkConsumption)
+ run_cmake_command(FrameworkConsumption-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+framework_consumption()