summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProjectSubdir
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-21 14:38:17 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-21 14:40:52 (GMT)
commit1cf43dcf7c63a61e6254d102314b121623d2086d (patch)
tree3684409923c59ad668b14bec73d655d3b472e5e1 /Tests/ExternalProjectSubdir
parent5a5ef00106662da5c6400d76438289f505b4a1ff (diff)
downloadCMake-1cf43dcf7c63a61e6254d102314b121623d2086d.zip
CMake-1cf43dcf7c63a61e6254d102314b121623d2086d.tar.gz
CMake-1cf43dcf7c63a61e6254d102314b121623d2086d.tar.bz2
Tests: Add case to cover ExternalProject with subdirectories
Add an ExternalProjectSubdir test directory with a minimal test showing use of ExternalProject_Add for a source tree in a subdirectory. This will allow us to easily add test external projects that cover specific behavior where the client project must check results.
Diffstat (limited to 'Tests/ExternalProjectSubdir')
-rw-r--r--Tests/ExternalProjectSubdir/CMakeLists.txt14
-rw-r--r--Tests/ExternalProjectSubdir/Subdir1/CMakeLists.txt6
2 files changed, 20 insertions, 0 deletions
diff --git a/Tests/ExternalProjectSubdir/CMakeLists.txt b/Tests/ExternalProjectSubdir/CMakeLists.txt
new file mode 100644
index 0000000..fb5aa3c
--- /dev/null
+++ b/Tests/ExternalProjectSubdir/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 3.2)
+project(ExternalProjectSubdir NONE)
+include(ExternalProject)
+
+ExternalProject_Add(Subdir1
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Subdir1
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Subdir1
+
+ CMAKE_ARGS -DNORMAL_VAR=NORMAL_VALUE
+ LOG_CONFIGURE 1
+
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ )
diff --git a/Tests/ExternalProjectSubdir/Subdir1/CMakeLists.txt b/Tests/ExternalProjectSubdir/Subdir1/CMakeLists.txt
new file mode 100644
index 0000000..8b0653a
--- /dev/null
+++ b/Tests/ExternalProjectSubdir/Subdir1/CMakeLists.txt
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 3.2)
+project(Subdir1 NONE)
+
+if(NOT "${NORMAL_VAR}" STREQUAL "NORMAL_VALUE")
+ message(SEND_ERROR "NORMAL_VAR != 'NORMAL_VALUE'")
+endif()