summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeASM-ATTInformation.cmake3
-rw-r--r--Modules/CMakeASMCompiler.cmake.in1
-rw-r--r--Modules/CMakeASMInformation.cmake21
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake86
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake7
-rw-r--r--Modules/Compiler/GNU-ASM.cmake6
-rw-r--r--Modules/Compiler/HP-ASM.cmake3
-rw-r--r--Modules/Compiler/HP-C.cmake3
-rw-r--r--Modules/Compiler/HP-CXX.cmake3
-rw-r--r--Modules/Compiler/Intel-ASM.cmake13
-rw-r--r--Modules/Compiler/SunPro-ASM.cmake24
-rw-r--r--Modules/Compiler/XL-ASM.cmake13
-rw-r--r--Modules/Platform/AIX-GNU.cmake2
-rw-r--r--Modules/Platform/AIX-XL-ASM.cmake2
-rw-r--r--Modules/Platform/AIX-XL-C.cmake6
-rw-r--r--Modules/Platform/AIX-XL-CXX.cmake6
-rw-r--r--Modules/Platform/AIX-XL-Fortran.cmake6
-rw-r--r--Modules/Platform/AIX-XL.cmake28
-rw-r--r--Modules/Platform/AIX.cmake2
-rw-r--r--Modules/Platform/Windows-Intel-ASM.cmake2
20 files changed, 206 insertions, 31 deletions
diff --git a/Modules/CMakeASM-ATTInformation.cmake b/Modules/CMakeASM-ATTInformation.cmake
index abf560b..cb1f5d6 100644
--- a/Modules/CMakeASM-ATTInformation.cmake
+++ b/Modules/CMakeASM-ATTInformation.cmake
@@ -18,5 +18,8 @@ SET(ASM_DIALECT "-ATT")
# *.S files are supposed to be preprocessed, so they should not be passed to
# assembler but should be processed by gcc
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
+
+SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
+
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)
diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in
index 230805b..2dc24b0 100644
--- a/Modules/CMakeASMCompiler.cmake.in
+++ b/Modules/CMakeASMCompiler.cmake.in
@@ -4,6 +4,7 @@ SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_LINKER "@CMAKE_LINKER@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1)
+SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@")
SET(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index b94303e..d50f351 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -12,8 +12,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
-
IF(UNIX)
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
ELSE(UNIX)
@@ -34,6 +32,9 @@ IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
IF(NOT _INCLUDED_FILE)
+ IF("ASM${ASM_DIALECT}" STREQUAL "ASM")
+ MESSAGE(FATAL_ERROR "Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}")
+ ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
ENDIF(NOT _INCLUDED_FILE)
@@ -89,7 +90,7 @@ MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_FLAGS
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
- 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> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
@@ -100,9 +101,21 @@ ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
- "<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+ "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
+IF(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG)
+ SET(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG})
+ENDIF()
+
+IF(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP)
+ SET(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP})
+ENDIF()
+
+IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG)
+ SET(CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_ASM${ASM_DIALECT}_FLAG})
+ENDIF()
+
# to be done
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index d6350bf..171e31f 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -21,11 +21,37 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
ENDIF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
# finally list compilers to try
- IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
- ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}as ${_CMAKE_TOOLCHAIN_PREFIX}gas)
- ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ IF("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
+
+ IF(CMAKE_ASM_COMPILER_INIT)
+ SET(CMAKE_ASM_COMPILER_LIST ${CMAKE_ASM_COMPILER_INIT})
+ ELSE(CMAKE_ASM_COMPILER_INIT)
+
+ IF(CMAKE_C_COMPILER)
+ SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "The ASM compiler")
+ SET(CMAKE_ASM_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
+ ELSEIF(CMAKE_CXX_COMPILER)
+ SET(CMAKE_ASM_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "The ASM compiler")
+ SET(CMAKE_ASM_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
+ ELSE(CMAKE_CXX_COMPILER)
+ # List all default C and CXX compilers
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc
+ ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC)
+ ENDIF(CMAKE_C_COMPILER)
+
+ ENDIF(CMAKE_ASM_COMPILER_INIT)
+
+
+ ELSE("ASM${ASM_DIALECT}" STREQUAL "ASM") # some specific assembler "dialect"
+
+ IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
+ ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ MESSAGE(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !")
+ ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+
+ ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
+
# Find the compiler.
IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
@@ -63,7 +89,24 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
# Table of per-vendor compiler id flags with expected output.
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)|(Free Software Foundation)")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS HP )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_HP "-V")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_HP "HP C")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS Intel )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS SunPro )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_SunPro "-V")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_SunPro "Sun C")
+
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XL )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C")
+
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
@@ -71,14 +114,15 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
INCLUDE(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
- IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
- ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
- ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
-
ENDIF()
+IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
+ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
+ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+
+
# If we have a gas/as cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas , optionally
@@ -90,10 +134,25 @@ ENDIF()
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
IF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- STRING(REGEX REPLACE "^(.+-)g?as(\\.exe)?$" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
+ SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+# Now try the C compiler regexp:
+IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+ IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+
+# Finally try the CXX compiler regexp:
+IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+ IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+
+
INCLUDE(CMakeFindBinUtils)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
@@ -106,6 +165,7 @@ ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
+SET(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 9a3884a..b160dee 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -287,6 +287,13 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
RESULT_VARIABLE result
TIMEOUT 10
)
+
+ IF("${lang}" STREQUAL "ASM")
+ MESSAGE(STATUS "Checked for ${vendor}")
+ MESSAGE(STATUS " Output: -${output}-")
+ MESSAGE(STATUS " Result: -${result}-")
+ ENDIF("${lang}" STREQUAL "ASM")
+
IF("${output}" MATCHES "${regex}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
diff --git a/Modules/Compiler/GNU-ASM.cmake b/Modules/Compiler/GNU-ASM.cmake
new file mode 100644
index 0000000..e07401d
--- /dev/null
+++ b/Modules/Compiler/GNU-ASM.cmake
@@ -0,0 +1,6 @@
+# This file is loaded when gcc/g++ is used for assembler files (the "ASM" cmake language)
+include(Compiler/GNU)
+
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm)
+
+__compiler_gnu(ASM)
diff --git a/Modules/Compiler/HP-ASM.cmake b/Modules/Compiler/HP-ASM.cmake
new file mode 100644
index 0000000..8aa7bdb
--- /dev/null
+++ b/Modules/Compiler/HP-ASM.cmake
@@ -0,0 +1,3 @@
+SET(CMAKE_ASM_VERBOSE_FLAG "-v")
+
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
diff --git a/Modules/Compiler/HP-C.cmake b/Modules/Compiler/HP-C.cmake
index abf384a..dc7fbb2 100644
--- a/Modules/Compiler/HP-C.cmake
+++ b/Modules/Compiler/HP-C.cmake
@@ -1 +1,4 @@
SET(CMAKE_C_VERBOSE_FLAG "-v")
+
+SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/HP-CXX.cmake b/Modules/Compiler/HP-CXX.cmake
index f3c6b5f..82c1a86 100644
--- a/Modules/Compiler/HP-CXX.cmake
+++ b/Modules/Compiler/HP-CXX.cmake
@@ -1 +1,4 @@
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
+
+SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/Intel-ASM.cmake b/Modules/Compiler/Intel-ASM.cmake
new file mode 100644
index 0000000..59b50a1
--- /dev/null
+++ b/Modules/Compiler/Intel-ASM.cmake
@@ -0,0 +1,13 @@
+SET(CMAKE_ASM_VERBOSE_FLAG "-v")
+
+SET(CMAKE_ASM_FLAGS_INIT "")
+SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+
+IF(UNIX)
+ SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
+ELSE(UNIX)
+ SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
+ENDIF(UNIX)
diff --git a/Modules/Compiler/SunPro-ASM.cmake b/Modules/Compiler/SunPro-ASM.cmake
new file mode 100644
index 0000000..dfc5702
--- /dev/null
+++ b/Modules/Compiler/SunPro-ASM.cmake
@@ -0,0 +1,24 @@
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
+
+SET(CMAKE_ASM_VERBOSE_FLAG "-#")
+
+SET(CMAKE_SHARED_LIBRARY_ASM_FLAGS "-KPIC")
+SET(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-G")
+SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R")
+SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":")
+SET(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h")
+
+SET(CMAKE_ASM_FLAGS_INIT "")
+SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+
+# Initialize ASM link type selection flags. These flags are used when
+# building a shared library, shared module, or executable that links
+# to other libraries to select whether to use the static or shared
+# versions of the libraries.
+FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
+ SET(CMAKE_${type}_LINK_STATIC_ASM_FLAGS "-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_ASM_FLAGS "-Bdynamic")
+ENDFOREACH(type)
diff --git a/Modules/Compiler/XL-ASM.cmake b/Modules/Compiler/XL-ASM.cmake
new file mode 100644
index 0000000..e5d4ffa
--- /dev/null
+++ b/Modules/Compiler/XL-ASM.cmake
@@ -0,0 +1,13 @@
+SET(CMAKE_ASM_VERBOSE_FLAG "-V")
+
+# -qthreaded = Ensures that all optimizations will be thread-safe
+# -qalias=noansi = Turns off type-based aliasing completely (safer optimizer)
+# -qhalt=e = Halt on error messages (rather than just severe errors)
+SET(CMAKE_ASM_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e -qsourcetype=assembler")
+
+SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
+SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g")
+
+SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake
index 79c06ba..543f3e8 100644
--- a/Modules/Platform/AIX-GNU.cmake
+++ b/Modules/Platform/AIX-GNU.cmake
@@ -19,5 +19,7 @@ endif()
set(__AIX_COMPILER_GNU 1)
macro(__aix_compiler_gnu lang)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G")
endmacro()
diff --git a/Modules/Platform/AIX-XL-ASM.cmake b/Modules/Platform/AIX-XL-ASM.cmake
new file mode 100644
index 0000000..ea0944b
--- /dev/null
+++ b/Modules/Platform/AIX-XL-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/AIX-XL)
+__aix_compiler_xl(ASM)
diff --git a/Modules/Platform/AIX-XL-C.cmake b/Modules/Platform/AIX-XL-C.cmake
index 2de30d5..5e437fa 100644
--- a/Modules/Platform/AIX-XL-C.cmake
+++ b/Modules/Platform/AIX-XL-C.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_C_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(C)
diff --git a/Modules/Platform/AIX-XL-CXX.cmake b/Modules/Platform/AIX-XL-CXX.cmake
index 648cb31..ef38a5f 100644
--- a/Modules/Platform/AIX-XL-CXX.cmake
+++ b/Modules/Platform/AIX-XL-CXX.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_CXX_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(CXX)
diff --git a/Modules/Platform/AIX-XL-Fortran.cmake b/Modules/Platform/AIX-XL-Fortran.cmake
index 8292e78..6d4f655 100644
--- a/Modules/Platform/AIX-XL-Fortran.cmake
+++ b/Modules/Platform/AIX-XL-Fortran.cmake
@@ -1,4 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS " ")
-SET(CMAKE_SHARED_MODULE_Fortran_FLAGS " ")
+include(Platform/AIX-XL)
+__aix_compiler_xl(Fortran)
diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake
new file mode 100644
index 0000000..1f94152
--- /dev/null
+++ b/Modules/Platform/AIX-XL.cmake
@@ -0,0 +1,28 @@
+
+#=============================================================================
+# Copyright 2002-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This module is shared by multiple languages; use include blocker.
+if(__AIX_COMPILER_XL)
+ return()
+endif()
+set(__AIX_COMPILER_XL 1)
+
+macro(__aix_compiler_xl lang)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
+ set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ")
+ set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
+endmacro()
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake
index 0ab0cce..a9f773e 100644
--- a/Modules/Platform/AIX.cmake
+++ b/Modules/Platform/AIX.cmake
@@ -9,8 +9,6 @@ SET(CMAKE_DL_LIBS "-lld")
# When our own RPATH is to be added it may be inserted before the
# "always" paths.
SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-blibpath:")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
# Files named "libfoo.a" may actually be shared libraries.
SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
diff --git a/Modules/Platform/Windows-Intel-ASM.cmake b/Modules/Platform/Windows-Intel-ASM.cmake
new file mode 100644
index 0000000..31d08c7
--- /dev/null
+++ b/Modules/Platform/Windows-Intel-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-Intel)
+__windows_compiler_intel(ASM)