[Cmake-commits] CMake branch, next, updated. v2.8.9-322-g45b99a8

Brad King brad.king at kitware.com
Thu Aug 30 16:22:19 EDT 2012


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  45b99a8a90989b9265afa0461642baa956f484e5 (commit)
       via  16fa7b73958ca52bebd0d3a2dd6374bd391ed64d (commit)
      from  27543f471936dfe632d8b3046f95f23226779f3b (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=45b99a8a90989b9265afa0461642baa956f484e5
commit 45b99a8a90989b9265afa0461642baa956f484e5
Merge: 27543f4 16fa7b7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 30 16:22:17 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 30 16:22:17 2012 -0400

    Merge topic 'msvc-compiler-info' into next
    
    16fa7b7 VS: Fix MSVC_IDE definition recently broken by refactoring


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16fa7b73958ca52bebd0d3a2dd6374bd391ed64d
commit 16fa7b73958ca52bebd0d3a2dd6374bd391ed64d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 30 16:08:16 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Aug 30 16:18:05 2012 -0400

    VS: Fix MSVC_IDE definition recently broken by refactoring
    
    In commit 485a940e (VS: Simplify MSVC version reporting, 2012-08-23) we
    accidentally flipped the 0/1 values of MSVC_IDE.  Flip them back and
    teach the CheckCompilerRelatedVariables test to check the variable.

diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index b3cb19b..238aa24 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -56,9 +56,9 @@ enable_language(RC)
 set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
 
 if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
-  set(MSVC_IDE 0)
-else()
   set(MSVC_IDE 1)
+else()
+  set(MSVC_IDE 0)
 endif()
 
 if(NOT MSVC_VERSION)
diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
index 8b279a5..20001e6 100644
--- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
+++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
@@ -46,6 +46,7 @@ echo_var(MSVC80)
 echo_var(MSVC90)
 echo_var(MSVC10)
 echo_var(MSVC11)
+echo_var(MSVC_IDE)
 
 if(MSVC)
   #
@@ -60,6 +61,13 @@ if(MSVC)
   else()
     message(FATAL_ERROR "error: ${msvc_total} MSVC** variables are defined -- exactly 1 expected")
   endif()
+  if(NOT DEFINED MSVC_IDE)
+    message(FATAL_ERROR "MSVC_IDE not defined but should be!")
+  elseif("${CMAKE_GENERATOR}" MATCHES "Visual Studio" AND NOT MSVC_IDE)
+    message(FATAL_ERROR "MSVC_IDE is not true but should be (${CMAKE_GENERATOR})!")
+  elseif(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio" AND MSVC_IDE)
+    message(FATAL_ERROR "MSVC_IDE is true but should not be (${CMAKE_GENERATOR})!")
+  endif()
 else()
   #
   # The compiler is something other than cl... None of the MSVC** variables
@@ -70,6 +78,9 @@ else()
   else()
     message(FATAL_ERROR "error: ${msvc_total} MSVC** variables are defined -- exactly 0 expected")
   endif()
+  if(DEFINED MSVC_IDE)
+    message(FATAL_ERROR "MSVC_IDE is defined but should not be!")
+  endif()
 endif()
 
 

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

Summary of changes:
 Modules/Platform/Windows-MSVC.cmake                |    4 ++--
 Tests/CheckCompilerRelatedVariables/CMakeLists.txt |   11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list