diff options
author | Brad King <brad.king@kitware.com> | 2015-04-21 11:32:22 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-22 08:48:52 -0400 |
commit | e1c6df392bae4f807bbc56f2c4320de412f48721 (patch) | |
tree | 6ef9578dcdbdd01d6ee5059374c56a590a326392 /Tests/RunCMake/ExternalProject | |
parent | c0502faa4b6c0a3c33d1b0dd346801ff8d4f8b0d (diff) | |
download | cmake-e1c6df392bae4f807bbc56f2c4320de412f48721.tar.gz |
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/ExternalProject')
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 0000000000..d00491fd7e --- /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 0000000000..1c0b6017b2 --- /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 0000000000..f7cfde1c24 --- /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 0000000000..d00491fd7e --- /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 0000000000..22e13bf9ae --- /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 0000000000..02894939b9 --- /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 0f5dcefb75..a82ffc96cf 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) |