Teach our tests about special cases for VS 11
Teach the CheckCompilerRelatedVariables test to verify MSVC11. Update the special cases already in the Preprocess and VSExternalInclude tests for VS 10 to work for VS 11 too.
This commit is contained in:
parent
3d5632ed59
commit
3b5256e19e
|
@ -34,6 +34,9 @@ endif()
|
||||||
if(DEFINED MSVC10)
|
if(DEFINED MSVC10)
|
||||||
math(EXPR msvc_total "${msvc_total} + 1")
|
math(EXPR msvc_total "${msvc_total} + 1")
|
||||||
endif()
|
endif()
|
||||||
|
if(DEFINED MSVC11)
|
||||||
|
math(EXPR msvc_total "${msvc_total} + 1")
|
||||||
|
endif()
|
||||||
|
|
||||||
echo_var(MSVC)
|
echo_var(MSVC)
|
||||||
echo_var(MSVC60)
|
echo_var(MSVC60)
|
||||||
|
@ -42,6 +45,7 @@ echo_var(MSVC71)
|
||||||
echo_var(MSVC80)
|
echo_var(MSVC80)
|
||||||
echo_var(MSVC90)
|
echo_var(MSVC90)
|
||||||
echo_var(MSVC10)
|
echo_var(MSVC10)
|
||||||
|
echo_var(MSVC11)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
#
|
#
|
||||||
|
|
|
@ -37,6 +37,9 @@ endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
|
||||||
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
|
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
|
||||||
set(PP_VS100 1)
|
set(PP_VS100 1)
|
||||||
endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
|
endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
|
||||||
|
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11")
|
||||||
|
set(PP_VS110 1)
|
||||||
|
endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11")
|
||||||
|
|
||||||
# Some tests below check the PP_* variables set above. They are meant
|
# Some tests below check the PP_* variables set above. They are meant
|
||||||
# to test the case that the build tool is at fault. Other tests below
|
# to test the case that the build tool is at fault. Other tests below
|
||||||
|
@ -52,7 +55,7 @@ endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
|
||||||
# must not have it escaped inside the configured header.
|
# must not have it escaped inside the configured header.
|
||||||
set(STRING_EXTRA "")
|
set(STRING_EXTRA "")
|
||||||
|
|
||||||
if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100)
|
if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100 AND NOT PP_VS110)
|
||||||
# Borland, VS70 IDE: ;
|
# Borland, VS70 IDE: ;
|
||||||
# The Borland compiler will simply not accept a non-escaped semicolon
|
# The Borland compiler will simply not accept a non-escaped semicolon
|
||||||
# on the command line. If it is escaped \; then the escape character
|
# on the command line. If it is escaped \; then the escape character
|
||||||
|
|
|
@ -6,7 +6,7 @@ IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
|
||||||
ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
|
ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
|
||||||
SET(PROJECT_EXT vcproj)
|
SET(PROJECT_EXT vcproj)
|
||||||
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
|
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
|
||||||
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 10")
|
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01]")
|
||||||
SET(PROJECT_EXT vcxproj)
|
SET(PROJECT_EXT vcxproj)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ ADD_DEPENDENCIES(VSExternalInclude lib2)
|
||||||
# and the sln file can no longer be the only source
|
# and the sln file can no longer be the only source
|
||||||
# of that depend. So, for VS 10 make the executable
|
# of that depend. So, for VS 10 make the executable
|
||||||
# depend on lib1 and lib2
|
# depend on lib1 and lib2
|
||||||
IF(MSVC10)
|
IF(MSVC10 OR MSVC11)
|
||||||
ADD_DEPENDENCIES(VSExternalInclude lib1)
|
ADD_DEPENDENCIES(VSExternalInclude lib1)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue