[Cmake-commits] CMake branch, next, updated. v2.8.3-1105-gf106a8f

Bill Hoffman bill.hoffman at kitware.com
Tue Dec 28 11:00:11 EST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  f106a8f529319a08451bf4abc84903be528a119f (commit)
       via  960ace1e0b5e1b4c699304b01c465e5b8f01bdbd (commit)
       via  060d6e885e5a8c2828f97a1164ed01119dbe9244 (commit)
       via  b2f308c8f9b4ded77f0693b39c0288e3bbb00977 (commit)
      from  9cdbb403f8832f97f1895ce109923b3a631a1021 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f106a8f529319a08451bf4abc84903be528a119f
commit f106a8f529319a08451bf4abc84903be528a119f
Merge: 9cdbb40 960ace1
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Tue Dec 28 11:00:00 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 28 11:00:00 2010 -0500

    Merge topic 'add_support_for_windres' into next
    
    960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
    060d6e8 Add support for windres to cygwin.
    b2f308c Add support for windows resources with mingw/msys.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=960ace1e0b5e1b4c699304b01c465e5b8f01bdbd
commit 960ace1e0b5e1b4c699304b01c465e5b8f01bdbd
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Tue Dec 28 10:58:20 2010 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Tue Dec 28 10:58:20 2010 -0500

    Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
    
    This commit should test windows resources on all platforms where they are
    supported now.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 8f29641..6099758 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -131,7 +131,18 @@ IF(BUILD_TESTING)
   ADD_TEST_MACRO(TarTest TarTest)
   ADD_TEST_MACRO(SystemInformation SystemInformation)
   ADD_TEST_MACRO(MathTest MathTest)
-  IF(MSVC)
+  # assume no resources building to test
+  SET(TEST_RESOURCES FALSE)
+  # for windows and cygwin assume we have resources
+  IF(WIN32 OR CYGWIN)
+    SET(TEST_RESOURCES TRUE)
+  ENDIF()
+  # for borland and watcom there is no resource support
+  IF(("${CMAKE_TEST_GENERATOR}" MATCHES "WMake") OR
+      ("${CMAKE_TEST_GENERATOR}" MATCHES "Borland"))
+    SET(TEST_RESOURCES FALSE)
+  ENDIF()
+  IF(TEST_RESOURCES)
     ADD_TEST_MACRO(VSResource VSResource)
   ENDIF()
   ADD_TEST_MACRO(Simple Simple)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=060d6e885e5a8c2828f97a1164ed01119dbe9244
commit 060d6e885e5a8c2828f97a1164ed01119dbe9244
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu Dec 23 15:53:47 2010 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Thu Dec 23 17:04:50 2010 -0500

    Add support for windres to cygwin.

diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake
index 6f72a75..5aad45b 100644
--- a/Modules/Platform/CYGWIN-GNU.cmake
+++ b/Modules/Platform/CYGWIN-GNU.cmake
@@ -24,7 +24,8 @@ set(CMAKE_CREATE_WIN32_EXE  "-mwindows")
 
 set(CMAKE_GNULD_IMAGE_VERSION
   "-Wl,--major-image-version,<TARGET_VERSION_MAJOR>,--minor-image-version,<TARGET_VERSION_MINOR>")
