>> 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. > > The cmSystemTools::GetFileFormat is supposed to have been replaced > by cmSourceFile::GetLanguage and cmGeneratorTarget source classification > logic that uses the tables like that in CMakeCXXCompiler. > > The only cmSystemTools::GetFileFormat call site I see left is in > cmQtAutoGenerators::SetupSourceFiles, and that does not care about > RESOURCE_FILE_FORMAT. In what context does your patch affect anything?
hmmm, then this probably got shadowed in my project when setting the source file language directly :/ does this look better? (cannot test atm, as i'm on a different machine) thx, tim
>From e42b5ee3979c0b2e9b72d737c858830a865174ca Mon Sep 17 00:00:00 2001 From: Tim Blechmann <t...@klingt.org> Date: Fri, 6 Jun 2014 15:47:29 +0200 Subject: [PATCH] CMakeRCCompiler: 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> --- Modules/CMakeRCCompiler.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/CMakeRCCompiler.cmake.in b/Modules/CMakeRCCompiler.cmake.in index 0fc3142..8257cd6 100644 --- a/Modules/CMakeRCCompiler.cmake.in +++ b/Modules/CMakeRCCompiler.cmake.in @@ -1,6 +1,6 @@ set(CMAKE_RC_COMPILER "@CMAKE_RC_COMPILER@") set(CMAKE_RC_COMPILER_ARG1 "@CMAKE_RC_COMPILER_ARG1@") set(CMAKE_RC_COMPILER_LOADED 1) -set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc) +set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) set(CMAKE_RC_OUTPUT_EXTENSION @CMAKE_RC_OUTPUT_EXTENSION@) set(CMAKE_RC_COMPILER_ENV_VAR "RC") -- 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