This change has the CMake build system create a dynamic library named libomp instead of libiomp5. Also any reference to libiomp is replaced with libomp. One can still use the LIBOMP_LIB_NAME variable to enforce a different name, and everything will still work as expected. An important note is that libiomp5 and libgomp symlinks are created at install time when on Unix systems. On Windows, copies are created with the legacy names. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@238715 91177308-0d34-0410-b5e6-96231b3b80d8
38 lines
1.7 KiB
CMake
38 lines
1.7 KiB
CMake
#
|
|
#//===----------------------------------------------------------------------===//
|
|
#//
|
|
#// The LLVM Compiler Infrastructure
|
|
#//
|
|
#// This file is dual licensed under the MIT and the University of Illinois Open
|
|
#// Source Licenses. See LICENSE.txt for details.
|
|
#//
|
|
#//===----------------------------------------------------------------------===//
|
|
#
|
|
|
|
# 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 libomp 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()
|