summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/build_command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-08 19:41:08 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-12 13:06:49 (GMT)
commit226df303f955a8756cda7544f58242b52ea7ec2e (patch)
treef4ad45a19cb1b2387b93f76355f06d19c8b9dbfd /Tests/RunCMake/build_command
parent28e7a135e001afb36a7cff8e896ebac75390dde0 (diff)
downloadCMake-226df303f955a8756cda7544f58242b52ea7ec2e.zip
CMake-226df303f955a8756cda7544f58242b52ea7ec2e.tar.gz
CMake-226df303f955a8756cda7544f58242b52ea7ec2e.tar.bz2
CTest: Stop telling 'make' to ignore errors with -i
Add policy CMP0061 to maintain compatibility for existing projects.
Diffstat (limited to 'Tests/RunCMake/build_command')
-rw-r--r--Tests/RunCMake/build_command/CMP0061-NEW-stderr.txt10
-rw-r--r--Tests/RunCMake/build_command/CMP0061-NEW.cmake2
-rw-r--r--Tests/RunCMake/build_command/CMP0061-OLD-make-stderr.txt10
-rw-r--r--Tests/RunCMake/build_command/CMP0061-OLD-make.cmake2
-rw-r--r--Tests/RunCMake/build_command/CMP0061-OLD-other-stderr.txt10
-rw-r--r--Tests/RunCMake/build_command/CMP0061-OLD-other.cmake2
-rw-r--r--Tests/RunCMake/build_command/CMP0061Common.cmake10
-rw-r--r--Tests/RunCMake/build_command/RunCMakeTest.cmake8
8 files changed, 54 insertions, 0 deletions
diff --git a/Tests/RunCMake/build_command/CMP0061-NEW-stderr.txt b/Tests/RunCMake/build_command/CMP0061-NEW-stderr.txt
new file mode 100644
index 0000000..1dde843
--- /dev/null
+++ b/Tests/RunCMake/build_command/CMP0061-NEW-stderr.txt
@@ -0,0 +1,10 @@
+^[^
+]+ --build \. --config "Release"
+[^
+]+ --build \. --config "Release" --target "MyTarget"
+[^
+]+ --build \. --config "Debug"
+[^
+]+ --build \. --config "Debug" --target "MyTarget"
+[^
+]+ --build \. --config "Release"$
diff --git a/Tests/RunCMake/build_command/CMP0061-NEW.cmake b/Tests/RunCMake/build_command/CMP0061-NEW.cmake
new file mode 100644
index 0000000..2e439cb
--- /dev/null
+++ b/Tests/RunCMake/build_command/CMP0061-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0061 NEW)
+include(CMP0061Common.cmake)
diff --git a/Tests/RunCMake/build_command/CMP0061-OLD-make-stderr.txt b/Tests/RunCMake/build_command/CMP0061-OLD-make-stderr.txt
new file mode 100644
index 0000000..28e0e72
--- /dev/null
+++ b/Tests/RunCMake/build_command/CMP0061-OLD-make-stderr.txt
@@ -0,0 +1,10 @@
+^[^
+]+ --build \. --config "Release" -- -i
+[^
+]+ --build \. --config "Release" --target "MyTarget" -- -i
+[^
+]+ --build \. --config "Debug" -- -i
+[^
+]+ --build \. --config "Debug" --target "MyTarget" -- -i
+[^
+]+ --build \. --config "Release" -- -i$
diff --git a/Tests/RunCMake/build_command/CMP0061-OLD-make.cmake b/Tests/RunCMake/build_command/CMP0061-OLD-make.cmake
new file mode 100644
index 0000000..1542d8c
--- /dev/null
+++ b/Tests/RunCMake/build_command/CMP0061-OLD-make.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0061 OLD)
+include(CMP0061Common.cmake)
diff --git a/Tests/RunCMake/build_command/CMP0061-OLD-other-stderr.txt b/Tests/RunCMake/build_command/CMP0061-OLD-other-stderr.txt
new file mode 100644
index 0000000..1dde843
--- /dev/null
+++ b/Tests/RunCMake/build_command/CMP0061-OLD-other-stderr.txt
@@ -0,0 +1,10 @@
+^[^
+]+ --build \. --config "Release"
+[^
+]+ --build \. --config "Release" --target "MyTarget"
+[^
+]+ --build \. --config "Debug"
+[^
+]+ --build \. --config "Debug" --target "MyTarget"
+[^
+]+ --build \. --config "Release"$
diff --git a/Tests/RunCMake/build_command/CMP0061-OLD-other.cmake b/Tests/RunCMake/build_command/CMP0061-OLD-other.cmake
new file mode 100644
index 0000000..1542d8c
--- /dev/null
+++ b/Tests/RunCMake/build_command/CMP0061-OLD-other.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0061 OLD)
+include(CMP0061Common.cmake)
diff --git a/Tests/RunCMake/build_command/CMP0061Common.cmake b/Tests/RunCMake/build_command/CMP0061Common.cmake
new file mode 100644
index 0000000..50cd7d7
--- /dev/null
+++ b/Tests/RunCMake/build_command/CMP0061Common.cmake
@@ -0,0 +1,10 @@
+build_command(command)
+message("${command}")
+build_command(command TARGET MyTarget)
+message("${command}")
+build_command(command CONFIGURATION Debug)
+message("${command}")
+build_command(command CONFIGURATION Debug TARGET MyTarget)
+message("${command}")
+build_command(cache_command "${CMAKE_MAKE_PROGRAM}")
+message("${cache_command}")
diff --git a/Tests/RunCMake/build_command/RunCMakeTest.cmake b/Tests/RunCMake/build_command/RunCMakeTest.cmake
index eaa1d77..c3bef4c 100644
--- a/Tests/RunCMake/build_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/build_command/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+unset(ENV{CMAKE_CONFIG_TYPE})
run_cmake(ErrorsOFF)
run_cmake(ErrorsON)
@@ -6,3 +7,10 @@ run_cmake(ErrorsON)
set(RunCMake_TEST_OPTIONS -DNoProject=1)
run_cmake(BeforeProject)
unset(RunCMake_TEST_OPTIONS)
+
+run_cmake(CMP0061-NEW)
+if(RunCMake_GENERATOR MATCHES "Make")
+ run_cmake(CMP0061-OLD-make)
+else()
+ run_cmake(CMP0061-OLD-other)
+endif()