diff options
author | Brad King <brad.king@kitware.com> | 2013-12-04 13:33:36 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-12-04 13:33:36 (GMT) |
commit | a5c3f059ff353cda0aa598921b8c38fda587156f (patch) | |
tree | a48425e1861aef0738c19fdef0500e17b7d6e4d8 /Tests | |
parent | f1ec923d1ad0fdc38be33bb4e47a24c59255ddf7 (diff) | |
parent | 1cd1430b1fb0df91ff97d4ba3f360cdee0f56ce2 (diff) | |
download | CMake-a5c3f059ff353cda0aa598921b8c38fda587156f.zip CMake-a5c3f059ff353cda0aa598921b8c38fda587156f.tar.gz CMake-a5c3f059ff353cda0aa598921b8c38fda587156f.tar.bz2 |
Merge topic 'fix-export-segfault'
1cd1430 export(): Check targets exist at configure-time (#14608)
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/export/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/export/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/export/TargetNotFound-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/export/TargetNotFound-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/export/TargetNotFound.cmake | 1 |
6 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 72ea95d..593921f 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -99,6 +99,7 @@ add_RunCMake_test(Syntax) add_RunCMake_test(add_dependencies) add_RunCMake_test(build_command) +add_RunCMake_test(export) add_RunCMake_test(cmake_minimum_required) add_RunCMake_test(find_package) add_RunCMake_test(get_filename_component) diff --git a/Tests/RunCMake/export/CMakeLists.txt b/Tests/RunCMake/export/CMakeLists.txt new file mode 100644 index 0000000..be9d403 --- /dev/null +++ b/Tests/RunCMake/export/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.4) +project(${RunCMake_TEST}) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake new file mode 100644 index 0000000..b8d3f27 --- /dev/null +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(TargetNotFound) diff --git a/Tests/RunCMake/export/TargetNotFound-result.txt b/Tests/RunCMake/export/TargetNotFound-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/TargetNotFound-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/TargetNotFound-stderr.txt b/Tests/RunCMake/export/TargetNotFound-stderr.txt new file mode 100644 index 0000000..944a68e --- /dev/null +++ b/Tests/RunCMake/export/TargetNotFound-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at TargetNotFound.cmake:1 \(export\): + export given target "nonexistenttarget" which is not built by this project. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/export/TargetNotFound.cmake b/Tests/RunCMake/export/TargetNotFound.cmake new file mode 100644 index 0000000..a7c398d --- /dev/null +++ b/Tests/RunCMake/export/TargetNotFound.cmake @@ -0,0 +1 @@ +export(TARGETS nonexistenttarget FILE somefile.cmake) |