2005-01-20 20:30:03 +03:00
|
|
|
# try to load any previously computed information for C on this platform
|
2012-08-13 21:47:32 +04:00
|
|
|
include( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake OPTIONAL)
|
2006-02-14 18:51:36 +03:00
|
|
|
# try to load any previously computed information for CXX on this platform
|
2012-08-13 21:47:32 +04:00
|
|
|
include( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake OPTIONAL)
|
2005-01-20 20:30:03 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(WIN32 1)
|
2002-11-08 23:46:08 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
include(Platform/cl)
|
2006-08-09 21:45:13 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
|
|
|
|
set(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
|
2003-08-07 22:10:16 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
|
|
|
|
set (CMAKE_NO_BUILD_TYPE 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
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
|
2002-12-20 20:59:18 +03:00
|
|
|
"Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
|
2012-08-13 21:47:32 +04:00
|
|
|
mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2004-07-05 20:16:33 +04:00
|
|
|
# does the compiler support pdbtype and is it the newer compiler
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_GENERATOR MATCHES "Visual Studio 8")
|
|
|
|
set(CMAKE_COMPILER_2005 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2005-01-20 20:30:03 +03:00
|
|
|
|
2005-06-07 20:07:34 +04:00
|
|
|
# make sure to enable languages after setting configuration types
|
2012-08-13 21:47:32 +04:00
|
|
|
enable_language(RC)
|
|
|
|
set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
|
2005-06-07 20:07:34 +04:00
|
|
|
|
2010-05-04 05:29:08 +04:00
|
|
|
# for nmake we need to compute some information about the compiler
|
2005-01-20 20:30:03 +03:00
|
|
|
# that is being used.
|
|
|
|
# the compiler may be free command line, 6, 7, or 71, and
|
2010-05-04 05:29:08 +04:00
|
|
|
# each have properties that must be determined.
|
2005-01-20 20:30:03 +03:00
|
|
|
# to avoid running these tests with each cmake run, the
|
|
|
|
# test results are saved in CMakeCPlatform.cmake, a file
|
|
|
|
# that is automatically copied into try_compile directories
|
|
|
|
# by the global generator.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(MSVC_IDE 1)
|
|
|
|
if(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
|
|
|
|
set(MSVC_IDE 0)
|
|
|
|
if(NOT CMAKE_VC_COMPILER_TESTS_RUN)
|
|
|
|
set(CMAKE_VC_COMPILER_TESTS 1)
|
|
|
|
set(testNmakeCLVersionFile
|
2005-05-19 22:36:19 +04:00
|
|
|
"${CMAKE_ROOT}/Modules/CMakeTestNMakeCLVersion.c")
|
2012-08-13 21:47:32 +04:00
|
|
|
string(REGEX REPLACE "/" "\\\\" testNmakeCLVersionFile "${testNmakeCLVersionFile}")
|
|
|
|
message(STATUS "Check for CL compiler version")
|
|
|
|
set(CMAKE_TEST_COMPILER ${CMAKE_C_COMPILER})
|
|
|
|
if (NOT CMAKE_C_COMPILER)
|
|
|
|
set(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
exec_program(${CMAKE_TEST_COMPILER}
|
2012-08-13 21:42:58 +04:00
|
|
|
ARGS /nologo -EP \"${testNmakeCLVersionFile}\"
|
|
|
|
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
|
2004-09-22 22:42:05 +04:00
|
|
|
RETURN_VALUE CMAKE_COMPILER_RETURN
|
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT CMAKE_COMPILER_RETURN)
|
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
2005-05-19 22:36:19 +04:00
|
|
|
"Determining the version of compiler passed with the following output:\n"
|
|
|
|
"${CMAKE_COMPILER_OUTPUT}\n\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
string(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}")
|
|
|
|
string(REGEX REPLACE ".*VERSION=(.*)" "\\1"
|
2005-05-19 22:36:19 +04:00
|
|
|
compilerVersion "${compilerVersion}")
|
2012-08-13 21:47:32 +04:00
|
|
|
message(STATUS "Check for CL compiler version - ${compilerVersion}")
|
|
|
|
set(MSVC60)
|
|
|
|
set(MSVC70)
|
|
|
|
set(MSVC71)
|
|
|
|
set(MSVC80)
|
|
|
|
set(CMAKE_COMPILER_2005)
|
|
|
|
if("${compilerVersion}" LESS 1300)
|
|
|
|
set(MSVC60 1)
|
|
|
|
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if("${compilerVersion}" EQUAL 1300)
|
|
|
|
set(MSVC70 1)
|
|
|
|
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if("${compilerVersion}" EQUAL 1310)
|
|
|
|
set(MSVC71 1)
|
|
|
|
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if("${compilerVersion}" EQUAL 1400)
|
|
|
|
set(MSVC80 1)
|
|
|
|
set(CMAKE_COMPILER_2005 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if("${compilerVersion}" EQUAL 1500)
|
|
|
|
set(MSVC90 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if("${compilerVersion}" EQUAL 1600)
|
|
|
|
set(MSVC10 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(MSVC_VERSION "${compilerVersion}")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
message(STATUS "Check for CL compiler version - failed")
|
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
2005-05-19 22:36:19 +04:00
|
|
|
"Determining the version of compiler failed with the following output:\n"
|
|
|
|
"${CMAKE_COMPILER_OUTPUT}\n\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2004-09-22 22:42:05 +04:00
|
|
|
# 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.
|
2012-08-13 21:47:32 +04:00
|
|
|
make_directory("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2")
|
|
|
|
set(testForFreeVCFile
|
2005-05-19 22:36:19 +04:00
|
|
|
"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx")
|
2012-08-13 21:47:32 +04:00
|
|
|
string(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}")
|
|
|
|
message(STATUS "Check if this is a free VC compiler")
|
|
|
|
exec_program(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2
|
2004-09-22 22:42:05 +04:00
|
|
|
ARGS /nologo /MD /EHsc
|
2005-06-30 19:18:56 +04:00
|
|
|
\"${testForFreeVCFile}\"
|
2012-08-13 21:42:58 +04:00
|
|
|
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
|
2004-09-22 22:42:05 +04:00
|
|
|
RETURN_VALUE CMAKE_COMPILER_RETURN
|
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_COMPILER_RETURN)
|
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
2005-05-19 22:36:19 +04:00
|
|
|
"Determining if this is a free VC compiler failed with the following output:\n"
|
|
|
|
"${CMAKE_COMPILER_OUTPUT}\n\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
message(STATUS "Check if this is a free VC compiler - yes")
|
|
|
|
set(CMAKE_USING_VC_FREE_TOOLS 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
2005-05-19 22:36:19 +04:00
|
|
|
"Determining if this is a free VC compiler passed with the following output:\n"
|
|
|
|
"${CMAKE_COMPILER_OUTPUT}\n\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
message(STATUS "Check if this is a free VC compiler - no")
|
|
|
|
set(CMAKE_USING_VC_FREE_TOOLS 0)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
make_directory("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
|
|
|
if(MSVC_C_ARCHITECTURE_ID MATCHES 64)
|
|
|
|
set(CMAKE_CL_64 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_CL_64 0)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64)
|
|
|
|
set(CMAKE_CL_64 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
|
|
|
if("${MSVC_VERSION}" GREATER 1599)
|
|
|
|
set(MSVC_INCREMENTAL_DEFAULT ON)
|
|
|
|
endif()
|
2002-12-05 21:44:11 +03:00
|
|
|
|
2004-07-05 20:16:33 +04:00
|
|
|
# default to Debug builds
|
2012-08-13 21:47:32 +04:00
|
|
|
if(MSVC_VERSION GREATER 1310)
|
2006-03-03 20:01:04 +03:00
|
|
|
# for 2005 make sure the manifest is put in the dll with mt
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
|
|
|
|
set(CMAKE_CXX_CREATE_SHARED_MODULE "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE}")
|
2006-03-03 20:01:04 +03:00
|
|
|
# create a C shared library
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
|
2006-03-03 20:01:04 +03:00
|
|
|
# create a C shared module just copy the shared library rule
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")
|
|
|
|
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE}")
|
|
|
|
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE}")
|
|
|
|
|
|
|
|
set(CMAKE_BUILD_TYPE_INIT Debug)
|
|
|
|
set (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR")
|
|
|
|
set (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
|
|
|
|
set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
|
|
|
|
set (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
|
|
|
|
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
|
|
|
|
set (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
|
|
|
|
set (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
|
|
|
|
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")
|
|
|
|
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}")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_USING_VC_FREE_TOOLS)
|
|
|
|
message(STATUS "Using FREE VC TOOLS, NO DEBUG available")
|
|
|
|
set(CMAKE_BUILD_TYPE_INIT Release)
|
|
|
|
set (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR")
|
|
|
|
set (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ")
|
|
|
|
set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
|
|
|
|
set (CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
|
|
|
|
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
|
|
|
|
set (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
|
|
|
|
set (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ")
|
|
|
|
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")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
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")
|
|
|
|
set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
|
|
|
|
set (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
|
|
|
|
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
|
|
|
|
set (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
|
|
|
|
set (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ")
|
|
|
|
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")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
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")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
|
2004-07-05 20:16:33 +04:00
|
|
|
|
2002-11-12 02:10:30 +03:00
|
|
|
# executable linker flags
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
|
2006-07-26 19:15:28 +04:00
|
|
|
# set the stack size and the machine type
|
2012-08-13 21:47:32 +04:00
|
|
|
set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
|
|
|
|
if(NOT _MACHINE_ARCH_FLAG)
|
|
|
|
set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_EXE_LINKER_FLAGS_INIT
|
2009-11-20 05:58:42 +03:00
|
|
|
"${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
|
2006-07-26 19:15:28 +04:00
|
|
|
|
2010-05-04 05:29:08 +04:00
|
|
|
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
|
2006-07-26 19:15:28 +04:00
|
|
|
# on versions that support it
|
2012-08-13 21:47:32 +04:00
|
|
|
set( MSVC_INCREMENTAL_YES_FLAG "")
|
|
|
|
if(NOT MSVC_INCREMENTAL_DEFAULT)
|
|
|
|
set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")
|
|
|
|
else()
|
|
|
|
set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" )
|
|
|
|
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}")
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
|
|
|
|
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2006-07-26 19:15:28 +04:00
|
|
|
# for release and minsize release default to no incremental linking
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO")
|
2003-08-05 17:55:20 +04:00
|
|
|
|
2006-07-26 19:15:28 +04:00
|
|
|
# copy the EXE_LINKER flags to SHARED and MODULE linker flags
|
|
|
|
# shared linker flags
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
|
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
|
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
|
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
|
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
|
2006-07-26 19:15:28 +04:00
|
|
|
# module linker flags
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
|
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
|
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
|
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
|
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
|
2005-01-20 20:30:03 +03:00
|
|
|
|
|
|
|
# save computed information for this platform
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
|
|
|
|
configure_file(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
|
2006-06-14 20:28:32 +04:00
|
|
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCPlatform.cmake IMMEDIATE)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2006-02-14 18:51:36 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
|
|
|
|
configure_file(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
|
2006-06-14 20:28:32 +04:00
|
|
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|