summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2017-11-10 05:24:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-10 05:24:50 (GMT)
commit0d7086e3daa67d6679f5ab01d9b187c333cca627 (patch)
treead9e400176034cc4b9c76ed03efc761968b45b09
parent6afc841e74cf15bab2bf30966a4ea277d9fff33f (diff)
parentb551beb6facee72d1c1af455a9e4e8ecc7be959f (diff)
downloadCMake-0d7086e3daa67d6679f5ab01d9b187c333cca627.zip
CMake-0d7086e3daa67d6679f5ab01d9b187c333cca627.tar.gz
CMake-0d7086e3daa67d6679f5ab01d9b187c333cca627.tar.bz2
Merge topic 'fetchcontent-support-use-before-project-command'
b551beb6 FetchContent: Support use of the module before "project()" command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1448
-rw-r--r--Modules/FetchContent.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 132354f..98cdf6c 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -754,7 +754,9 @@ function(__FetchContent_directPopulate contentName)
list(APPEND generatorOpts "-T${CMAKE_GENERATOR_TOOLSET}")
endif()
- list(APPEND generatorOpts "-DCMAKE_MAKE_PROGRAM:FILE=${CMAKE_MAKE_PROGRAM}")
+ if(CMAKE_MAKE_PROGRAM)
+ list(APPEND generatorOpts "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}")
+ endif()
else()
# Likely we've been invoked via CMake's script mode where no