summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-31 11:24:53 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-08-31 11:24:53 (GMT)
commit25b0d94678a99616d108ad9e93574b55f1d14e28 (patch)
treee1f6f872a0748dc26f804ee038fbaa761a3bf9e2 /Tests
parent4bc8879e847fcad84926828b57c740910a327f33 (diff)
parent16fa7b73958ca52bebd0d3a2dd6374bd391ed64d (diff)
downloadCMake-25b0d94678a99616d108ad9e93574b55f1d14e28.zip
CMake-25b0d94678a99616d108ad9e93574b55f1d14e28.tar.gz
CMake-25b0d94678a99616d108ad9e93574b55f1d14e28.tar.bz2
Merge topic 'msvc-compiler-info'
16fa7b7 VS: Fix MSVC_IDE definition recently broken by refactoring
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CheckCompilerRelatedVariables/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
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()