summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/cmake/MSVC/AsmFlags.cmake
diff options
context:
space:
mode:
authorJim Cownie <james.h.cownie@intel.com>2014-08-05 09:32:28 +0000
committerJim Cownie <james.h.cownie@intel.com>2014-08-05 09:32:28 +0000
commit3b81ce6b15f78dba542f54ef693591f0089e3135 (patch)
tree8957c0df7a8668f52022f648cf048940a130d7b1 /openmp/runtime/cmake/MSVC/AsmFlags.cmake
parent947cef191d0306c813c39d6265dd183d83033be1 (diff)
downloadbcm5719-llvm-3b81ce6b15f78dba542f54ef693591f0089e3135.tar.gz
bcm5719-llvm-3b81ce6b15f78dba542f54ef693591f0089e3135.zip
After three iterations of community review, we believe that this new
CMAKE buld system should meet everyone's requirements. Enhanced CMake Build System Commit * Supports Linux, Mac, Windows, and IntelĀ® Xeon Phi builds * Supports building with gcc, icc, clang, and Visual Studio compilers * Supports bulding "fat" libraries on OS/X with clang * Details and documentation on how to use build system are in Build_With_CMake.txt * To use the old CMake build system (corresponds to CMakeLists.txt.old), just rename CMakeLists.txt to CMakeLists.txt.other and rename CMakeLists.txt.old to CMakeLists.txt llvm-svn: 214850
Diffstat (limited to 'openmp/runtime/cmake/MSVC/AsmFlags.cmake')
-rw-r--r--openmp/runtime/cmake/MSVC/AsmFlags.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/openmp/runtime/cmake/MSVC/AsmFlags.cmake b/openmp/runtime/cmake/MSVC/AsmFlags.cmake
new file mode 100644
index 00000000000..dcc83021183
--- /dev/null
+++ b/openmp/runtime/cmake/MSVC/AsmFlags.cmake
@@ -0,0 +1,26 @@
+# This file holds Microsoft Visual Studio dependent flags
+# The flag types are:
+# 1) Assembly flags
+
+#########################################################
+# Assembly flags
+function(append_assembler_specific_asm_flags input_asm_flags)
+ set(local_asm_flags)
+ append_asm_flags("-nologo") # Turn off tool banner.
+ if(${IA32})
+ append_asm_flags("-safeseh") # Registers exception handlers for safe exception handling.
+ append_asm_flags("-coff") # Generates common object file format (COFF) type of object module.
+ # Generally required for Win32 assembly language development.
+ append_asm_flags("-D _M_IA32")
+ elseif(${INTEL64})
+ append_asm_flags("-D _M_AMD64")
+ endif()
+ # CMake prefers the /MD flags when compiling Windows sources, but libiomp5 needs to use /MT instead
+ # So we replace these /MD instances with /MT within the CMAKE_*_FLAGS variables and put that out to the CACHE.
+ # replace_md_with_mt() is in HelperFunctions.cmake
+ replace_md_with_mt(CMAKE_ASM_MASM_FLAGS)
+ replace_md_with_mt(CMAKE_ASM_MASM_FLAGS_RELEASE)
+ replace_md_with_mt(CMAKE_ASM_MASM_FLAGS_RELWITHDEBINFO)
+ replace_md_with_mt(CMAKE_ASM_MASM_FLAGS_DEBUG)
+ set(${input_asm_flags} ${${input_asm_flags}} "${local_asm_flags}" PARENT_SCOPE)
+endfunction()
OpenPOWER on IntegriCloud