diff options
author | Brad King <brad.king@kitware.com> | 2014-06-03 15:36:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-03 15:52:19 (GMT) |
commit | 44e2923f332653f6b1aad610b314a9edbdf6bf24 (patch) | |
tree | 6cad08d769a4adb89287b0d0becb53d02e996076 /Tests/RunCMake/CommandLine/RunCMakeTest.cmake | |
parent | cbc9a9514d0dd00b35b3de694dab02a387ec2b52 (diff) | |
download | CMake-44e2923f332653f6b1aad610b314a9edbdf6bf24.zip CMake-44e2923f332653f6b1aad610b314a9edbdf6bf24.tar.gz CMake-44e2923f332653f6b1aad610b314a9edbdf6bf24.tar.bz2 |
cmake: Fix --build crash on bad CMAKE_GENERATOR in cache
If we fail to create the generator named by CMAKE_GENERATOR, exit
with an error message instead of crashing. While at it, fix the
wording of the error message when CMAKE_GENERATOR is not set.
Extend the RunCMake.CommandLine test with cases covering the
"cmake --build" option when the named directory does not provide
a CMakeCache.txt with a valid CMAKE_GENERATOR.
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index ada4cab..3aaeac0 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -1,5 +1,12 @@ include(RunCMake) +run_cmake_command(build-no-cache + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}) +run_cmake_command(build-no-generator + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-no-generator) +run_cmake_command(build-bad-generator + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-generator) + if(UNIX) run_cmake_command(E_create_symlink-missing-dir ${CMAKE_COMMAND} -E create_symlink T missing-dir/L |