mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE
This commit is contained in:
20
Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt
Normal file
20
Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt
Normal file
@@ -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 ""
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
all:
|
||||
echo "complete"
|
||||
Reference in New Issue
Block a user