diff options
author | Brad King <brad.king@kitware.com> | 2013-10-21 15:50:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-22 13:09:52 (GMT) |
commit | 178b9af18674b23be97758236c676c9bd9398c40 (patch) | |
tree | 657c6451d32cc4893b601214066d17512c9a62e9 /Tests/RunCMake/DisallowedCommands | |
parent | 248d1dc057564dc00e3374d7797a1e42ea57032d (diff) | |
download | CMake-178b9af18674b23be97758236c676c9bd9398c40.zip CMake-178b9af18674b23be97758236c676c9bd9398c40.tar.gz CMake-178b9af18674b23be97758236c676c9bd9398c40.tar.bz2 |
Add policy CMP0034 to disallow utility_source
Diffstat (limited to 'Tests/RunCMake/DisallowedCommands')
10 files changed, 29 insertions, 0 deletions
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-stderr.txt new file mode 100644 index 0000000..1dd279b --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at CMP0034-NEW.cmake:2 \(utility_source\): + The utility_source command should not be called; see CMP0034. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW.cmake new file mode 100644 index 0000000..48724a9 --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0034 NEW) +utility_source() diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-stderr.txt new file mode 100644 index 0000000..3358628 --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at CMP0034-OLD.cmake:2 \(utility_source\): + utility_source called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD.cmake new file mode 100644 index 0000000..a2c9798 --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0034 OLD) +utility_source() diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-stderr.txt new file mode 100644 index 0000000..ea3831f --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-stderr.txt @@ -0,0 +1,12 @@ +CMake Warning \(dev\) at CMP0034-WARN.cmake:1 \(utility_source\): + Policy CMP0034 is not set: The utility_source command should not be called. + Run "cmake --help-policy CMP0034" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Error at CMP0034-WARN.cmake:1 \(utility_source\): + utility_source called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN.cmake new file mode 100644 index 0000000..b4ae045 --- /dev/null +++ b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN.cmake @@ -0,0 +1 @@ +utility_source() diff --git a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake index 003298a..0bd8591 100644 --- a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake +++ b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake @@ -6,6 +6,7 @@ foreach(p CMP0031 CMP0032 CMP0033 + CMP0034 ) run_cmake(${p}-WARN) run_cmake(${p}-OLD) |