diff options
author | Máté Ferenc Nagy-Egri <mate@streamhpc.com> | 2023-02-10 06:32:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-23 22:07:50 (GMT) |
commit | 9af0e67ee506b81421169c1828a558a71941b13c (patch) | |
tree | 5b9dbd8b78fb95d5ed586f241a52b68b1ebd0904 | |
parent | 917f675b9ee6910f6a05f5a01b619a845a581f85 (diff) | |
download | CMake-9af0e67ee506b81421169c1828a558a71941b13c.zip CMake-9af0e67ee506b81421169c1828a558a71941b13c.tar.gz CMake-9af0e67ee506b81421169c1828a558a71941b13c.tar.bz2 |
FetchContent: Relay CMAKE_GENERATOR_INSTANCE
If set, relay `CMAKE_GENERATOR_INSTANCE`. It may affect compiler
detection in the subbuild folder.
Fixes: #24404
-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 8afb9bc..a6250cc 100644 --- a/Modules/FetchContent.cmake +++ b/Modules/FetchContent.cmake @@ -1536,7 +1536,9 @@ ExternalProject_Add_Step(${contentName}-populate copyfile if(CMAKE_GENERATOR_TOOLSET) list(APPEND subCMakeOpts "-T${CMAKE_GENERATOR_TOOLSET}") endif() - + if(CMAKE_GENERATOR_INSTANCE) + list(APPEND subCMakeOpts "-DCMAKE_GENERATOR_INSTANCE:INTERNAL=${CMAKE_GENERATOR_INSTANCE}") + endif() if(CMAKE_MAKE_PROGRAM) list(APPEND subCMakeOpts "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}") endif() |