diff options
author | Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> | 2017-11-07 14:50:02 (GMT) |
---|---|---|
committer | Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> | 2017-11-07 14:50:02 (GMT) |
commit | b551beb6facee72d1c1af455a9e4e8ecc7be959f (patch) | |
tree | ef8dd2abfbf125aa489755ab7eac9562b65de928 /Modules/FetchContent.cmake | |
parent | 277994eb43b6759dcb1f986b24aca614e5c4b9e0 (diff) | |
download | CMake-b551beb6facee72d1c1af455a9e4e8ecc7be959f.zip CMake-b551beb6facee72d1c1af455a9e4e8ecc7be959f.tar.gz CMake-b551beb6facee72d1c1af455a9e4e8ecc7be959f.tar.bz2 |
FetchContent: Support use of the module before "project()" command
Co-authored-by: Craig Scott <craig.scott@crascit.com>
Co-authored-by: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Modules/FetchContent.cmake')
-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 |