hi all, i've came across, that .rc files are treated as windows resources, but not upper-case .RC files. attached patch tries to correct this. it is a functional change, though it brings the implementation in line with Modules/CMakeCXXCompiler.cmake.in and the like.
would be great if someone could review and/or commit it. thanks a lot, tim
>From 0e41cb7df9dcb2587d928504c042a8ed0b51bc39 Mon Sep 17 00:00:00 2001 From: Tim Blechmann <t...@klingt.org> Date: Fri, 6 Jun 2014 09:59:33 +0200 Subject: [PATCH] SystemTools: handle RC as resource file format extension .RC files are not recorgnized as resource files by GetFileFormat, though the CMakeLangCompiler.cmake.in files list this file extension: Modules/CMakeCXXCompiler.cmake.in: set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) this patch resolve this inconsistency Signed-off-by: Tim Blechmann <t...@klingt.org> --- Source/cmSystemTools.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ff05975..4b91aaa 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1222,7 +1222,8 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext) ext == "in" || ext == ".in" || ext == "txx" || ext == ".txx" ) { return cmSystemTools::HEADER_FILE_FORMAT; } - if ( ext == "rc" || ext == ".rc" ) + if ( ext == "rc" || ext == ".rc" || + ext == "RC" || ext == ".RC") { return cmSystemTools::RESOURCE_FILE_FORMAT; } if ( ext == "def" || ext == ".def" ) { return cmSystemTools::DEFINITION_FILE_FORMAT; } -- 2.0.0
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers