summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-MSVC.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-25 16:15:51 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-25 16:16:51 (GMT)
commit4300de3e2759810ddfd253352eb42cd7f3514c85 (patch)
tree88656c182a5b95633b7815f43b5e047f5b06dcad /Modules/Platform/Windows-MSVC.cmake
parent1de4a0fb09fded1401ecb1aeaecb1159ae46a3c6 (diff)
downloadCMake-4300de3e2759810ddfd253352eb42cd7f3514c85.zip
CMake-4300de3e2759810ddfd253352eb42cd7f3514c85.tar.gz
CMake-4300de3e2759810ddfd253352eb42cd7f3514c85.tar.bz2
RC: Enable language after C, CXX, or Fortran is enabled (#15404)
The RC language is special in that it is automatically enabled on Windows-based platforms when another primary language is enabled. Move enablement of RC from early in the enablement of the other language to late. This will allow it to use information detected as part of enabling C, CXX, or Fortran.
Diffstat (limited to 'Modules/Platform/Windows-MSVC.cmake')
-rw-r--r--Modules/Platform/Windows-MSVC.cmake5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index b101b63..7ac299a 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -53,9 +53,6 @@ if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
set (CMAKE_NO_BUILD_TYPE 1)
endif()
-# make sure to enable languages after setting configuration types
-enable_language(RC)
-
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
set(MSVC_IDE 1)
else()
@@ -273,4 +270,6 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
+
+ enable_language(RC)
endmacro()