summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-cl.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/Platform/Windows-cl.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules/Platform/Windows-cl.cmake')
-rw-r--r--Modules/Platform/Windows-cl.cmake56
1 files changed, 28 insertions, 28 deletions
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index 216419f..05df946 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -12,17 +12,17 @@ set(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
set (CMAKE_NO_BUILD_TYPE 1)
-endif(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+endif()
if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
set (CMAKE_NO_BUILD_TYPE 1)
set (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
"Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
-endif(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
+endif()
# does the compiler support pdbtype and is it the newer compiler
if(CMAKE_GENERATOR MATCHES "Visual Studio 8")
set(CMAKE_COMPILER_2005 1)
-endif(CMAKE_GENERATOR MATCHES "Visual Studio 8")
+endif()
# make sure to enable languages after setting configuration types
enable_language(RC)
@@ -48,7 +48,7 @@ if(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
set(CMAKE_TEST_COMPILER ${CMAKE_C_COMPILER})
if (NOT CMAKE_C_COMPILER)
set(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER})
- endif(NOT CMAKE_C_COMPILER)
+ endif()
exec_program(${CMAKE_TEST_COMPILER}
ARGS /nologo -EP \"${testNmakeCLVersionFile}\"
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
@@ -70,32 +70,32 @@ if(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
if("${compilerVersion}" LESS 1300)
set(MSVC60 1)
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 1)
- endif("${compilerVersion}" LESS 1300)
+ endif()
if("${compilerVersion}" EQUAL 1300)
set(MSVC70 1)
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
- endif("${compilerVersion}" EQUAL 1300)
+ endif()
if("${compilerVersion}" EQUAL 1310)
set(MSVC71 1)
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
- endif("${compilerVersion}" EQUAL 1310)
+ endif()
if("${compilerVersion}" EQUAL 1400)
set(MSVC80 1)
set(CMAKE_COMPILER_2005 1)
- endif("${compilerVersion}" EQUAL 1400)
+ endif()
if("${compilerVersion}" EQUAL 1500)
set(MSVC90 1)
- endif("${compilerVersion}" EQUAL 1500)
+ endif()
if("${compilerVersion}" EQUAL 1600)
set(MSVC10 1)
- endif("${compilerVersion}" EQUAL 1600)
+ endif()
set(MSVC_VERSION "${compilerVersion}")
- else(NOT CMAKE_COMPILER_RETURN)
+ else()
message(STATUS "Check for CL compiler version - failed")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining the version of compiler failed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
- endif(NOT CMAKE_COMPILER_RETURN)
+ endif()
# try to figure out if we are running the free command line
# tools from Microsoft. These tools do not provide debug libraries,
# so the link flags used have to be different.
@@ -116,25 +116,25 @@ if(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
"${CMAKE_COMPILER_OUTPUT}\n\n")
message(STATUS "Check if this is a free VC compiler - yes")
set(CMAKE_USING_VC_FREE_TOOLS 1)
- else(CMAKE_COMPILER_RETURN)
+ else()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if this is a free VC compiler passed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
message(STATUS "Check if this is a free VC compiler - no")
set(CMAKE_USING_VC_FREE_TOOLS 0)
- endif(CMAKE_COMPILER_RETURN)
+ endif()
make_directory("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3")
- endif(NOT CMAKE_VC_COMPILER_TESTS_RUN)
-endif(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
+ endif()
+endif()
if(MSVC_C_ARCHITECTURE_ID MATCHES 64)
set(CMAKE_CL_64 1)
-else(MSVC_C_ARCHITECTURE_ID MATCHES 64)
+else()
set(CMAKE_CL_64 0)
-endif(MSVC_C_ARCHITECTURE_ID MATCHES 64)
+endif()
if(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64)
set(CMAKE_CL_64 1)
-endif(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64)
+endif()
if("${MSVC_VERSION}" GREATER 1599)
set(MSVC_INCREMENTAL_DEFAULT ON)
@@ -165,7 +165,7 @@ if(MSVC_VERSION GREATER 1310)
set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
set (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ")
set (CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT}")
-else(MSVC_VERSION GREATER 1310)
+else()
if(CMAKE_USING_VC_FREE_TOOLS)
message(STATUS "Using FREE VC TOOLS, NO DEBUG available")
set(CMAKE_BUILD_TYPE_INIT Release)
@@ -179,7 +179,7 @@ else(MSVC_VERSION GREATER 1310)
set (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
set (CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
- else(CMAKE_USING_VC_FREE_TOOLS)
+ else()
set(CMAKE_BUILD_TYPE_INIT Debug)
set (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR")
set (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ")
@@ -191,9 +191,9 @@ else(MSVC_VERSION GREATER 1310)
set (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
set (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
- endif(CMAKE_USING_VC_FREE_TOOLS)
+ endif()
set (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib")
-endif(MSVC_VERSION GREATER 1310)
+endif()
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
@@ -203,7 +203,7 @@ set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
if(NOT _MACHINE_ARCH_FLAG)
set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
-endif(NOT _MACHINE_ARCH_FLAG)
+endif()
set (CMAKE_EXE_LINKER_FLAGS_INIT
"${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
@@ -219,10 +219,10 @@ endif()
if (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")
-else (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+else ()
set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
-endif (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+endif ()
# for release and minsize release default to no incremental linking
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO")
@@ -245,9 +245,9 @@ set (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZER
if(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
configure_file(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCPlatform.cmake IMMEDIATE)
-endif(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
+endif()
if(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
configure_file(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE)
-endif(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
+endif()