-
+set(CMAKE_GENERATOR_RC windres)
+enable_language(RC)
 macro(__cygwin_compiler_gnu lang)
   # Binary link rules.
   set(CMAKE_${lang}_CREATE_SHARED_MODULE
diff --git a/Modules/Platform/CYGWIN-windres.cmake b/Modules/Platform/CYGWIN-windres.cmake
new file mode 100644
index 0000000..8bc1b15
--- /dev/null
+++ b/Modules/Platform/CYGWIN-windres.cmake
@@ -0,0 +1 @@
+SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2f308c8f9b4ded77f0693b39c0288e3bbb00977
commit b2f308c8f9b4ded77f0693b39c0288e3bbb00977
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Dec 22 15:26:30 2010 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Thu Dec 23 17:04:49 2010 -0500

    Add support for windows resources with mingw/msys.

diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake
index 094b893..8e085af 100644
--- a/Modules/CMakeDetermineRCCompiler.cmake
+++ b/Modules/CMakeDetermineRCCompiler.cmake
@@ -54,6 +54,12 @@ ENDIF(NOT CMAKE_RC_COMPILER)
 
 MARK_AS_ADVANCED(CMAKE_RC_COMPILER)  
 
+GET_FILENAME_COMPONENT(_CMAKE_RC_COMPILER_NAME_WE ${CMAKE_RC_COMPILER} NAME_WE)
+IF(_CMAKE_RC_COMPILER_NAME_WE STREQUAL "windres")
+  SET(CMAKE_RC_OUTPUT_EXTENSION .obj)
+ELSE()
+  SET(CMAKE_RC_OUTPUT_EXTENSION .res)
+ENDIF()
 
 # configure variables set in this file for fast reload later on
 CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in 
diff --git a/Modules/CMakeRCCompiler.cmake.in b/Modules/CMakeRCCompiler.cmake.in
index 93bc850..83428e2 100644
--- a/Modules/CMakeRCCompiler.cmake.in
+++ b/Modules/CMakeRCCompiler.cmake.in
@@ -2,5 +2,5 @@ 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_OUTPUT_EXTENSION .res)
+SET(CMAKE_RC_OUTPUT_EXTENSION @CMAKE_RC_OUTPUT_EXTENSION@)
 SET(CMAKE_RC_COMPILER_ENV_VAR "RC")
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index ac635a5..7084b83 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -56,6 +56,8 @@ if("${_help}" MATCHES "GNU ld .* 2\\.1[1-6]")
   set(__WINDOWS_GNU_LD_RESPONSE 0)
 endif()
 
+enable_language(RC)
+
 macro(__windows_compiler_gnu lang)
 
   if(MSYS OR MINGW)
diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake
new file mode 100644
index 0000000..8bc1b15
--- /dev/null
+++ b/Modules/Platform/Windows-windres.cmake
@@ -0,0 +1 @@
+SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")
diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx
index d324e59..820e7e6 100644
--- a/Source/cmGlobalMSYSMakefileGenerator.cxx
+++ b/Source/cmGlobalMSYSMakefileGenerator.cxx
@@ -69,9 +69,16 @@ void cmGlobalMSYSMakefileGenerator
     {
     gxx = tgxx;
     }
+  std::string trc = cmSystemTools::FindProgram("windres", locations);
+  std::string rc = "windres.exe";
+  if(trc.size())
+    {
+    rc = trc;
+    }
   mf->AddDefinition("MSYS", "1");
   mf->AddDefinition("CMAKE_GENERATOR_CC", gcc.c_str());
   mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx.c_str());
+  mf->AddDefinition("CMAKE_GENERATOR_RC", rc.c_str());
   this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
 
   if(!mf->IsSet("CMAKE_AR") &&
diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx
index 9f9d1be..2f558dc 100644
--- a/Source/cmGlobalMinGWMakefileGenerator.cxx
+++ b/Source/cmGlobalMinGWMakefileGenerator.cxx
@@ -44,8 +44,15 @@ void cmGlobalMinGWMakefileGenerator
     {
     gxx = tgxx;
     }
+  std::string trc = cmSystemTools::FindProgram("windres", locations);
+  std::string rc = "windres.exe";
+  if(trc.size())
+    {
+    rc = trc;
+    }
   mf->AddDefinition("CMAKE_GENERATOR_CC", gcc.c_str());
   mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx.c_str());
+  mf->AddDefinition("CMAKE_GENERATOR_RC", rc.c_str());
   this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
 }
 

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeDetermineRCCompiler.cmake    |    6 ++++++
 Modules/CMakeRCCompiler.cmake.in          |    2 +-
 Modules/Platform/CYGWIN-GNU.cmake         |    3 ++-
 Modules/Platform/CYGWIN-windres.cmake     |    1 +
 Modules/Platform/Windows-GNU.cmake        |    2 ++
 Modules/Platform/Windows-windres.cmake    |    1 +
 Source/cmGlobalMSYSMakefileGenerator.cxx  |    7 +++++++
 Source/cmGlobalMinGWMakefileGenerator.cxx |    7 +++++++
 Tests/CMakeLists.txt                      |   13 ++++++++++++-
 9 files changed, 39 insertions(+), 3 deletions(-)
 create mode 100644 Modules/Platform/CYGWIN-windres.cmake
 create mode 100644 Modules/Platform/Windows-windres.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list