summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-21 15:32:22 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-22 12:48:52 (GMT)
commite1c6df392bae4f807bbc56f2c4320de412f48721 (patch)
tree6ef9578dcdbdd01d6ee5059374c56a590a326392 /Tests/RunCMake
parentc0502faa4b6c0a3c33d1b0dd346801ff8d4f8b0d (diff)
downloadCMake-e1c6df392bae4f807bbc56f2c4320de412f48721.zip
CMake-e1c6df392bae4f807bbc56f2c4320de412f48721.tar.gz
CMake-e1c6df392bae4f807bbc56f2c4320de412f48721.tar.bz2
ExternalProject: Allow dependencies on INTERFACE libraries
Respect INTERFACE library property whitelist. Check that a target has type "UTILITY" before querying other properties.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-stderr.txt5
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface.cmake4
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt5
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step.cmake11
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake2
7 files changed, 29 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-result.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-stderr.txt
new file mode 100644
index 0000000..1c0b601
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Target "SomeInterface" was not generated by ExternalProject_Add.
+Call Stack \(most recent call first\):
+ Add_StepDependencies_iface.cmake:[0-9]+ \(ExternalProject_Add_StepDependencies\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface.cmake
new file mode 100644
index 0000000..f7cfde1
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface.cmake
@@ -0,0 +1,4 @@
+include(ExternalProject)
+
+add_library(SomeInterface INTERFACE)
+ExternalProject_Add_StepDependencies(SomeInterface step dep)
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-result.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
new file mode 100644
index 0000000..22e13bf
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
+ Target "MyProj-IFace" was not generated by ExternalProject_Add_StepTargets.
+Call Stack \(most recent call first\):
+ Add_StepDependencies_iface_step.cmake:[0-9]+ \(ExternalProject_Add_StepDependencies\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step.cmake
new file mode 100644
index 0000000..0289493
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step.cmake
@@ -0,0 +1,11 @@
+include(ExternalProject)
+
+ExternalProject_Add(MyProj
+ DOWNLOAD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
+
+add_library(MyProj-IFace INTERFACE)
+ExternalProject_Add_StepDependencies(MyProj IFace dep)
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index 0f5dcef..a82ffc9 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -5,4 +5,6 @@ run_cmake(CMAKE_CACHE_DEFAULT_ARGS)
run_cmake(CMAKE_CACHE_mix)
run_cmake(NO_DEPENDS)
run_cmake(Add_StepDependencies)
+run_cmake(Add_StepDependencies_iface)
+run_cmake(Add_StepDependencies_iface_step)
run_cmake(Add_StepDependencies_no_target)