diff options
author | Brad King <brad.king@kitware.com> | 2019-02-27 13:05:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-27 13:05:55 (GMT) |
commit | f369d59cddecf9f6a3b28329ab11b5f354c229bd (patch) | |
tree | a0b5cb6d5966e47998b4cd6aa48930e0a3689361 /Tests/RunCMake | |
parent | c2c7b9605c7e2c095c342c0641fc44875df89942 (diff) | |
parent | 4b95e7fe63d254b8e50f09f85a51e232a7470c7b (diff) | |
download | CMake-f369d59cddecf9f6a3b28329ab11b5f354c229bd.zip CMake-f369d59cddecf9f6a3b28329ab11b5f354c229bd.tar.gz CMake-f369d59cddecf9f6a3b28329ab11b5f354c229bd.tar.bz2 |
Merge branch 'cmake_role-vs-fix' into release-3.14
Merge-request: !3028
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CMakeRoleGlobalProperty/Project.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMakeRoleGlobalProperty/RunCMakeTest.cmake | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeRoleGlobalProperty/Project.cmake b/Tests/RunCMake/CMakeRoleGlobalProperty/Project.cmake index c0b6a48..22cad2b 100644 --- a/Tests/RunCMake/CMakeRoleGlobalProperty/Project.cmake +++ b/Tests/RunCMake/CMakeRoleGlobalProperty/Project.cmake @@ -1,4 +1,8 @@ get_property(role GLOBAL PROPERTY CMAKE_ROLE) + +file(WRITE "${CMAKE_BINARY_DIR}/test.cmake" "# a") +include("${CMAKE_BINARY_DIR}/test.cmake") + if(NOT role STREQUAL "PROJECT") message(SEND_ERROR "CMAKE_ROLE property is \"${role}\", should be \"PROJECT\"") endif() diff --git a/Tests/RunCMake/CMakeRoleGlobalProperty/RunCMakeTest.cmake b/Tests/RunCMake/CMakeRoleGlobalProperty/RunCMakeTest.cmake index 3cbd51d..7b29c28 100644 --- a/Tests/RunCMake/CMakeRoleGlobalProperty/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakeRoleGlobalProperty/RunCMakeTest.cmake @@ -2,6 +2,9 @@ include(RunCMake) include(RunCTest) run_cmake(Project) +file(WRITE "${RunCMake_BINARY_DIR}/Project-build/test.cmake" "# b") +run_cmake_command(ProjectBuild "${CMAKE_COMMAND}" --build "${RunCMake_BINARY_DIR}/Project-build") + run_cmake_command(Script "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/Script.cmake") run_cmake_command(FindPackage "${CMAKE_COMMAND}" --find-package -DNAME=DummyPackage -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}") run_ctest(CTest) |