[Cmake-commits] CMake branch, next, updated. v2.8.3-1078-g5035449

Bill Hoffman bill.hoffman at kitware.com
Wed Dec 22 15:47:40 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  503544980c38bacdde19255b0597db8151d0c7c4 (commit)
       via  753e2082851b67163dda4764e08c8ce9b84690fe (commit)
       via  16e7d4ba2c82081afea5af05bc6360b281d5e0c3 (commit)
      from  23f34ce710b820177bcb602557e34cef1655db8c (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=503544980c38bacdde19255b0597db8151d0c7c4
commit 503544980c38bacdde19255b0597db8151d0c7c4
Merge: 23f34ce 753e208
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Dec 22 15:47:29 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Dec 22 15:47:29 2010 -0500

    Merge topic 'add_preprocessor_def_vs2010_resources' into next
    
    753e208 Disable incremental testing for this test, it crashes vs9 linker.
    16e7d4b Add flags to resource builds on vs 2010 with a test.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=753e2082851b67163dda4764e08c8ce9b84690fe
commit 753e2082851b67163dda4764e08c8ce9b84690fe
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Dec 22 15:40:53 2010 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Wed Dec 22 15:40:53 2010 -0500

    Disable incremental testing for this test, it crashes vs9 linker.
    
    On windows 7 64 bit, the vs9 linker will crash when linking an
    application with a resource in it.

diff --git a/Tests/VSResource/CMakeLists.txt b/Tests/VSResource/CMakeLists.txt
index 8a71bd0..e842955 100644
--- a/Tests/VSResource/CMakeLists.txt
+++ b/Tests/VSResource/CMakeLists.txt
@@ -1,4 +1,7 @@
 cmake_minimum_required (VERSION 2.6)
 project (VSResource)
 add_definitions(/DCMAKE_RCDEFINE="test.txt")
+string(REPLACE "/INCREMENTAL:YES" ""
+  CMAKE_EXE_LINKER_FLAGS_DEBUG
+  "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
 add_executable(VSResource main.cpp test.rc)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16e7d4ba2c82081afea5af05bc6360b281d5e0c3
commit 16e7d4ba2c82081afea5af05bc6360b281d5e0c3
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Tue Dec 21 09:17:21 2010 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Tue Dec 21 09:20:57 2010 -0500

    Add flags to resource builds on vs 2010 with a test.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f78aeec..ebe36f2 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1139,10 +1139,13 @@ OutputIncludes(std::vector<std::string> const & includes)
 
 
 void cmVisualStudio10TargetGenerator::
-WriteRCOptions(std::string const& ,
+WriteRCOptions(std::string const& configName,
                std::vector<std::string> const & includes)
 {
   this->WriteString("<ResourceCompile>\n", 2);
+  Options& clOptions = *(this->ClOptions[configName]);
+  clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, "      ",
+                                          "\n");
   this->OutputIncludes(includes);
   this->WriteString("</ResourceCompile>\n", 2);
 }
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 04f0774..f7d3c18 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -246,7 +246,6 @@ IF(BUILD_TESTING)
          --test-command Simple)
       LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator")
     ENDIF ("${cmakeOutput}" MATCHES CodeBlocks)
-
     # check for the KDevelop3 generator
     IF ("${cmakeOutput}" MATCHES KDevelop3)
       ADD_TEST(Simple_KDevelop3Generator ${CMAKE_CTEST_COMMAND}
@@ -262,6 +261,17 @@ IF(BUILD_TESTING)
     ENDIF ("${cmakeOutput}" MATCHES KDevelop3)
 
   ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles"  OR  ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop")
+ ADD_TEST(VSResource ${CMAKE_CTEST_COMMAND}
+      --build-and-test
+      "${CMake_SOURCE_DIR}/Tests/VSResource"
+      "${CMake_BINARY_DIR}/Tests/VSResource"
+      --build-two-config
+      --build-generator ${CMAKE_TEST_GENERATOR}
+      --build-project VSResource
+      --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+      --test-command VSResource)
+    LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSResource")
+
 
   # test for correct sub-project generation
   # not implemented in VS6 or Xcode
diff --git a/Tests/VSResource/CMakeLists.txt b/Tests/VSResource/CMakeLists.txt
new file mode 100644
index 0000000..8a71bd0
--- /dev/null
+++ b/Tests/VSResource/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required (VERSION 2.6)
+project (VSResource)
+add_definitions(/DCMAKE_RCDEFINE="test.txt")
+add_executable(VSResource main.cpp test.rc)
diff --git a/Tests/VSResource/main.cpp b/Tests/VSResource/main.cpp
new file mode 100644
index 0000000..6f68df3
--- /dev/null
+++ b/Tests/VSResource/main.cpp
@@ -0,0 +1,10 @@
+#include <windows.h>
+
+int main(int argc, char** argv) {
+   HRSRC hello = ::FindResource(0, "hello", "TEXT");
+   if(hello) {
+      return 0;
+   } else {
+      return 1;
+   }
+}
diff --git a/Tests/VSResource/test.rc b/Tests/VSResource/test.rc
new file mode 100644
index 0000000..8aab8b7
--- /dev/null
+++ b/Tests/VSResource/test.rc
@@ -0,0 +1,5 @@
+#ifdef CMAKE_RCDEFINE
+hello TEXT DISCARDABLE CMAKE_RCDEFINE
+#else
+#error "resource compiler did not get defines from command line!"
+#endif
\ No newline at end of file
diff --git a/Tests/VSResource/test.txt b/Tests/VSResource/test.txt
new file mode 100644
index 0000000..980a0d5
--- /dev/null
+++ b/Tests/VSResource/test.txt
@@ -0,0 +1 @@
+Hello World!

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

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx |    5 ++++-
 Tests/CMakeLists.txt                       |   12 +++++++++++-
 Tests/VSResource/CMakeLists.txt            |    7 +++++++
 Tests/VSResource/main.cpp                  |   10 ++++++++++
 Tests/VSResource/test.rc                   |    5 +++++
 Tests/VSResource/test.txt                  |    1 +
 6 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 Tests/VSResource/CMakeLists.txt
 create mode 100644 Tests/VSResource/main.cpp
 create mode 100644 Tests/VSResource/test.rc
 create mode 100644 Tests/VSResource/test.txt


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list