diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2016-08-15 18:42:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-16 17:18:18 (GMT) |
commit | a8345d65f359d75efb057d22976cfb92b4d477cf (patch) | |
tree | 5335376db115c6bedbda84cf5169d33ec29ba622 /Tests/ExternalProjectSourceSubdir | |
parent | f59513140bf086eda2029c5b4e950fc58216c06e (diff) | |
download | CMake-a8345d65f359d75efb057d22976cfb92b4d477cf.zip CMake-a8345d65f359d75efb057d22976cfb92b4d477cf.tar.gz CMake-a8345d65f359d75efb057d22976cfb92b4d477cf.tar.bz2 |
ExternalProject: Add SOURCE_SUBDIR option
Add a new SOURCE_SUBDIR option to ExternalProject_Add that allows
specifying the location of the CMakeLists.txt to use as the project root
relative to the SOURCE_DIR.
This is helpful for projects that have unusual layouts, or projects that
provide both a superbuild and project-only build depending on which
CMakeLists.txt is used.
Fixes: #15118
Diffstat (limited to 'Tests/ExternalProjectSourceSubdir')
-rw-r--r-- | Tests/ExternalProjectSourceSubdir/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ExternalProjectSourceSubdir/CMakeLists.txt b/Tests/ExternalProjectSourceSubdir/CMakeLists.txt new file mode 100644 index 0000000..4688acf --- /dev/null +++ b/Tests/ExternalProjectSourceSubdir/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.6) +project(ExternalProjectSourceSubdir NONE) +include(ExternalProject) + +ExternalProject_Add(Example + SOURCE_SUBDIR subdir + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Example + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Example + INSTALL_COMMAND "" + ) diff --git a/Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt b/Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt new file mode 100644 index 0000000..bbc3ca0 --- /dev/null +++ b/Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ +cmake_minimum_required(VERSION 3.0) +project(empty) |