diff options
author | Brad King <brad.king@kitware.com> | 2020-03-27 11:48:23 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-27 11:48:30 (GMT) |
commit | ae96b772fa8c957dfc4cbb334f45874bd4043966 (patch) | |
tree | 30fac9a36745c4c7061a3424bb8c3cb6f50a69f9 /Tests | |
parent | 767a875feea867347e5a2b4284ef156687b570da (diff) | |
parent | 0cd20e8f62328b6e3ae750dc253473cf00e05adb (diff) | |
download | CMake-ae96b772fa8c957dfc4cbb334f45874bd4043966.zip CMake-ae96b772fa8c957dfc4cbb334f45874bd4043966.tar.gz CMake-ae96b772fa8c957dfc4cbb334f45874bd4043966.tar.bz2 |
Merge topic 'export-error-on-multuple-calls'
0cd20e8f62 export(): raise an error on multiple calls with same FILE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4510
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt | 17 | ||||
-rw-r--r-- | Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt | 26 | ||||
-rw-r--r-- | Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/export/RunCMakeTest.cmake | 4 |
7 files changed, 52 insertions, 1 deletions
diff --git a/Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt b/Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt b/Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt new file mode 100644 index 0000000..48ab7b1 --- /dev/null +++ b/Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt @@ -0,0 +1,17 @@ +CMake Error at Repeat.cmake:[0-9]+ \(export\): + export command already specified for the file + + foo.cmake + + Did you miss 'APPEND' keyword\? +Call Stack \(most recent call first\): + Repeat-CMP0103-NEW.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(include\) + + +CMake Error at Repeat/CMakeLists.txt:[0-9]+ \(export\): + export command already specified for the file + + .+/foo.cmake + + Did you miss 'APPEND' keyword\? diff --git a/Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake b/Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake new file mode 100644 index 0000000..69381df --- /dev/null +++ b/Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0103 NEW) +include(Repeat.cmake) diff --git a/Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake b/Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake new file mode 100644 index 0000000..25134d6 --- /dev/null +++ b/Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0103 OLD) +include(Repeat.cmake) diff --git a/Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt b/Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt new file mode 100644 index 0000000..3104df4 --- /dev/null +++ b/Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt @@ -0,0 +1,26 @@ +CMake Warning \(dev\) at Repeat.cmake:[0-9]+ \(export\): + Policy CMP0103 is not set: multiple export\(\) with same FILE without APPEND + is not allowed. Run "cmake --help-policy CMP0103" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. + + export\(\) command already specified for the file + + foo.cmake + + Did you miss 'APPEND' keyword\? +Call Stack \(most recent call first\): + Repeat-CMP0103-WARN.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Warning \(dev\) at Repeat/CMakeLists.txt:[0-9]+ \(export\): + Policy CMP0103 is not set: multiple export\(\) with same FILE without APPEND + is not allowed. Run "cmake --help-policy CMP0103" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. + + export\(\) command already specified for the file + + .+/foo.cmake + + Did you miss 'APPEND' keyword\? +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake b/Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake new file mode 100644 index 0000000..3a630c5 --- /dev/null +++ b/Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake @@ -0,0 +1 @@ +include(Repeat.cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index df35d95..1c74762 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -2,7 +2,9 @@ include(RunCMake) run_cmake(CustomTarget) run_cmake(Empty) -run_cmake(Repeat) +run_cmake(Repeat-CMP0103-WARN) +run_cmake(Repeat-CMP0103-OLD) +run_cmake(Repeat-CMP0103-NEW) run_cmake(TargetNotFound) run_cmake(AppendExport) run_cmake(OldIface) |