diff options
author | Craig Scott <craig.scott@crascit.com> | 2017-11-10 05:24:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-10 05:24:50 (GMT) |
commit | 0d7086e3daa67d6679f5ab01d9b187c333cca627 (patch) | |
tree | ad9e400176034cc4b9c76ed03efc761968b45b09 | |
parent | 6afc841e74cf15bab2bf30966a4ea277d9fff33f (diff) | |
parent | b551beb6facee72d1c1af455a9e4e8ecc7be959f (diff) | |
download | CMake-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.cmake | 4 |
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 |