summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/cmake/Intel
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/cmake/Intel')
-rw-r--r--openmp/runtime/cmake/Intel/AsmFlags.cmake42
-rw-r--r--openmp/runtime/cmake/Intel/CFlags.cmake160
-rw-r--r--openmp/runtime/cmake/Intel/FortranFlags.cmake48
3 files changed, 0 insertions, 250 deletions
diff --git a/openmp/runtime/cmake/Intel/AsmFlags.cmake b/openmp/runtime/cmake/Intel/AsmFlags.cmake
deleted file mode 100644
index a11e2dd43d8..00000000000
--- a/openmp/runtime/cmake/Intel/AsmFlags.cmake
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-#//===----------------------------------------------------------------------===//
-#//
-#// 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 Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) 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("-x assembler-with-cpp") # Assembly file that needs to be preprocessed
- if(${MIC})
- append_asm_flags("-mmic") # Build Intel(R) MIC Architecture native code
- endif()
- if(${WINDOWS})
- 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)
- endif()
- set(${input_asm_flags} ${${input_asm_flags}} "${local_asm_flags}" PARENT_SCOPE)
-endfunction()
diff --git a/openmp/runtime/cmake/Intel/CFlags.cmake b/openmp/runtime/cmake/Intel/CFlags.cmake
deleted file mode 100644
index 310d4add18f..00000000000
--- a/openmp/runtime/cmake/Intel/CFlags.cmake
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-#//===----------------------------------------------------------------------===//
-#//
-#// 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 Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) dependent flags
-# The flag types are:
-# 2) C/C++ Compiler flags
-# 4) Linker flags
-
-# icc has a 128-bit floating point type called _Quad. Always compile with 128-bit floating point if it exists.
-unset(COMPILER_SUPPORTS_QUAD_PRECISION CACHE)
-set(COMPILER_SUPPORTS_QUAD_PRECISION true CACHE BOOL "Does the compiler support a 128-bit floating point type?")
-set(COMPILER_QUAD_TYPE _Quad)
-
-#########################################################
-# icc C/C++ Compiler flags
-function(append_compiler_specific_c_and_cxx_flags input_c_flags input_cxx_flags)
- set(local_c_flags)
- set(local_cxx_flags)
- if(${WINDOWS})
-
- append_c_flags("-TP") # Tells the compiler to process a file as a C++ source file.
- append_cxx_flags("-EHsc") # Enable C++ exception handling.
- append_c_and_cxx_flags("-nologo") # Turn off tool banner.
- append_c_and_cxx_flags("-W3") # Enables diagnostics for remarks, warnings, and errors.
- # Additional warnings are also enabled above level 2 warnings.
- append_c_and_cxx_flags("-WX") # Change all Warnings to Errors
- append_c_and_cxx_flags("-GS") # Lets you control the threshold at which the stack checking routine is called or not called.
- append_c_and_cxx_flags("-Qoption,cpp,--extended_float_types") # Enabled _Quad type.
- if(${IA32})
- append_c_and_cxx_flags("-arch:ia32") # Tells the compiler which features it may target (ia32)
- append_c_and_cxx_flags("-Oy-") # equivalent to -fno-omit-frame-pointer
- endif()
- append_c_and_cxx_flags("-Qlong_double") # enable long double
- append_c_and_cxx_flags("-Qdiag-disable:177") # Disable warning: "... declared but never referenced"
- if(${IA32})
- append_c_and_cxx_flags("-Qsafeseh") # Registers exception handlers for safe exception handling.
- endif()
- if(${RELEASE_BUILD} OR ${RELWITHDEBINFO_BUILD})
- append_c_and_cxx_flags("-Qinline-min-size=1") # Specifies the upper limit for the size of what the inliner considers to be a small routine.
- else()
- append_c_and_cxx_flags("-Od") # Disables all optimizations.
- append_c_and_cxx_flags("-RTC1") # Enables run-time checks of the stack frame, and enables run-time checks for unintialized variables.
- append_c_and_cxx_flags("-MTd") # Tells the linker to search for unresolved references in a multithreaded, static run-time library.
- endif()
- else()
- append_c_and_cxx_flags("-Wsign-compare") # warn on sign comparisons
- append_c_and_cxx_flags("-Qoption,cpp,--extended_float_types") # Enabled _Quad type.
- append_c_and_cxx_flags("-fno-exceptions") # Exception handling table generation is disabled.
- append_c_and_cxx_flags("-x c++") # Compile C files as C++ files
- if(${LINUX})
- if(NOT ${MIC})
- append_c_and_cxx_flags("-Werror") # Changes all warnings to errors.
- endif()
- append_c_and_cxx_flags("-sox") # Tells the compiler to save the compilation options and version number
- # in the executable file. It also lets you choose whether to include
- # lists of certain functions.
- if(${MIC})
- append_c_and_cxx_flags("-mmic") # Build Intel(R) MIC Architecture native code
- append_c_and_cxx_flags("-ftls-model=initial-exec") # Changes the thread local storage (TLS) model. Generates a restrictive, optimized TLS code.
- # To use this setting, the thread-local variables accessed must be defined in one of the
- # modules available to the program.
- append_c_and_cxx_flags("-opt-streaming-stores never") # Disables generation of streaming stores for optimization.
- elseif(${IA32})
- append_c_and_cxx_flags("-falign-stack=maintain-16-byte") # Tells the compiler the stack alignment to use on entry to routines.
- append_c_and_cxx_flags("-mia32") # Tells the compiler which features it may target (ia32)
- endif()
- endif()
- 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
- if(${WINDOWS})
- replace_md_with_mt(CMAKE_C_FLAGS)
- replace_md_with_mt(CMAKE_C_FLAGS_RELEASE)
- replace_md_with_mt(CMAKE_C_FLAGS_RELWITHDEBINFO)
- replace_md_with_mt(CMAKE_C_FLAGS_DEBUG)
- replace_md_with_mt(CMAKE_CXX_FLAGS)
- replace_md_with_mt(CMAKE_CXX_FLAGS_RELEASE)
- replace_md_with_mt(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- replace_md_with_mt(CMAKE_CXX_FLAGS_DEBUG)
- endif()
- set(${input_c_flags} ${${input_c_flags}} "${local_c_flags}" PARENT_SCOPE)
- set(${input_cxx_flags} ${${input_cxx_flags}} "${local_cxx_flags}" PARENT_SCOPE)
-endfunction()
-
-#########################################################
-# icc Linker flags
-function(append_compiler_specific_linker_flags input_ld_flags input_ld_flags_libs)
- set(local_ld_flags)
- set(local_ld_flags_libs)
- if(${WINDOWS})
- # Have icc use link.exe directly when Windows
- set(CMAKE_C_CREATE_SHARED_LIBRARY "link.exe /out:<TARGET> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES>" PARENT_SCOPE)
- set(CMAKE_SHARED_LINKER_FLAGS "$ENV{LDFLAGS}" CACHE STRING "Linker Flags" FORCE)
- append_linker_flags("-nologo") # Turn off tool banner.
- append_linker_flags("-dll")
- append_linker_flags("-WX:NO")
- append_linker_flags("-incremental:no")
- append_linker_flags("-version:${LIBOMP_VERSION}.0")
- append_linker_flags("-NXCompat")
- append_linker_flags("-DynamicBase") # This option modifies the header of an executable to indicate
- # whether the application should be randomly rebased at load time.
- if(${IA32})
- append_linker_flags("-machine:i386")
- append_linker_flags("-safeseh")
- elseif(${INTEL64})
- append_linker_flags("-machine:amd64")
- endif()
- if(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD})
- if(NOT "${pdb_file}" STREQUAL "")
- append_linker_flags("-debug")
- append_linker_flags("-pdb:${pdb_file}")
- endif()
- else()
- if(NOT "${pdb_file}" STREQUAL "")
- append_linker_flags("-debug")
- append_linker_flags("-pdb:${pdb_file}")
- append_linker_flags("-pdbstripped:${pdb_file}.stripped")
- endif()
- endif()
- if(NOT "${imp_file}" STREQUAL "")
- append_linker_flags("-implib:${lib_file}${lib}")
- endif()
- if(NOT "${def_file}" STREQUAL "")
- append_linker_flags("-def:${def_file}")
- endif()
- elseif(${MAC})
- append_linker_flags("-no-intel-extensions")
- if(NOT ${STUBS_LIBRARY})
- append_linker_flags_library("-pthread") # link in pthread library
- append_linker_flags_library("-ldl") # link in libdl (dynamic loader library)
- endif()
- if(${LIBOMP_STATS})
- append_linker_flags_library("-Wl,-lstdc++") # link in standard c++ library (stats-gathering needs it)
- endif()
- else()
- if(${MIC})
- append_linker_flags("-mmic") # enable MIC linking
- append_linker_flags("-no-intel-extensions") # Enables or disables all Intel C and Intel C++ language extensions.
- elseif(${IA32})
- append_linker_flags_library("-lirc_pic") # link in libirc_pic
- endif()
- append_linker_flags("-static-intel") # Causes Intel-provided libraries to be linked in statically.
- if(NOT ${MIC})
- append_linker_flags("-Werror") # Warnings become errors
- endif()
- endif()
-
- set(${input_ld_flags} ${${input_ld_flags}} "${local_ld_flags}" PARENT_SCOPE)
- set(${input_ld_flags_libs} ${${input_ld_flags_libs}} "${local_ld_flags_libs}" PARENT_SCOPE)
-endfunction()
-
diff --git a/openmp/runtime/cmake/Intel/FortranFlags.cmake b/openmp/runtime/cmake/Intel/FortranFlags.cmake
deleted file mode 100644
index 5fb16563fa3..00000000000
--- a/openmp/runtime/cmake/Intel/FortranFlags.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-#//===----------------------------------------------------------------------===//
-#//
-#// 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 Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) dependent flags
-# The flag types are:
-# 1) Fortran Compiler flags
-
-#########################################################
-# icc Fortran Compiler flags (for creating .mod files)
-function(append_fortran_compiler_specific_fort_flags input_fort_flags)
- set(local_fort_flags)
- #set(CMAKE_Fortran_FLAGS "$ENV{FFLAGS}" CACHE STRING "Fortran flags" FORCE)
- #set(CMAKE_Fortran_FLAGS_RELEASE "" CACHE STRING "Fortran flags" FORCE)
- #set(CMAKE_Fortran_FLAGS_DEBUG "" CACHE STRING "Fortran flags" FORCE)
- #set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "" CACHE STRING "Fortran flags" FORCE)
- if(${WINDOWS})
- append_fort_flags("-Qdiag-disable:177,5082")
- append_fort_flags("-Qsox")
- append_fort_flags("-nologo")
- append_fort_flags("-GS")
- append_fort_flags("-DynamicBase")
- append_fort_flags("-Zi")
- # On Linux and Windows Intel(R) 64 architecture we need offload attribute
- # for all Fortran entries in order to support OpenMP function calls inside device contructs
- if(${INTEL64})
- append_fort_flags("/Qoffload-attribute-target:mic")
- endif()
- else()
- if(${MIC})
- append_fort_flags("-mmic")
- endif()
- if(NOT ${MAC})
- append_fort_flags("-sox")
- if(${INTEL64} AND ${LINUX})
- append_fort_flags("-offload-attribute-target=mic")
- endif()
- endif()
- endif()
- set(${input_fort_flags} ${${input_fort_flags}} "${local_fort_flags}" PARENT_SCOPE)
-endfunction()
OpenPOWER on IntegriCloud