diff options
author | Brad King <brad.king@kitware.com> | 2018-04-11 14:33:35 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-04-11 14:33:48 (GMT) |
commit | ded33659b150637b831291130b515803d6174722 (patch) | |
tree | 2f6876e7a4e6d484dee0bd8cb3506a6752745c82 /Tests/RunCMake | |
parent | 952d72b79da982d8c099052ac474e04ab507cd17 (diff) | |
parent | 6f2701abf60bc8c0aeed14e09adf28d59023da87 (diff) | |
download | CMake-ded33659b150637b831291130b515803d6174722.zip CMake-ded33659b150637b831291130b515803d6174722.tar.gz CMake-ded33659b150637b831291130b515803d6174722.tar.bz2 |
Merge topic 'cpack-trace-nullptr'
6f2701abf6 CPack: Fix crash on invalid generator name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1950
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CPackCommandLine/NotAGenerator-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CPackCommandLine/RunCMakeTest.cmake | 10 |
4 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 8837821..44a8c45 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -339,6 +339,7 @@ add_RunCMake_test(CommandLine -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}) add_RunCMake_test(CommandLineTar) add_RunCMake_test(install) +add_RunCMake_test(CPackCommandLine) add_RunCMake_test(CPackConfig) add_RunCMake_test(CPackInstallProperties) add_RunCMake_test(ExternalProject) diff --git a/Tests/RunCMake/CPackCommandLine/NotAGenerator-result.txt b/Tests/RunCMake/CPackCommandLine/NotAGenerator-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CPackCommandLine/NotAGenerator-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt b/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt new file mode 100644 index 0000000..fe4e455 --- /dev/null +++ b/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt @@ -0,0 +1 @@ +^CPack Error: Cannot initialize CPack generator: NotAGenerator diff --git a/Tests/RunCMake/CPackCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CPackCommandLine/RunCMakeTest.cmake new file mode 100644 index 0000000..991146c --- /dev/null +++ b/Tests/RunCMake/CPackCommandLine/RunCMakeTest.cmake @@ -0,0 +1,10 @@ +include(RunCMake) +set(RunCMake_TEST_TIMEOUT 60) + +file(WRITE "${RunCMake_BINARY_DIR}/NotAGenerator-build/CPackConfig.cmake" [[ +set(CPACK_PACKAGE_NAME "Test") +set(CPACK_PACKAGE_VERSION "1") +]]) +set(RunCMake_TEST_NO_CLEAN 1) +run_cmake_command(NotAGenerator ${CMAKE_CPACK_COMMAND} -G NotAGenerator) +unset(RunCMake_TEST_NO_CLEAN) |