diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2019-01-17 18:34:45 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2019-01-17 18:40:30 (GMT) |
commit | c09ec7998148e3c69bf0c7fd2d626a6ccc23e37e (patch) | |
tree | de68ca2e357a41d02e58a23c87ecb020c9288899 /Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt | |
parent | 68e20f674a48be38d60e129f600faf7c483f2b97 (diff) | |
download | CMake-c09ec7998148e3c69bf0c7fd2d626a6ccc23e37e.zip CMake-c09ec7998148e3c69bf0c7fd2d626a6ccc23e37e.tar.gz CMake-c09ec7998148e3c69bf0c7fd2d626a6ccc23e37e.tar.bz2 |
ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE
Diffstat (limited to 'Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt')
-rw-r--r-- | Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt b/Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt new file mode 100644 index 0000000..f64df1a --- /dev/null +++ b/Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.6) +project(ExternalProjectSourceSubdirNotCMake NONE) +include(ExternalProject) + +find_program(MAKE_EXECUTABLE + NAMES gmake make) + +if (NOT MAKE_EXECUTABLE) + message("No `make` executable found; skipping") + return () +endif () + +ExternalProject_Add(Example + SOURCE_SUBDIR subdir + BUILD_IN_SOURCE 1 + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Example + CONFIGURE_COMMAND "" + BUILD_COMMAND "${MAKE_EXECUTABLE}" + INSTALL_COMMAND "" + ) |