mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location persistently across re-runs of CMake in a given build tree. For now we reject the option by default if explicitly set. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add a RunCMake.GeneratorInstance test to cover basic use cases for the option. Verify that `CMAKE_GENERATOR_INSTANCE` is empty by default, and that it is rejected when the generator does not support a user setting. Issue: #17268
8 lines
252 B
CMake
8 lines
252 B
CMake
if("x${CMAKE_GENERATOR_INSTANCE}" STREQUAL "x")
|
|
message(FATAL_ERROR "CMAKE_GENERATOR_INSTANCE is empty as expected.")
|
|
else()
|
|
message(FATAL_ERROR
|
|
"CMAKE_GENERATOR_INSTANCE is \"${CMAKE_GENERATOR_INSTANCE}\" "
|
|
"but should be empty!")
|
|
endif()
|