summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-07-12 20:00:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-07-12 20:00:18 (GMT)
commit7a3a5eb4588d05fb3aff97123f8f66da1a99ea33 (patch)
tree7fdc7befc624c9bffd9ee3063e388e4a582e2c81 /Tests
parent457041e5b31c315b72ec49b54eb4367f0850086a (diff)
parent2e99949ccb216c59ff1932bc3773654e9ae54419 (diff)
downloadCMake-7a3a5eb4588d05fb3aff97123f8f66da1a99ea33.zip
CMake-7a3a5eb4588d05fb3aff97123f8f66da1a99ea33.tar.gz
CMake-7a3a5eb4588d05fb3aff97123f8f66da1a99ea33.tar.bz2
Merge topic 'include-command-empty-filename'
2e99949 include: Ignore empty string as file name (#13388)
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/include/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/include/EmptyString-stderr.txt5
-rw-r--r--Tests/RunCMake/include/EmptyString.cmake1
-rw-r--r--Tests/RunCMake/include/EmptyStringOptional-stderr.txt5
-rw-r--r--Tests/RunCMake/include/EmptyStringOptional.cmake1
-rw-r--r--Tests/RunCMake/include/RunCMakeTest.cmake4
7 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 23fc086..eca96f9 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -50,6 +50,7 @@ add_RunCMake_test(ObjectLibrary)
add_RunCMake_test(build_command)
add_RunCMake_test(find_package)
+add_RunCMake_test(include)
add_RunCMake_test(list)
if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]")
diff --git a/Tests/RunCMake/include/CMakeLists.txt b/Tests/RunCMake/include/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/include/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include/EmptyString-stderr.txt b/Tests/RunCMake/include/EmptyString-stderr.txt
new file mode 100644
index 0000000..006c647
--- /dev/null
+++ b/Tests/RunCMake/include/EmptyString-stderr.txt
@@ -0,0 +1,5 @@
+CMake Warning \(dev\) at EmptyString.cmake:1 \(include\):
+ include\(\) given empty file name \(ignored\).
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/include/EmptyString.cmake b/Tests/RunCMake/include/EmptyString.cmake
new file mode 100644
index 0000000..4285cb3
--- /dev/null
+++ b/Tests/RunCMake/include/EmptyString.cmake
@@ -0,0 +1 @@
+include("")
diff --git a/Tests/RunCMake/include/EmptyStringOptional-stderr.txt b/Tests/RunCMake/include/EmptyStringOptional-stderr.txt
new file mode 100644
index 0000000..b61c679
--- /dev/null
+++ b/Tests/RunCMake/include/EmptyStringOptional-stderr.txt
@@ -0,0 +1,5 @@
+CMake Warning \(dev\) at EmptyStringOptional.cmake:1 \(include\):
+ include\(\) given empty file name \(ignored\).
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/include/EmptyStringOptional.cmake b/Tests/RunCMake/include/EmptyStringOptional.cmake
new file mode 100644
index 0000000..549d46b
--- /dev/null
+++ b/Tests/RunCMake/include/EmptyStringOptional.cmake
@@ -0,0 +1 @@
+include("" OPTIONAL)
diff --git a/Tests/RunCMake/include/RunCMakeTest.cmake b/Tests/RunCMake/include/RunCMakeTest.cmake
new file mode 100644
index 0000000..59b87ca
--- /dev/null
+++ b/Tests/RunCMake/include/RunCMakeTest.cmake
@@ -0,0 +1,4 @@
+include(RunCMake)
+
+run_cmake(EmptyString)
+run_cmake(EmptyStringOptional)