diff options
author | Brad King <brad.king@kitware.com> | 2019-02-27 13:09:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-27 13:09:42 (GMT) |
commit | 557d4b5882f0ea1e1ad7eb1d59674e8683e23058 (patch) | |
tree | ed56e2be6d3c7c059f2b982931dcbaec13e551a4 /Tests/RunCMake | |
parent | 8c3172e7c265d54ce02766db7ef1166f68bf897f (diff) | |
parent | e795be115e9c40d6092958d64f251db435acc4ba (diff) | |
download | CMake-557d4b5882f0ea1e1ad7eb1d59674e8683e23058.zip CMake-557d4b5882f0ea1e1ad7eb1d59674e8683e23058.tar.gz CMake-557d4b5882f0ea1e1ad7eb1d59674e8683e23058.tar.bz2 |
Merge topic 'cmake_role-vs-fix'
e795be115e Merge branch 'master' into cmake_role-vs-fix
4b95e7fe63 CMAKE_ROLE: Fix value in --build for Visual Studio generators
Acked-by: Kitware Robot <kwrobot@kitware.com>
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) |