https://github.com/Kitware/CMake
Raw File
Tip revision: 1e2e12889b3550713cfcb86a9367c3046a6f56e9 authored by Brad King on 07 February 2019, 11:51:28 UTC
Merge branch 'cpack-ifw-error-wording' into release-3.14
Tip revision: 1e2e128
CMakeLists.txt
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 ""
  )
back to top