diff options
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/CYGWIN-Clang-C.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/CYGWIN-Clang-CXX.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/Darwin-Clang.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/GHS-MULTI-Initialize.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Generic-ADSP-ASM.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 34 | ||||
-rw-r--r-- | Modules/Platform/Windows-df.cmake | 3 | ||||
-rw-r--r-- | Modules/Platform/gas.cmake | 2 |
8 files changed, 29 insertions, 18 deletions
diff --git a/Modules/Platform/CYGWIN-Clang-C.cmake b/Modules/Platform/CYGWIN-Clang-C.cmake new file mode 100644 index 0000000..e8343a4 --- /dev/null +++ b/Modules/Platform/CYGWIN-Clang-C.cmake @@ -0,0 +1 @@ +include(Platform/CYGWIN-GNU-C) diff --git a/Modules/Platform/CYGWIN-Clang-CXX.cmake b/Modules/Platform/CYGWIN-Clang-CXX.cmake new file mode 100644 index 0000000..67775de --- /dev/null +++ b/Modules/Platform/CYGWIN-Clang-CXX.cmake @@ -0,0 +1 @@ +include(Platform/CYGWIN-GNU-CXX) diff --git a/Modules/Platform/Darwin-Clang.cmake b/Modules/Platform/Darwin-Clang.cmake index 4cded47..61a5e0c 100644 --- a/Modules/Platform/Darwin-Clang.cmake +++ b/Modules/Platform/Darwin-Clang.cmake @@ -24,7 +24,7 @@ macro(__darwin_compiler_clang lang) set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names") set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot") set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=") - if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.1) + if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.2) set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ") endif() endmacro() diff --git a/Modules/Platform/GHS-MULTI-Initialize.cmake b/Modules/Platform/GHS-MULTI-Initialize.cmake index 9eb7a8a..6e6b4ff 100644 --- a/Modules/Platform/GHS-MULTI-Initialize.cmake +++ b/Modules/Platform/GHS-MULTI-Initialize.cmake @@ -15,7 +15,7 @@ #Setup Greenhills MULTI specific compilation information if (NOT GHS_INT_DIRECTORY) - #Assume the C:/ghs/int#### directory that is latest is prefered + #Assume the C:/ghs/int#### directory that is latest is preferred set(GHS_EXPECTED_ROOT "C:/ghs") if (EXISTS ${GHS_EXPECTED_ROOT}) FILE(GLOB GHS_CANDIDATE_INT_DIRS RELATIVE diff --git a/Modules/Platform/Generic-ADSP-ASM.cmake b/Modules/Platform/Generic-ADSP-ASM.cmake index 63a1388..e718bec 100644 --- a/Modules/Platform/Generic-ADSP-ASM.cmake +++ b/Modules/Platform/Generic-ADSP-ASM.cmake @@ -3,5 +3,5 @@ include(Platform/Generic-ADSP-Common) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm) set(CMAKE_ASM_OUTPUT_EXTENSION ".doj" ) set(CMAKE_ASM_COMPILE_OBJECT - "<CMAKE_ASM_COMPILER> <FLAGS> -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <OBJECT> <SOURCE>") + "<CMAKE_ASM_COMPILER> <INCLUDES> <FLAGS> -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <OBJECT> <SOURCE>") diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index a61413a..deaa88e 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -47,10 +47,6 @@ else() endif() set(CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS 1) -if(CMAKE_GENERATOR MATCHES "Visual Studio 6") - set (CMAKE_NO_BUILD_TYPE 1) - set(CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS 0) # not implemented for VS6 -endif() if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") set (CMAKE_NO_BUILD_TYPE 1) endif() @@ -194,8 +190,14 @@ else() if(_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM" OR _MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM") set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") elseif(MSVC_VERSION GREATER 1310) - set(_RTC1 "/RTC1") - set(_FLAGS_CXX " /GR /EHsc") + if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") + # Clang/C2 in MSVC14 Update 1 seems to not support -fsantinize (yet?) + # set(_RTC1 "-fsantinize=memory,safe-stack") + set(_FLAGS_CXX " -frtti -fexceptions") + else() + set(_RTC1 "/RTC1") + set(_FLAGS_CXX " /GR /EHsc") + endif() 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") else() set(_RTC1 "/GZ") @@ -296,11 +298,21 @@ macro(__windows_compiler_msvc lang) set(CMAKE_${lang}_LINK_EXECUTABLE "${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") - set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") + # note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects + # that include MS's own headers. CMake itself is affected project too. + set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD -O2 -D NDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD -gline-tables-only -O2 -fno-inline -D NDEBUG") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -Os -D NDEBUG") + else() + set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + endif() set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON) set(CMAKE_NINJA_DEPTYPE_${lang} msvc) diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake index 0beba73..b31cb11 100644 --- a/Modules/Platform/Windows-df.cmake +++ b/Modules/Platform/Windows-df.cmake @@ -30,9 +30,6 @@ set(CMAKE_Fortran_LINK_EXECUTABLE set(CMAKE_CREATE_WIN32_EXE /winapp) set(CMAKE_CREATE_CONSOLE_EXE ) -if(CMAKE_GENERATOR MATCHES "Visual Studio 6") - set (CMAKE_NO_BUILD_TYPE 1) -endif() if(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") set (CMAKE_NO_BUILD_TYPE 1) endif() diff --git a/Modules/Platform/gas.cmake b/Modules/Platform/gas.cmake index 7d2bc84..7c659f2 100644 --- a/Modules/Platform/gas.cmake +++ b/Modules/Platform/gas.cmake @@ -4,7 +4,7 @@ else() set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj) endif() -set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>") +set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>") set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> " |