diff options
author | Brad King <brad.king@kitware.com> | 2019-07-01 13:52:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-01 13:54:19 (GMT) |
commit | ecee33c3ae2396a46e7576277a3db3872d28dda1 (patch) | |
tree | b081b110df8589082ea559dd14aedf990000b618 /Modules | |
parent | dd433c98e4297cc4b7bfeaa510f4c2cc84ea9da4 (diff) | |
parent | d2f20ab217c3e21bb573a3d4b1f90b1248f5b8b3 (diff) | |
download | CMake-ecee33c3ae2396a46e7576277a3db3872d28dda1.zip CMake-ecee33c3ae2396a46e7576277a3db3872d28dda1.tar.gz CMake-ecee33c3ae2396a46e7576277a3db3872d28dda1.tar.bz2 |
Merge topic 'override-rules-RC'
d2f20ab217 RC: Honor CMAKE_USER_MAKE_RULES_OVERRIDE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3489
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeRCInformation.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index 7bf6567..7c3a5ab 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -17,6 +17,17 @@ set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. +if(CMAKE_USER_MAKE_RULES_OVERRIDE) + # Save the full path of the file so try_compile can use it. + include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override) + set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}") +endif() + set(CMAKE_RC_FLAGS_INIT "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}") cmake_initialize_per_config_variable(CMAKE_RC_FLAGS "Flags for Windows Resource Compiler") |