summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-MSVC.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-29 17:30:17 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-29 17:40:47 (GMT)
commit02f566a5592ac0438f03a84d713bae6913a7e39a (patch)
treeb72ec9c1f3c9fe38d1ababe5541ed9ae97d8fc42 /Modules/Platform/Windows-MSVC.cmake
parentb601bb6f1c30c97e21ea893e8c84b05aab97fcb4 (diff)
downloadCMake-02f566a5592ac0438f03a84d713bae6913a7e39a.zip
CMake-02f566a5592ac0438f03a84d713bae6913a7e39a.tar.gz
CMake-02f566a5592ac0438f03a84d713bae6913a7e39a.tar.bz2
MSVC: Factor out enable_language(RC) call into helper macro
This will be useful to call from elsewhere later.
Diffstat (limited to 'Modules/Platform/Windows-MSVC.cmake')
-rw-r--r--Modules/Platform/Windows-MSVC.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index ae180ed..73906c6 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -366,12 +366,15 @@ macro(__windows_compiler_msvc lang)
endif()
set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
set(CMAKE_NINJA_DEPTYPE_${lang} msvc)
+ __windows_compiler_msvc_enable_rc("${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}")
+endmacro()
+macro(__windows_compiler_msvc_enable_rc flags)
if(NOT CMAKE_RC_COMPILER_INIT)
set(CMAKE_RC_COMPILER_INIT rc)
endif()
if(NOT CMAKE_RC_FLAGS_INIT)
- string(APPEND CMAKE_RC_FLAGS_INIT " ${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}")
+ string(APPEND CMAKE_RC_FLAGS_INIT " ${flags}")
endif()
if(NOT CMAKE_RC_FLAGS_DEBUG_INIT)
string(APPEND CMAKE_RC_FLAGS_DEBUG_INIT " /D_DEBUG")