Index: openmp/trunk/runtime/Build_With_CMake.txt =================================================================== --- openmp/trunk/runtime/Build_With_CMake.txt +++ openmp/trunk/runtime/Build_With_CMake.txt @@ -25,15 +25,15 @@ - Example of configuring, building, reconfiguring, rebuilding: $ mkdir build $ cd build - $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -Darch=32 .. # Initial configuration + $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_ARCH=32 .. # Initial configuration $ make all common ... $ make clean - $ cmake -Darch=32e -DCMAKE_BUILD_TYPE=Debug .. # Second configuration + $ cmake -DLIBOMP_ARCH=32e -DCMAKE_BUILD_TYPE=Debug .. # Second configuration $ make all common ... $ rm -rf * - $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -Darch=32e .. # Third configuration + $ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_ARCH=32e .. # Third configuration $ make all common - Notice in the example how the compiler definitions are only specified for an empty build directory, but other Build options are used at any time. @@ -58,7 +58,7 @@ $ cmake -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER= .. [ Intel(R) Many Integrated Core Library (Intel(R) MIC Library) ] - $ cmake -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER= -Darch=mic .. + $ cmake -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER= -DLIBOMP_ARCH=mic .. [ Windows Libraries ] $ cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER= -DCMAKE_ASM_MASM_COMPILER=[ml | ml64] -DCMAKE_BUILD_TYPE=Release .. @@ -71,13 +71,13 @@ On OS X* machines, it is possible to build universal (or fat) libraries which include both IA-32 architecture and Intel(R) 64 architecture objects in a single archive; just build the 32 and 32e libraries separately: - $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Darch=32 .. + $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLIBOMP_ARCH=32 .. $ make - $ cmake -Darch=32e .. + $ cmake -DLIBOMP_ARCH=32e .. $ make then invoke make again with a special argument as follows: $ make fat -- The fat target is only available for the arch=32e configuration. +- The fat target is only available for the LIBOMP_ARCH=32e configuration. - The fat libraries will be put in exports/mac_32e/lib while the "thin" libraries will be in exports/mac_32e/lib.thin and exports/mac_32/lib.thin @@ -89,7 +89,7 @@ -DCMAKE_Fortran_COMPILER= Unix* systems (Optional as compiler is default): -This option is only needed when -Dcreate_fortran_modules is true +This option is only needed when -DLIBOMP_FORTRAN_MODULES is true -DCMAKE_ASM_MASM_COMPILER=[ml | ml64 ] This option is Windows* Only @@ -101,14 +101,14 @@ ========================== ==== Operating System ==== ========================== --Dos=lin|mac|win +-DLIBOMP_OS=lin|mac|win * Operating system can be lin (Linux*), mac (Mac*), or win (Windows*). If not specified, cmake will try to determine your current operating system. ====================== ==== Architecture ==== ====================== --Darch=32|32e|arm|ppc64|ppc64le|aarch64|mic +-DLIBOMP_ARCH=32|32e|arm|ppc64|ppc64le|aarch64|mic * Architecture can be 32 (IA-32 architecture), 32e (Intel(R) 64 architecture), arm (ARM architecture), aarch64 (ARMv8 architecture), ppc64 (PPC64 architecture), or ppc64le (little endian PPC64 architecture). @@ -116,37 +116,36 @@ architecture macros (e.g., is __x86_64__ predefined by compiler?). ---- First values listed are the default value ---- --Dlib_type=normal|profile|stubs +-DLIBOMP_LIB_TYPE=normal|profile|stubs Library type can be normal, profile, or stubs. -DCMAKE_BUILD_TYPE=Release|Debug|RelWithDebInfo Build type can be Release, Debug, or RelWithDebInfo. -See below for interaction when -DUSE_BUILDPL_RULES is on. --Dversion=5|4 +-DLIBOMP_VERSION=5|4 libiomp5 version can be 5 or 4. --Domp_version=40|30 +-DLIBOMP_OMP_VERSION=40|30 OpenMP version can be either 40 or 30. --Dmic_arch=knc|knf +-DLIBOMP_MIC_ARCH=knc|knf Intel(R) MIC Architecture, can be knf or knc. -This value is ignored if os != mic +This value is ignored if LIBOMP_ARCH != mic --Dcreate_fortran_modules=off|on +-DLIBOMP_FORTRAN_MODULES=off|on Should the Fortran modules be created (requires Fortran compiler) --Dstats=off|on +-DLIBOMP_STATS=off|on Should include stats-gathering code? --Dompt_support=off|on +-DLIBOMP_OMPT_SUPPORT=off|on Should OMPT support be turned on? If ompt_support is off, then both ompt_blame and ompt_trace are ignored. --Dompt_blame=on|off +-DLIBOMP_OMPT_BLAME=on|off should OMPT blame functionality be turned on? --Dompt_trace=on|off +-DLIBOMP_OMPT_TRACE=on|off should OMPT trace functionality be turned on? ===================== @@ -155,14 +154,14 @@ After the library has been built, there are five optional microtests that can be performed. Some will be skipped based upon the platform. These tests can be turned on (default) or off with the following options: --Dtest_touch=on|off -- Should the touch test be done? --Dtest_relo=on|off -- Should the position independent code test be done? --Dtest_execstack=on|off -- Should the stack be checked for executability? --Dtest_instr=on|off -- Should the Intel(R) MIC Libraries be checked +-DLIBOMP_TEST_TOUCH=on|off -- Should the touch test be done? +-DLIBOMP_TEST_RELO=on|off -- Should the position independent code test be done? +-DLIBOMP_TEST_EXECSTACK=on|off -- Should the stack be checked for executability? +-DLIBOMP_TEST_INSTR=on|off -- Should the Intel(R) MIC Libraries be checked for correct instruction set? --Dtest_deps=on|off -- Should libiomp5's dependencies be checked? --Dtests=off|on -- Should any of the above tests be done? -If -Dtests=on is specified, the user can then call: +-DLIBOMP_TEST_DEPS=on|off -- Should libiomp5's dependencies be checked? +-DLIBOMP_MICRO_TESTS=off|on -- Should any of the above tests be done? +If -DLIBOMP_MICRO_TESTS=on is specified, the user can then call: $ make libiomp-micro-tests which runs the tests. @@ -171,45 +170,45 @@ ============================================ - These flags are *appended*. They do not overwrite any of the preset flags. --DLIBIOMP_CPPFLAGS= -- Additional C Preprocessor flags +-DLIBOMP_CPPFLAGS= -- Additional C Preprocessor flags (typically additional -Ddef=val flags) --DLIBIOMP_CFLAGS= -- Additional C compiler flags --DLIBIOMP_CXXFLAGS= -- Additional C++ compiler flags --DLIBIOMP_ASMFLAGS= -- Additional assembly flags --DLIBIOMP_LDFLAGS= -- Additional linker flags --DLIBIOMP_LIBFLAGS= -- Additional libraries to link +-DLIBOMP_CFLAGS= -- Additional C compiler flags +-DLIBOMP_CXXFLAGS= -- Additional C++ compiler flags +-DLIBOMP_ASMFLAGS= -- Additional assembly flags +-DLIBOMP_LDFLAGS= -- Additional linker flags +-DLIBOMP_LIBFLAGS= -- Additional libraries to link to during link phase --DLIBIOMP_FFLAGS= -- Additional Fortran compiler flags +-DLIBOMP_FFLAGS= -- Additional Fortran compiler flags =================================== ==== Feature Based Compilation ==== =================================== --DUSE_BUILDPL_RULES=false|true +-DLIBOMP_USE_BUILDPL_RULES=false|true Should the build imitate build.pl's build process. When this is true, the Unix* Release builds will build libiomp5 with -O2 and -g flags activated (same as RelWithDebInfo). Then, the debug info is stripped out of the library and put into libiomp5.dbg This is done for interaction with Intel(R) Parallel Amplifier. --DUSE_ADAPTIVE_LOCKS=true|false +-DLIBOMP_USE_ADAPTIVE_LOCKS=true|false Should adaptive (TSX-based) locks be included? These are x86 specific. This feature is turned on by default for IA-32 architecture and Intel(R) 64 architecture. Otherwise, it is turned off. --DUSE_INTERNODE_ALIGNMENT=false|true +-DLIBOMP_USE_INTERNODE_ALIGNMENT=false|true Should 4096-byte alignment be used for certain data structures? This option is useful on multinode systems where a small CACHE_LINE setting leads to false sharing. This option is off by default. --DUSE_VERSION_SYMBOLS=true|false +-DLIBOMP_USE_VERSION_SYMBOLS=true|false Should versioned symbols be used for building the library? This option only makes sense for ELF based libraries where version symbols are supported (Linux, some BSD* variants). It is off by default for Windows and Mac, but on for other Unix based operating systems. --DUSE_PREDEFINED_LINKER_FLAGS=true|false +-DLIBOMP_USE_PREDEFINED_LINKER_FLAGS=true|false Should the predefined linker flags in CommonFlags.cmake be included in the link command? This is true by default and should work for Linux*, Mac*, and Windows*. The --version-script flag on Unix* based @@ -225,22 +224,22 @@ ---- With Various Options ---- - Build the 32 bit Linux library using GCC* -cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -Dos=lin -Darch=32 .. +cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_OS=lin -DLIBOMP_ARCH=32 .. - Build the 32 bit debug Mac library using Clang* -cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Dos=mac -Darch=32 -DCMAKE_BUILD_TYPE=Debug .. +cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLIBOMP_OS=mac -DLIBOMP_ARCH=32 -DCMAKE_BUILD_TYPE=Debug .. - Build the library (architecture determined by probing compiler) using the Intel(R) C Compiler and the Intel(R) C++ Compiler. Also, create the fortran modules using the Intel(R) Fortran Compiler, enabling the libiomp-micro-tests target and using similar rules that build.pl would use to build the library. -cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort -Dtests=on -Dcreate_fortran_modules=on -DUSE_BUILDPL_RULES=on .. +cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort -DLIBOMP_MICRO_TESTS=on -DLIBOMP_FORTRAN_MODULES=on -DLIBOMP_USE_BUILDPL_RULES=on .. - Have CMake Find the C/C++ compiler, and specify additional flags for the C compiler, preprocessor, and C++ compiler. -cmake -DLIBIOMP_CFLAGS='Werror' -DLIBIOMP_CPPFLAGS='-DNEW_FEATURE=1 -DOLD_FEATURE=0' -DLIBIOMP_CXXFLAGS='-Werror -Wsign-compare' .. +cmake -DLIBOMP_CFLAGS='Werror' -DLIBOMP_CPPFLAGS='-DNEW_FEATURE=1 -DOLD_FEATURE=0' -DLIBOMP_CXXFLAGS='-Werror -Wsign-compare' .. ---- Build the stubs library ---- -cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -Dlib_type=stubs .. +cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLIBOMP_LIB_TYPE=stubs .. ========= Footnotes Index: openmp/trunk/runtime/CMakeLists.txt =================================================================== --- openmp/trunk/runtime/CMakeLists.txt +++ openmp/trunk/runtime/CMakeLists.txt @@ -22,11 +22,11 @@ ####################################################################### # Standalone build or part of LLVM? -set(LIBIOMP_STANDALONE_BUILD FALSE) +set(LIBOMP_STANDALONE_BUILD FALSE) if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}" OR "${CMAKE_SOURCE_DIR}/runtime" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") project(libiomp C CXX) - set(LIBIOMP_STANDALONE_BUILD TRUE) + set(LIBOMP_STANDALONE_BUILD TRUE) endif() # These include files are in cmake/ subdirectory except for FindPerl which is a cmake standard module @@ -78,45 +78,45 @@ # If adding a new architecture, take a look at cmake/GetArchitecture.cmake get_architecture(detected_arch) -set(os ${temp_os} CACHE STRING "The operating system to build for (lin/mac/win)") -set(arch ${detected_arch} CACHE STRING "The architecture to build for (32e/32/arm/ppc64/ppc64le/aarch64/mic). 32e is Intel(R) 64 architecture, 32 is IA-32 architecture") -set(lib_type normal CACHE STRING "Performance,Profiling,Stubs library (normal/profile/stubs)") -set(version 5 CACHE STRING "Produce libguide (version 4) or libiomp5 (version 5)") -set(omp_version 41 CACHE STRING "The OpenMP version (41/40/30)") -set(mic_arch knc CACHE STRING "Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc). Ignored if not Intel(R) MIC Architecture build.") -set(create_fortran_modules false CACHE BOOL "Create Fortran module files? (requires fortran compiler)") +set(LIBOMP_OS ${temp_os} CACHE STRING "The operating system to build for (lin/mac/win)") +set(LIBOMP_ARCH ${detected_arch} CACHE STRING "The architecture to build for (32e/32/arm/ppc64/ppc64le/aarch64/mic). 32e is Intel(R) 64 architecture, 32 is IA-32 architecture") +set(LIBOMP_LIB_TYPE normal CACHE STRING "Performance,Profiling,Stubs library (normal/profile/stubs)") +set(LIBOMP_VERSION 5 CACHE STRING "Produce libguide (version 4) or libiomp5 (version 5)") +set(LIBOMP_OMP_VERSION 41 CACHE STRING "The OpenMP version (41/40/30)") +set(LIBOMP_MIC_ARCH knc CACHE STRING "Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc). Ignored if not Intel(R) MIC Architecture build.") +set(LIBOMP_FORTRAN_MODULES false CACHE BOOL "Create Fortran module files? (requires fortran compiler)") # - These tests are little tests performed after the library is formed. # - The library won't be copied to the exports directory until it has passed/skipped all below tests # - To skip these tests, just pass -Dtests=OFF to cmake or change tests value in CMakeCache.txt to OFF after running cmake -set(test_touch true CACHE BOOL "Perform a small touch test?" ) -set(test_relo true CACHE BOOL "Perform a relocation test for dynamic libraries?" ) -set(test_execstack true CACHE BOOL "Perform a execstack test for linux dynamic libraries?" ) -set(test_instr true CACHE BOOL "Perform an instruction test for Intel(R) MIC Architecture libraries?" ) -set(test_deps true CACHE BOOL "Perform a library dependency test?" ) -set(tests false CACHE BOOL "Perform touch, relo, execstack, instr, and deps tests?" ) +set(LIBOMP_TEST_TOUCH true CACHE BOOL "Perform a small touch test?" ) +set(LIBOMP_TEST_RELO true CACHE BOOL "Perform a relocation test for dynamic libraries?" ) +set(LIBOMP_TEST_EXECSTACK true CACHE BOOL "Perform a execstack test for linux dynamic libraries?" ) +set(LIBOMP_TEST_INSTR true CACHE BOOL "Perform an instruction test for Intel(R) MIC Architecture libraries?" ) +set(LIBOMP_TEST_DEPS true CACHE BOOL "Perform a library dependency test?" ) +set(LIBOMP_MICRO_TESTS false CACHE BOOL "Perform touch, relo, execstack, instr, and deps tests?" ) # - stats-gathering enables OpenMP stats where things like the number of parallel regions, clock ticks spent in # particular openmp regions are recorded. -set(stats false CACHE BOOL "Stats-Gathering functionality?" ) +set(LIBOMP_STATS false CACHE BOOL "Stats-Gathering functionality?" ) # OMPT-support -set(ompt_support false CACHE BOOL "OMPT-support?" ) -set(ompt_blame true CACHE BOOL "OMPT-blame?" ) -set(ompt_trace true CACHE BOOL "OMPT-trace?" ) +set(LIBOMP_OMPT_SUPPORT false CACHE BOOL "OMPT-support?" ) +set(LIBOMP_OMPT_BLAME true CACHE BOOL "OMPT-blame?" ) +set(LIBOMP_OMPT_TRACE true CACHE BOOL "OMPT-trace?" ) # User specified flags. These are appended to the predetermined flags found in CommonFlags.cmake and ${CMAKE_C_COMPILER_ID}/*Flags.cmake (e.g., GNU/CFlags.cmake) -set(LIBIOMP_CFLAGS "" CACHE STRING "Appended user specified C compiler flags." ) -set(LIBIOMP_CXXFLAGS "" CACHE STRING "Appended user specified C++ compiler flags." ) -set(LIBIOMP_CPPFLAGS "" CACHE STRING "Appended user specified C preprocessor flags." ) -set(LIBIOMP_ASMFLAGS "" CACHE STRING "Appended user specified assembler flags." ) -set(LIBIOMP_LDFLAGS "" CACHE STRING "Appended user specified linker flags." ) -set(LIBIOMP_LIBFLAGS "" CACHE STRING "Appended user specified linked libs flags. (e.g., -lm)") -set(LIBIOMP_FFLAGS "" CACHE STRING "Appended user specified Fortran compiler flags. These are only used if create_fortran_modules==true." ) +set(LIBOMP_CFLAGS "" CACHE STRING "Appended user specified C compiler flags." ) +set(LIBOMP_CXXFLAGS "" CACHE STRING "Appended user specified C++ compiler flags." ) +set(LIBOMP_CPPFLAGS "" CACHE STRING "Appended user specified C preprocessor flags." ) +set(LIBOMP_ASMFLAGS "" CACHE STRING "Appended user specified assembler flags." ) +set(LIBOMP_LDFLAGS "" CACHE STRING "Appended user specified linker flags." ) +set(LIBOMP_LIBFLAGS "" CACHE STRING "Appended user specified linked libs flags. (e.g., -lm)") +set(LIBOMP_FFLAGS "" CACHE STRING "Appended user specified Fortran compiler flags. These are only used if LIBOMP_FORTRAN_MODULES==true." ) # Should the libiomp5 library and generated headers be copied into the original source exports/ directory # Turning this to false aids parallel builds to not interfere with each other. -set(LIBIOMP_COPY_EXPORTS true CACHE STRING "Should exports be copied into source exports/ directory?") +set(LIBOMP_COPY_EXPORTS true CACHE STRING "Should exports be copied into source exports/ directory?") # - Allow three build types: Release, Debug, RelWithDebInfo (these relate to build.pl's release, debug, and diag settings respectively) # - default is Release (when CMAKE_BUILD_TYPE is not defined) @@ -138,19 +138,19 @@ # Allow user to choose a suffix for the installation directory, or if part of # LLVM build then just use LLVM_LIBDIR_SUFFIX -if(${LIBIOMP_STANDALONE_BUILD}) - set(LIBIOMP_LIBDIR_SUFFIX "" CACHE STRING "suffix of lib installation directory e.g., 64 => lib64") +if(${LIBOMP_STANDALONE_BUILD}) + set(LIBOMP_LIBDIR_SUFFIX "" CACHE STRING "suffix of lib installation directory e.g., 64 => lib64") else() - set(LIBIOMP_LIBDIR_SUFFIX ${LLVM_LIBDIR_SUFFIX}) + set(LIBOMP_LIBDIR_SUFFIX ${LLVM_LIBDIR_SUFFIX}) endif() # Check valid values -check_variable(os "${os_possible_values}" ) -check_variable(arch "${arch_possible_values}" ) -check_variable(omp_version "${omp_version_possible_values}") -check_variable(lib_type "${lib_type_possible_values}" ) -if("${arch}" STREQUAL "mic") - check_variable(mic_arch "${mic_arch_possible_values}" ) +check_variable(LIBOMP_OS "${os_possible_values}" ) +check_variable(LIBOMP_ARCH "${arch_possible_values}" ) +check_variable(LIBOMP_OMP_VERSION "${omp_version_possible_values}") +check_variable(LIBOMP_LIB_TYPE "${lib_type_possible_values}" ) +if("${LIBOMP_ARCH}" STREQUAL "mic") + check_variable(LIBOMP_MIC_ARCH "${mic_arch_possible_values}" ) endif() # Get the build number from kmp_version.c get_build_number("${CMAKE_CURRENT_SOURCE_DIR}" build_number) @@ -167,13 +167,13 @@ set(WINDOWS FALSE) set(MIC FALSE) set(FREEBSD FALSE) -if("${os}" STREQUAL "lin") +if("${LIBOMP_OS}" STREQUAL "lin") set(LINUX TRUE) set(real_os lin) -elseif("${os}" STREQUAL "mac") +elseif("${LIBOMP_OS}" STREQUAL "mac") set(MAC TRUE) set(real_os mac) -elseif("${os}" STREQUAL "win") +elseif("${LIBOMP_OS}" STREQUAL "win") set(WINDOWS TRUE) set(real_os win) endif() @@ -189,21 +189,21 @@ set(PPC64BE FALSE) set(PPC64LE FALSE) set(PPC64 FALSE) -if("${arch}" STREQUAL "32") # IA-32 architecture +if("${LIBOMP_ARCH}" STREQUAL "32") # IA-32 architecture set(IA32 TRUE) -elseif("${arch}" STREQUAL "32e") # Intel(R) 64 architecture +elseif("${LIBOMP_ARCH}" STREQUAL "32e") # Intel(R) 64 architecture set(INTEL64 TRUE) -elseif("${arch}" STREQUAL "arm") # ARM architecture +elseif("${LIBOMP_ARCH}" STREQUAL "arm") # ARM architecture set(ARM TRUE) -elseif("${arch}" STREQUAL "ppc64") # PPC64BE architecture +elseif("${LIBOMP_ARCH}" STREQUAL "ppc64") # PPC64BE architecture set(PPC64BE TRUE) set(PPC64 TRUE) -elseif("${arch}" STREQUAL "ppc64le") # PPC64LE architecture +elseif("${LIBOMP_ARCH}" STREQUAL "ppc64le") # PPC64LE architecture set(PPC64LE TRUE) set(PPC64 TRUE) -elseif("${arch}" STREQUAL "aarch64") # AARCH64 architecture +elseif("${LIBOMP_ARCH}" STREQUAL "aarch64") # AARCH64 architecture set(AARCH64 TRUE) -elseif("${arch}" STREQUAL "mic") # Intel(R) Many Integrated Core Architecture +elseif("${LIBOMP_ARCH}" STREQUAL "mic") # Intel(R) Many Integrated Core Architecture set(MIC TRUE) endif() @@ -220,38 +220,18 @@ set(RELWITHDEBINFO_BUILD TRUE) endif() -# Stats-gathering on or off? -set(STATS_GATHERING FALSE) -if("${stats}") # string "on" or "ON" is seen as boolean TRUE - set(STATS_GATHERING TRUE) -endif() - -# OMPT-support -set(OMPT_SUPPORT FALSE) -if("${ompt_support}") # string "on" or "ON" is seen as boolean TRUE - set(OMPT_SUPPORT TRUE) -endif() -set(OMPT_BLAME TRUE) -if(NOT "${ompt_blame}") # string "on" or "ON" is seen as boolean TRUE - set(OMPT_BLAME FALSE) -endif() -set(OMPT_TRACE TRUE) -if(NOT "${ompt_trace}") # string "on" or "ON" is seen as boolean TRUE - set(OMPT_TRACE FALSE) -endif() - # Include itt notify interface? Right now, always. -set(USE_ITT_NOTIFY TRUE) +set(LIBOMP_USE_ITT_NOTIFY TRUE) # normal, profile, stubs library. set(NORMAL_LIBRARY FALSE) set(STUBS_LIBRARY FALSE) set(PROFILE_LIBRARY FALSE) -if("${lib_type}" STREQUAL "normal") +if("${LIBOMP_LIB_TYPE}" STREQUAL "normal") set(NORMAL_LIBRARY TRUE) -elseif("${lib_type}" STREQUAL "profile") +elseif("${LIBOMP_LIB_TYPE}" STREQUAL "profile") set(PROFILE_LIBRARY TRUE) -elseif("${lib_type}" STREQUAL "stubs") +elseif("${LIBOMP_LIB_TYPE}" STREQUAL "stubs") set(STUBS_LIBRARY TRUE) endif() @@ -264,43 +244,43 @@ # - If COMPILER_SUPPORTS_QUAD_PRECISION is true, then a corresponding COMPILER_QUAD_TYPE must be given # This is the compiler's quad-precision data type. # ** TODO: This isn't complete yet. Finish it. Requires changing macros in kmp_os.h ** -set(COMPILER_SUPPORTS_QUAD_PRECISION false CACHE BOOL "*INCOMPLETE* Does the compiler support a 128-bit floating point type?") -set(COMPILER_QUAD_TYPE "" CACHE STRING "*INCOMPLETE* The quad precision data type (e.g., for gcc, __float128)") +set(LIBOMP_COMPILER_SUPPORTS_QUAD_PRECISION false CACHE BOOL "*INCOMPLETE* Does the compiler support a 128-bit floating point type?") +set(LIBOMP_COMPILER_QUAD_TYPE "" CACHE STRING "*INCOMPLETE* The quad precision data type (e.g., for gcc, __float128)") # - Should the orignal build rules for builds be used? (cmake/OriginalBuildRules.cmake). This setting is off by default. # - This always compiles with -g. And if it is a release build, the debug info is stripped out via objcopy and put into libiomp5.dbg. -set(USE_BUILDPL_RULES false CACHE BOOL "Should the build follow build.pl rules/recipes?") +set(LIBOMP_USE_BUILDPL_RULES false CACHE BOOL "Should the build follow build.pl rules/recipes?") # - Should the build use the predefined linker flags (OS-dependent) in CommonFlags.cmake? # - these predefined linker flags should work for Windows, Mac, and True Linux for the most popular compilers/linkers -set(USE_PREDEFINED_LINKER_FLAGS true CACHE BOOL "Should the build use the predefined linker flags in CommonFlags.cmake?") +set(LIBOMP_USE_PREDEFINED_LINKER_FLAGS true CACHE BOOL "Should the build use the predefined linker flags in CommonFlags.cmake?") # - On multinode systems, larger alignment is desired to avoid false sharing -set(USE_INTERNODE_ALIGNMENT false CACHE BOOL "Should larger alignment (4096 bytes) be used for some locks and data structures?") +set(LIBOMP_USE_INTERNODE_ALIGNMENT false CACHE BOOL "Should larger alignment (4096 bytes) be used for some locks and data structures?") # - libgomp drop-in compatibility if(${LINUX} AND NOT ${PPC64}) - set(USE_VERSION_SYMBOLS true CACHE BOOL "Should version symbols be used? These provide binary compatibility with libgomp.") + set(LIBOMP_USE_VERSION_SYMBOLS true CACHE BOOL "Should version symbols be used? These provide binary compatibility with libgomp.") else() - set(USE_VERSION_SYMBOLS false CACHE BOOL "Version symbols not supported." FORCE) + set(LIBOMP_USE_VERSION_SYMBOLS false CACHE BOOL "Version symbols not supported." FORCE) endif() # - TSX based locks have __asm code which can be troublesome for some compilers. This feature is also x86 specific. if(${IA32} OR ${INTEL64}) - set(USE_ADAPTIVE_LOCKS true CACHE BOOL "Should TSX-based lock be compiled (adaptive lock in kmp_lock.cpp). These are x86 specific.") + set(LIBOMP_USE_ADAPTIVE_LOCKS true CACHE BOOL "Should TSX-based lock be compiled (adaptive lock in kmp_lock.cpp). These are x86 specific.") else() - set(USE_ADAPTIVE_LOCKS false CACHE BOOL "TSX-based locks not supported. These are x86 specific." FORCE) + set(LIBOMP_USE_ADAPTIVE_LOCKS false CACHE BOOL "TSX-based locks not supported. These are x86 specific." FORCE) endif() ################################## # Error checking the configuration -if(${STATS_GATHERING} AND (${WINDOWS} OR ${MAC})) +if(${LIBOMP_STATS} AND (${WINDOWS} OR ${MAC})) error_say("Stats-gathering functionality is only supported on x86-Linux and Intel(R) MIC Architecture") endif() -if(${STATS_GATHERING} AND NOT (${IA32} OR ${INTEL64} OR ${MIC})) +if(${LIBOMP_STATS} AND NOT (${IA32} OR ${INTEL64} OR ${MIC})) error_say("Stats-gathering functionality is only supported on x86-Linux and Intel(R) MIC Architecture") endif() -if(${USE_ADAPTIVE_LOCKS} AND NOT(${IA32} OR ${INTEL64})) +if(${LIBOMP_USE_ADAPTIVE_LOCKS} AND NOT(${IA32} OR ${INTEL64})) error_say("Adaptive locks (TSX) functionality is only supported on x86 Architecture") endif() @@ -314,18 +294,18 @@ string(SUBSTRING "${cmake_build_type_lowercase}" 0 3 build_type_suffix) set(suffix "${suffix}.${build_type_suffix}") endif() -if(NOT "${omp_version}" STREQUAL "41") - set(suffix "${suffix}.${omp_version}") +if(NOT "${LIBOMP_OMP_VERSION}" STREQUAL "41") + set(suffix "${suffix}.${LIBOMP_OMP_VERSION}") endif() -if(${STATS_GATHERING}) +if(${LIBOMP_STATS}) set(suffix "${suffix}.s1") endif() -if(${OMPT_SUPPORT}) +if(${LIBOMP_OMPT_SUPPORT}) set(suffix "${suffix}.ompt") - if(NOT ${OMPT_BLAME}) + if(NOT ${LIBOMP_OMPT_BLAME}) set(suffix "${suffix}.no-ompt-blame") endif() - if(NOT ${OMPT_TRACE}) + if(NOT ${LIBOMP_OMPT_TRACE}) set(suffix "${suffix}.no-ompt-trace") endif() endif() @@ -347,9 +327,9 @@ ######################### # Setting directory names if(${MIC}) - set(platform "${real_os}_${mic_arch}" ) # e.g., lin_knf, lin_knc + set(platform "${real_os}_${LIBOMP_MIC_ARCH}" ) # e.g., lin_knf, lin_knc else() - set(platform "${real_os}_${arch}" ) # e.g., lin_32e, mac_32 + set(platform "${real_os}_${LIBOMP_ARCH}" ) # e.g., lin_32e, mac_32 endif() set(build_dir "${CMAKE_CURRENT_BINARY_DIR}" ) # build directory (Where CMakeCache.txt is created, build files generated) set(src_dir "${CMAKE_CURRENT_SOURCE_DIR}/src" ) @@ -367,7 +347,7 @@ # macs use lib/ subdirectory for fat libraries that contain both IA-32 architecture and Intel(R) 64 architecture code. _export_lib_fat_dir(${platform} export_lib_fat_dir) endif() -set(inc_dir "${src_dir}/include/${omp_version}") +set(inc_dir "${src_dir}/include/${LIBOMP_OMP_VERSION}") ############################ # Setting final library name @@ -378,17 +358,17 @@ if(${STUBS_LIBRARY}) set(lib_item "${lib_item}stubs") endif() -set(lib_item "${lib_item}${version}") +set(lib_item "${lib_item}${LIBOMP_VERSION}") if(${WINDOWS}) set(lib_item "${lib_item}md") endif() -set(IOMP_LIB_NAME "${lib_item}" CACHE STRING "OMP library name") +set(LIBOMP_LIB_NAME "${lib_item}" CACHE STRING "OMP library name") set(lib_ext "${dll}") # ${lib_file} is real library name: # libiomp5.so for Linux # libiomp5.dylib for Mac # libiomp5md.dll for Windows -set(lib_file "${IOMP_LIB_NAME}${lib_ext}") +set(lib_file "${LIBOMP_LIB_NAME}${lib_ext}") ######################################## # Setting export file names @@ -396,7 +376,7 @@ set(imp_file "${lib_item}${lib}") # this is exported (libiomp5md.lib) set(def_file "${lib_item}.def") # this is not exported set(rc_file "${lib_item}.rc") # this is not exported - if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" OR ${USE_BUILDPL_RULES}) + if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" OR ${LIBOMP_USE_BUILDPL_RULES}) set(pdb_file "${lib_file}.pdb") # this is exported if it exists (libiomp5md.dll.pdb) endif() endif() @@ -406,7 +386,7 @@ set(export_cmn_files1 "omp.h" "omp_lib.h" "omp_lib.f" "omp_lib.f90") set(export_cmn_files2 "iomp.h") -if(${OMPT_SUPPORT}) +if(${LIBOMP_OMPT_SUPPORT}) set(export_cmn_files1 ${export_cmn_files1} "ompt.h") endif() @@ -429,7 +409,7 @@ # Linker Flags (cmake/CommonFlags.cmake) # Archiver Flags (cmake/CommonFlags.cmake) # Helper Perl Script Flags (cmake/PerlFlags.cmake) -# * Inside the cmake/CommonFlags.cmake file, the LIBIOMP_*FLAGS are added. +# * Inside the cmake/CommonFlags.cmake file, the LIBOMP_*FLAGS are added. # * Cannot use CMAKE_*_FLAGS directly because -x c++ is put in the linker command and mangles the linking phase. # preprocessor flags (-D definitions and -I includes) @@ -502,7 +482,7 @@ # Grab the Perl flags set_ev_flags(ev_flags) # expand-vars.pl flags set_gd_flags(gd_flags) # generate-def.pl flags (Windows only) -set(oa_opts "--os=${real_os}" "--arch=${arch}") # sent to the perl scripts +set(oa_opts "--os=${real_os}" "--arch=${LIBOMP_ARCH}") # sent to the perl scripts ######################################################### # Getting correct source files (cmake/SourceFiles.cmake) @@ -531,7 +511,7 @@ debug_say_var(CMAKE_RC_COMPILER) debug_say_var(CMAKE_C_COMPILER_ID) debug_say_var(date) -debug_say_var(stats) +debug_say_var(LIBOMP_STATS) debug_say_var(lib_file) debug_say_var(export_lib_files) debug_say_var(DEFINITIONS_FLAGS) @@ -565,7 +545,7 @@ # --- Create all --- add_custom_target(lib ALL DEPENDS iomp5) add_custom_target(inc ALL DEPENDS ${export_inc_files}) -if(${create_fortran_modules}) +if(${LIBOMP_FORTRAN_MODULES}) add_custom_target(mod ALL DEPENDS ${export_mod_files}) endif() @@ -575,7 +555,7 @@ add_custom_target(clean-common COMMAND ${CMAKE_COMMAND} -E remove -f ${export_cmn_files}) # --- Put headers in convenient locations post build --- -if(${LIBIOMP_COPY_EXPORTS}) +if(${LIBOMP_COPY_EXPORTS}) add_custom_command(TARGET common POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${export_cmn_dir1} COMMAND ${CMAKE_COMMAND} -E make_directory ${export_cmn_dir2} @@ -585,7 +565,7 @@ COMMAND ${CMAKE_COMMAND} -E copy omp_lib.f90 ${export_cmn_dir1} COMMAND ${CMAKE_COMMAND} -E copy iomp.h ${export_cmn_dir2} ) - if(${OMPT_SUPPORT}) + if(${LIBOMP_OMPT_SUPPORT}) add_custom_command(TARGET common POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${export_cmn_dir1} COMMAND ${CMAKE_COMMAND} -E copy ompt.h ${export_cmn_dir1} @@ -595,7 +575,7 @@ COMMAND ${CMAKE_COMMAND} -E make_directory ${export_inc_dir} COMMAND ${CMAKE_COMMAND} -E copy iomp_lib.h ${export_inc_dir} ) - if(${create_fortran_modules}) + if(${LIBOMP_FORTRAN_MODULES}) add_custom_command(TARGET mod POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${export_mod_dir} COMMAND ${CMAKE_COMMAND} -E copy omp_lib.mod ${export_mod_dir} @@ -620,7 +600,7 @@ # Remove any cmake-automatic linking of libraries by linker, This is so linux # and mac don't include libstdc++ just because we compile c++ files. -if(${USE_PREDEFINED_LINKER_FLAGS}) +if(${LIBOMP_USE_PREDEFINED_LINKER_FLAGS}) set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "") set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") set(CMAKE_ASM_IMPLICIT_LINK_LIBRARIES "") @@ -638,18 +618,18 @@ # --- Copy libiomp into exports directory post build --- if(${WINDOWS}) - get_target_property(LIBIOMP_OUTPUT_DIRECTORY iomp5 RUNTIME_OUTPUT_DIRECTORY) + get_target_property(LIBOMP_OUTPUT_DIRECTORY iomp5 RUNTIME_OUTPUT_DIRECTORY) else() - get_target_property(LIBIOMP_OUTPUT_DIRECTORY iomp5 LIBRARY_OUTPUT_DIRECTORY) + get_target_property(LIBOMP_OUTPUT_DIRECTORY iomp5 LIBRARY_OUTPUT_DIRECTORY) endif() -if(NOT LIBIOMP_OUTPUT_DIRECTORY) - set(LIBIOMP_OUTPUT_DIRECTORY ${build_dir}) +if(NOT LIBOMP_OUTPUT_DIRECTORY) + set(LIBOMP_OUTPUT_DIRECTORY ${build_dir}) endif() -if(${LIBIOMP_COPY_EXPORTS}) +if(${LIBOMP_COPY_EXPORTS}) add_custom_command(TARGET iomp5 POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${export_lib_dir} - COMMAND ${CMAKE_COMMAND} -E copy ${LIBIOMP_OUTPUT_DIRECTORY}/${lib_file} ${export_lib_dir} + COMMAND ${CMAKE_COMMAND} -E copy ${LIBOMP_OUTPUT_DIRECTORY}/${lib_file} ${export_lib_dir} ) endif() @@ -678,7 +658,7 @@ add_definitions(${DEFINITIONS_FLAGS}) # If creating a build that imitates build.pl's rules then set USE_BUILDPL_RULES to true -if(${USE_BUILDPL_RULES}) +if(${LIBOMP_USE_BUILDPL_RULES}) include(BuildPLRules) endif() @@ -741,14 +721,14 @@ ) add_custom_command(TARGET iomp5imp PRE_BUILD COMMAND ${CMAKE_COMMAND} -E remove -f ${imp_file}) add_dependencies(iomp5imp iomp5) - get_target_property(LIBIOMPIMP_OUTPUT_DIRECTORY iomp5imp ARCHIVE_OUTPUT_DIRECTORY) - if(NOT LIBIOMPIMP_OUTPUT_DIRECTORY) - set(LIBIOMPIMP_OUTPUT_DIRECTORY ${build_dir}) + get_target_property(LIBOMPIMP_OUTPUT_DIRECTORY iomp5imp ARCHIVE_OUTPUT_DIRECTORY) + if(NOT LIBOMPIMP_OUTPUT_DIRECTORY) + set(LIBOMPIMP_OUTPUT_DIRECTORY ${build_dir}) endif() - if(${LIBIOMP_COPY_EXPORTS}) + if(${LIBOMP_COPY_EXPORTS}) add_custom_command(TARGET iomp5imp POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${export_lib_dir} - COMMAND ${CMAKE_COMMAND} -E copy ${LIBIOMPIMP_OUTPUT_DIRECTORY}/${imp_file} ${export_lib_dir} + COMMAND ${CMAKE_COMMAND} -E copy ${LIBOMPIMP_OUTPUT_DIRECTORY}/${imp_file} ${export_lib_dir} ) endif() endif() @@ -791,22 +771,22 @@ ###################################################### # Micro test rules for after library has been built (cmake/MicroTests.cmake) # - Only perform if ${tests} == true (specify when invoking: cmake -Dtests=on ...) -if(${tests}) +if(${LIBOMP_MICRO_TESTS}) include(MicroTests) add_custom_target(libiomp-micro-tests) - if(NOT ${MIC} AND ${test_touch}) + if(NOT ${MIC} AND ${LIBOMP_TEST_TOUCH}) add_dependencies(libiomp-micro-tests libiomp-test-touch) endif() - if(${LINUX} AND ${test_relo}) + if(${LINUX} AND ${LIBOMP_TEST_RELO}) add_dependencies(libiomp-micro-tests libiomp-test-relo) endif() - if(${LINUX} AND ${test_execstack}) + if(${LINUX} AND ${LIBOMP_TEST_EXECSTACK}) add_dependencies(libiomp-micro-tests libiomp-test-execstack) endif() - if(${MIC} AND ${test_instr}) + if(${MIC} AND ${LIBOMP_TEST_INSTR}) add_dependencies(libiomp-micro-tests libiomp-test-instr) endif() - if(${test_deps}) + if(${LIBOMP_TEST_DEPS}) add_dependencies(libiomp-micro-tests libiomp-test-deps) endif() endif() @@ -814,7 +794,7 @@ ###################################################### # --- Create Fortran Files --- # omp_lib.mod -if(${create_fortran_modules}) +if(${LIBOMP_FORTRAN_MODULES}) # Grab fortran-compiler-dependent flags # Cmake will look for cmake/${CMAKE_Fortran_COMPILER_ID}/FortranFlags.cmake to append additional fortran flags. enable_language(Fortran) @@ -871,71 +851,71 @@ endif() # libiomp.rc : ev-flags += -D KMP_FILE=$(lib_file) set_source_files_properties(libiomp.rc PROPERTIES COMPILE_DEFINITIONS "-D KMP_FILE=${lib_file}") -expand_vars_recipe(${src_dir}/include/${omp_version} omp.h) -expand_vars_recipe(${src_dir}/include/${omp_version} ompt.h) -expand_vars_recipe(${src_dir}/include/${omp_version} omp_lib.h) -expand_vars_recipe(${src_dir}/include/${omp_version} omp_lib.f) -expand_vars_recipe(${src_dir}/include/${omp_version} omp_lib.f90) -expand_vars_recipe(${src_dir}/include/${omp_version} iomp.h) -expand_vars_recipe(${src_dir}/include/${omp_version} iomp_lib.h) +expand_vars_recipe(${src_dir}/include/${LIBOMP_OMP_VERSION} omp.h) +expand_vars_recipe(${src_dir}/include/${LIBOMP_OMP_VERSION} ompt.h) +expand_vars_recipe(${src_dir}/include/${LIBOMP_OMP_VERSION} omp_lib.h) +expand_vars_recipe(${src_dir}/include/${LIBOMP_OMP_VERSION} omp_lib.f) +expand_vars_recipe(${src_dir}/include/${LIBOMP_OMP_VERSION} omp_lib.f90) +expand_vars_recipe(${src_dir}/include/${LIBOMP_OMP_VERSION} iomp.h) +expand_vars_recipe(${src_dir}/include/${LIBOMP_OMP_VERSION} iomp_lib.h) expand_vars_recipe(${src_dir} libiomp.rc) #################################################################### # Print configuration after all variables are set. -if(${LIBIOMP_STANDALONE_BUILD}) - say("LIBIOMP: Operating System -- ${os}") - say("LIBIOMP: Target Architecture -- ${arch}") +if(${LIBOMP_STANDALONE_BUILD}) + say("LIBOMP: Operating System -- ${LIBOMP_OS}") + say("LIBOMP: Target Architecture -- ${LIBOMP_ARCH}") if(${MIC}) - say("LIBIOMP: Intel(R) MIC Architecture -- ${mic_arch}") + say("LIBOMP: Intel(R) MIC Architecture -- ${LIBOMP_MIC_ARCH}") endif() - say("LIBIOMP: Build Type -- ${CMAKE_BUILD_TYPE}") - say("LIBIOMP: OpenMP Version -- ${omp_version}") - say("LIBIOMP: Lib Type -- ${lib_type}") - say("LIBIOMP: Fortran Modules -- ${create_fortran_modules}") + say("LIBOMP: Build Type -- ${CMAKE_BUILD_TYPE}") + say("LIBOMP: OpenMP Version -- ${LIBOMP_OMP_VERSION}") + say("LIBOMP: Lib Type -- ${LIBOMP_LIB_TYPE}") + say("LIBOMP: Fortran Modules -- ${LIBOMP_FORTRAN_MODULES}") # will say development if all zeros if("${build_number}" STREQUAL "00000000") set(build "development") else() set(build "${build_number}") endif() - say("LIBIOMP: Build -- ${build}") - say("LIBIOMP: Stats-Gathering -- ${stats}") - say("LIBIOMP: OMPT-support -- ${ompt_support}") - if(${OMPT_SUPPORT}) - say("LIBIOMP: OMPT-blame -- ${ompt_blame}") - say("LIBIOMP: OMPT-trace -- ${ompt_trace}") - endif() - say("LIBIOMP: Use build.pl rules -- ${USE_BUILDPL_RULES}") - say("LIBIOMP: Adaptive locks -- ${USE_ADAPTIVE_LOCKS}") - say("LIBIOMP: Use predefined linker flags -- ${USE_PREDEFINED_LINKER_FLAGS}") - say("LIBIOMP: Compiler supports quad precision -- ${COMPILER_SUPPORTS_QUAD_PRECISION}") + say("LIBOMP: Build -- ${build}") + say("LIBOMP: Stats-Gathering -- ${LIBOMP_STATS}") + say("LIBOMP: OMPT-support -- ${LIBOMP_OMPT_SUPPORT}") + if(${LIBOMP_OMPT_SUPPORT}) + say("LIBOMP: OMPT-blame -- ${LIBOMP_OMPT_BLAME}") + say("LIBOMP: OMPT-trace -- ${LIBOMP_OMPT_TRACE}") + endif() + say("LIBOMP: Use build.pl rules -- ${LIBOMP_USE_BUILDPL_RULES}") + say("LIBOMP: Adaptive locks -- ${LIBOMP_USE_ADAPTIVE_LOCKS}") + say("LIBOMP: Use predefined linker flags -- ${LIBOMP_USE_PREDEFINED_LINKER_FLAGS}") + say("LIBOMP: Compiler supports quad precision -- ${LIBOMP_COMPILER_SUPPORTS_QUAD_PRECISION}") endif() #################################################################### # Install rules # We want to install libiomp5 in DESTDIR/CMAKE_INSTALL_PREFIX/lib # We want to install headers in DESTDIR/CMAKE_INSTALL_PREFIX/include -if(${LIBIOMP_STANDALONE_BUILD}) - set(LIBIOMP_HEADERS_INSTALL_PATH include) +if(${LIBOMP_STANDALONE_BUILD}) + set(LIBOMP_HEADERS_INSTALL_PATH include) else() string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION}) - set(LIBIOMP_HEADERS_INSTALL_PATH lib${LIBIOMP_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) + set(LIBOMP_HEADERS_INSTALL_PATH lib${LIBOMP_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) endif() if(${WINDOWS}) install(TARGETS iomp5 RUNTIME DESTINATION bin) if(NOT "${imp_file}" STREQUAL "") - install(TARGETS iomp5imp ARCHIVE DESTINATION lib${LIBIOMP_LIBDIR_SUFFIX}) + install(TARGETS iomp5imp ARCHIVE DESTINATION lib${LIBOMP_LIBDIR_SUFFIX}) endif() else() - install(TARGETS iomp5 LIBRARY DESTINATION lib${LIBIOMP_LIBDIR_SUFFIX}) + install(TARGETS iomp5 LIBRARY DESTINATION lib${LIBOMP_LIBDIR_SUFFIX}) endif() install( FILES ${build_dir}/omp.h ${build_dir}/iomp.h - DESTINATION ${LIBIOMP_HEADERS_INSTALL_PATH} + DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} ) -if(${OMPT_SUPPORT}) - install( FILES ${build_dir}/ompt.h DESTINATION ${LIBIOMP_HEADERS_INSTALL_PATH}) +if(${LIBOMP_OMPT_SUPPORT}) + install(FILES ${build_dir}/ompt.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH}) endif() Index: openmp/trunk/runtime/cmake/BuildPLRules.cmake =================================================================== --- openmp/trunk/runtime/cmake/BuildPLRules.cmake +++ openmp/trunk/runtime/cmake/BuildPLRules.cmake @@ -12,7 +12,7 @@ ############################################################################### # This file contains additional build rules that correspond to build.pl's rules. # Building libiomp5.dbg is linux only, Windows will build libiomp5md.dll.pdb -# This file is only active if ${USE_BUILDPL_RULES} is true. +# This file is only active if ${LIBOMP_USE_BUILDPL_RULES} is true. # # ######### BUILD DEPENDENCIES ########## # Index: openmp/trunk/runtime/cmake/CommonFlags.cmake =================================================================== --- openmp/trunk/runtime/cmake/CommonFlags.cmake +++ openmp/trunk/runtime/cmake/CommonFlags.cmake @@ -57,7 +57,7 @@ # Global Assembly flags function(append_asm_flags_common input_asm_flags) set(local_asm_flags) - set(${input_asm_flags} "${${input_asm_flags}}" "${local_asm_flags}" "${LIBIOMP_ASMFLAGS}" PARENT_SCOPE) + set(${input_asm_flags} "${${input_asm_flags}}" "${local_asm_flags}" "${LIBOMP_ASMFLAGS}" PARENT_SCOPE) endfunction() ######################################################### @@ -65,15 +65,15 @@ function(append_c_and_cxx_flags_common input_c_flags input_cxx_flags) set(local_c_flags) set(local_cxx_flags) - set(${input_c_flags} "${${input_c_flags}}" "${local_c_flags}" "${LIBIOMP_CFLAGS}" PARENT_SCOPE) - set(${input_cxx_flags} "${${input_cxx_flags}}" "${local_cxx_flags}" "${LIBIOMP_CXXFLAGS}" PARENT_SCOPE) + set(${input_c_flags} "${${input_c_flags}}" "${local_c_flags}" "${LIBOMP_CFLAGS}" PARENT_SCOPE) + set(${input_cxx_flags} "${${input_cxx_flags}}" "${local_cxx_flags}" "${LIBOMP_CXXFLAGS}" PARENT_SCOPE) endfunction() ######################################################### # Global Fortran Compiler flags (for creating .mod files) function(append_fort_flags_common input_fort_flags) set(local_fort_flags) - set(${input_fort_flags} "${${input_fort_flags}}" "${local_fort_flags}" "${LIBIOMP_FFLAGS}" PARENT_SCOPE) + set(${input_fort_flags} "${${input_fort_flags}}" "${local_fort_flags}" "${LIBOMP_FFLAGS}" PARENT_SCOPE) endfunction() ######################################################### @@ -82,7 +82,7 @@ set(local_ld_flags) set(local_ld_flags_libs) - if(${USE_PREDEFINED_LINKER_FLAGS}) + if(${LIBOMP_USE_PREDEFINED_LINKER_FLAGS}) ################################# # Windows linker flags @@ -92,8 +92,8 @@ # MAC linker flags elseif(${MAC}) append_linker_flags("-single_module") - append_linker_flags("-current_version ${version}.0") - append_linker_flags("-compatibility_version ${version}.0") + append_linker_flags("-current_version ${LIBOMP_VERSION}.0") + append_linker_flags("-compatibility_version ${LIBOMP_VERSION}.0") ##################################################################################### # Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) linker flags elseif(${MIC}) @@ -104,7 +104,7 @@ if(NOT ${STUBS_LIBRARY}) append_linker_flags_library("-pthread") # link in pthread library endif() - if(${STATS_GATHERING}) + if(${LIBOMP_STATS}) append_linker_flags_library("-Wl,-lstdc++") # link in standard c++ library (stats-gathering needs it) endif() ######################### @@ -123,10 +123,10 @@ endif() endif() # if(${OPERATING_SYSTEM}) ... - endif() # USE_PREDEFINED_LINKER_FLAGS + endif() # LIBOMP_USE_PREDEFINED_LINKER_FLAGS - set(${input_ld_flags} "${${input_ld_flags}}" "${local_ld_flags}" "${LIBIOMP_LDFLAGS}" PARENT_SCOPE) - set(${input_ld_flags_libs} "${${input_ld_flags_libs}}" "${local_ld_flags_libs}" "${LIBIOMP_LIBFLAGS}" PARENT_SCOPE) + set(${input_ld_flags} "${${input_ld_flags}}" "${local_ld_flags}" "${LIBOMP_LDFLAGS}" PARENT_SCOPE) + set(${input_ld_flags_libs} "${${input_ld_flags_libs}}" "${local_ld_flags_libs}" "${LIBOMP_LIBFLAGS}" PARENT_SCOPE) endfunction() ######################################################### Index: openmp/trunk/runtime/cmake/Definitions.cmake =================================================================== --- openmp/trunk/runtime/cmake/Definitions.cmake +++ openmp/trunk/runtime/cmake/Definitions.cmake @@ -22,7 +22,7 @@ append_definitions("-D KMP_ARCH_STR=\"\\\\\"${legal_arch}\\\\\"\"") append_definitions("-D BUILD_I8") append_definitions("-D KMP_LIBRARY_FILE=\\\\\"${lib_file}\\\\\"") # yes... you need 5 backslashes... - append_definitions("-D KMP_VERSION_MAJOR=${version}") + append_definitions("-D KMP_VERSION_MAJOR=${LIBOMP_VERSION}") append_definitions("-D KMP_NESTED_HOT_TEAMS") # customize to 128 bytes for ppc64 @@ -35,7 +35,7 @@ append_definitions("-D KMP_ADJUST_BLOCKTIME=1") append_definitions("-D BUILD_PARALLEL_ORDERED") append_definitions("-D KMP_ASM_INTRINS") - if(${USE_ITT_NOTIFY}) + if(${LIBOMP_USE_ITT_NOTIFY}) append_definitions("-D USE_ITT_NOTIFY=1") else() append_definitions("-D USE_ITT_NOTIFY=0") @@ -43,7 +43,7 @@ endif() append_definitions("-D INTEL_ITTNOTIFY_PREFIX=__kmp_itt_") - if(${USE_VERSION_SYMBOLS}) + if(${LIBOMP_USE_VERSION_SYMBOLS}) append_definitions("-D KMP_USE_VERSION_SYMBOLS") endif() @@ -65,7 +65,7 @@ append_definitions("-D _REENTRANT") append_definitions("-D BUILD_TV") append_definitions("-D USE_CBLKDATA") - if(NOT "${version}" STREQUAL "4") + if(NOT "${LIBOMP_VERSION}" STREQUAL "4") append_definitions("-D KMP_GOMP_COMPAT") endif() endif() @@ -95,22 +95,22 @@ append_definitions("-D _DEBUG") append_definitions("-D BUILD_DEBUG") endif() - if(${STATS_GATHERING}) + if(${LIBOMP_STATS}) append_definitions("-D KMP_STATS_ENABLED=1") else() append_definitions("-D KMP_STATS_ENABLED=0") endif() - if(${OMPT_SUPPORT}) + if(${LIBOMP_OMPT_SUPPORT}) append_definitions("-D OMPT_SUPPORT=1") else() append_definitions("-D OMPT_SUPPORT=0") endif() - if(${OMPT_BLAME}) + if(${LIBOMP_OMPT_BLAME}) append_definitions("-D OMPT_BLAME=1") else() append_definitions("-D OMPT_BLAME=0") endif() - if(${OMPT_TRACE}) + if(${LIBOMP_OMPT_TRACE}) append_definitions("-D OMPT_TRACE=1") else() append_definitions("-D OMPT_TRACE=0") @@ -121,16 +121,16 @@ set(have_omp_41 0) set(have_omp_40 0) set(have_omp_30 0) - if(${omp_version} EQUAL 50 OR ${omp_version} GREATER 50) + if(${LIBOMP_OMP_VERSION} EQUAL 50 OR ${LIBOMP_OMP_VERSION} GREATER 50) set(have_omp_50 1) endif() - if(${omp_version} EQUAL 41 OR ${omp_version} GREATER 41) + if(${LIBOMP_OMP_VERSION} EQUAL 41 OR ${LIBOMP_OMP_VERSION} GREATER 41) set(have_omp_41 1) endif() - if(${omp_version} EQUAL 40 OR ${omp_version} GREATER 40) + if(${LIBOMP_OMP_VERSION} EQUAL 40 OR ${LIBOMP_OMP_VERSION} GREATER 40) set(have_omp_40 1) endif() - if(${omp_version} EQUAL 30 OR ${omp_version} GREATER 30) + if(${LIBOMP_OMP_VERSION} EQUAL 30 OR ${LIBOMP_OMP_VERSION} GREATER 30) set(have_omp_30 1) endif() append_definitions("-D OMP_50_ENABLED=${have_omp_50}") @@ -140,7 +140,7 @@ # Architectural definitions if(${INTEL64} OR ${IA32}) - if(${USE_ADAPTIVE_LOCKS}) + if(${LIBOMP_USE_ADAPTIVE_LOCKS}) append_definitions("-D KMP_USE_ADAPTIVE_LOCKS=1") else() append_definitions("-D KMP_USE_ADAPTIVE_LOCKS=0") @@ -150,11 +150,11 @@ append_definitions("-D KMP_USE_ADAPTIVE_LOCKS=0") append_definitions("-D KMP_DEBUG_ADAPTIVE_LOCKS=0") endif() - if(${USE_INTERNODE_ALIGNMENT}) + if(${LIBOMP_USE_INTERNODE_ALIGNMENT}) append_definitions("-D KMP_USE_INTERNODE_ALIGNMENT=1") else() append_definitions("-D KMP_USE_INTERNODE_ALIGNMENT=0") endif() - set(${input_cpp_flags} "${${input_cpp_flags}}" "${local_cpp_flags}" "${LIBIOMP_CPPFLAGS}" "$ENV{CPPFLAGS}" PARENT_SCOPE) + set(${input_cpp_flags} "${${input_cpp_flags}}" "${local_cpp_flags}" "${LIBOMP_CPPFLAGS}" "$ENV{CPPFLAGS}" PARENT_SCOPE) endfunction() Index: openmp/trunk/runtime/cmake/Intel/CFlags.cmake =================================================================== --- openmp/trunk/runtime/cmake/Intel/CFlags.cmake +++ openmp/trunk/runtime/cmake/Intel/CFlags.cmake @@ -104,7 +104,7 @@ append_linker_flags("-dll") append_linker_flags("-WX:NO") append_linker_flags("-incremental:no") - append_linker_flags("-version:${version}.0") + 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. @@ -138,7 +138,7 @@ append_linker_flags_library("-pthread") # link in pthread library append_linker_flags_library("-ldl") # link in libdl (dynamic loader library) endif() - if(${STATS_GATHERING}) + if(${LIBOMP_STATS}) append_linker_flags_library("-Wl,-lstdc++") # link in standard c++ library (stats-gathering needs it) endif() else() Index: openmp/trunk/runtime/cmake/MSVC/CFlags.cmake =================================================================== --- openmp/trunk/runtime/cmake/MSVC/CFlags.cmake +++ openmp/trunk/runtime/cmake/MSVC/CFlags.cmake @@ -53,7 +53,7 @@ set(local_ld_flags) set(local_ld_flags_libs) append_linker_flags("-WX:NO") - append_linker_flags("-version:${version}.0") + 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. Index: openmp/trunk/runtime/cmake/MicroTests.cmake =================================================================== --- openmp/trunk/runtime/cmake/MicroTests.cmake +++ openmp/trunk/runtime/cmake/MicroTests.cmake @@ -183,9 +183,9 @@ if(${STD_CPP_LIB}) set(td_exp ${td_exp},libstdc++.so.6) endif() - if("${mic_arch}" STREQUAL "knf") + if("${LIBOMP_MIC_ARCH}" STREQUAL "knf") set(td_exp ${td_exp},ld-linux-l1om.so.2,libgcc_s.so.1) - elseif("${mic_arch}" STREQUAL "knc") + elseif("${LIBOMP_MIC_ARCH}" STREQUAL "knc") set(td_exp ${td_exp},ld-linux-k1om.so.2) endif() else() Index: openmp/trunk/runtime/cmake/PerlFlags.cmake =================================================================== --- openmp/trunk/runtime/cmake/PerlFlags.cmake +++ openmp/trunk/runtime/cmake/PerlFlags.cmake @@ -26,14 +26,14 @@ # Perl expand-vars.pl flags function(set_ev_flags input_ev_flags) set(local_ev_flags) - set_legal_type("${lib_type}" legal_type) - set_legal_arch("${arch}" legal_arch) + set_legal_type("${LIBOMP_LIB_TYPE}" legal_type) + set_legal_arch("${LIBOMP_ARCH}" legal_arch) # need -D Revision="\$Revision" to show up append_ev_flags("-D Revision=\"\\\\$$Revision\"") append_ev_flags("-D Date=\"\\\\$$Date\"") append_ev_flags("-D KMP_TYPE=\"${legal_type}\"") append_ev_flags("-D KMP_ARCH=\"${legal_arch}\"") - append_ev_flags("-D KMP_VERSION_MAJOR=${version}") + append_ev_flags("-D KMP_VERSION_MAJOR=${LIBOMP_VERSION}") append_ev_flags("-D KMP_VERSION_MINOR=0") append_ev_flags("-D KMP_VERSION_BUILD=${build_number}") append_ev_flags("-D KMP_BUILD_DATE=\"${date}\"") @@ -45,9 +45,9 @@ append_ev_flags("-D KMP_DIAG=0") append_ev_flags("-D KMP_DEBUG_INFO=0") endif() - if(${omp_version} EQUAL 40) + if(${LIBOMP_VERSION} EQUAL 40) append_ev_flags("-D OMP_VERSION=201307") - elseif(${omp_version} EQUAL 30) + elseif(${LIBOMP_VERSION} EQUAL 30) append_ev_flags("-D OMP_VERSION=201107") else() append_ev_flags("-D OMP_VERSION=200505") @@ -62,7 +62,7 @@ elseif(${INTEL64}) append_gd_flags("-D arch_32e") else() - append_gd_flags("-D arch_${arch}") + append_gd_flags("-D arch_${LIBOMP_ARCH}") endif() if(${NORMAL_LIBRARY}) append_gd_flags("-D norm") @@ -71,22 +71,22 @@ elseif(${STUBS_LIBRARY}) append_gd_flags("-D stub") endif() - if(${omp_version} GREATER 41 OR ${omp_version} EQUAL 41) + if(${LIBOMP_OMP_VERSION} GREATER 41 OR ${LIBOMP_OMP_VERSION} EQUAL 41) append_gd_flags("-D OMP_41") endif() - if(${omp_version} GREATER 40 OR ${omp_version} EQUAL 40) + if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40) append_gd_flags("-D OMP_40") endif() - if(${omp_version} GREATER 30 OR ${omp_version} EQUAL 30) + if(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30) append_gd_flags("-D OMP_30") endif() - if(NOT "${version}" STREQUAL "4") + if(NOT "${LIBOMP_VERSION}" STREQUAL "4") append_gd_flags("-D msvc_compat") endif() if(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD}) append_gd_flags("-D KMP_DEBUG") endif() - if(${COMPILER_SUPPORTS_QUAD_PRECISION}) + if(${LIBOMP_COMPILER_SUPPORTS_QUAD_PRECISION}) append_gd_flags("-D HAVE_QUAD") endif() set(${input_gd_flags} "${local_gd_flags}" PARENT_SCOPE) Index: openmp/trunk/runtime/cmake/SourceFiles.cmake =================================================================== --- openmp/trunk/runtime/cmake/SourceFiles.cmake +++ openmp/trunk/runtime/cmake/SourceFiles.cmake @@ -32,7 +32,7 @@ append_c_source_file("kmp_ftn_cdecl.c") append_c_source_file("kmp_ftn_extra.c") append_c_source_file("kmp_version.c") - if(${OMPT_SUPPORT}) + if(${LIBOMP_OMPT_SUPPORT}) append_c_source_file("ompt-general.c") endif() if(${STUBS_LIBRARY}) @@ -55,7 +55,7 @@ append_c_source_file("kmp_taskq.c") append_c_source_file("kmp_threadprivate.c") append_c_source_file("kmp_utility.c") - if(${USE_ITT_NOTIFY}) + if(${LIBOMP_USE_ITT_NOTIFY}) append_c_source_file("thirdparty/ittnotify/ittnotify_static.c") endif() if(${WINDOWS}) @@ -78,11 +78,11 @@ append_cpp_source_file("kmp_dispatch.cpp") append_cpp_source_file("kmp_lock.cpp") append_cpp_source_file("kmp_sched.cpp") - if(${omp_version} GREATER 40 OR ${omp_version} EQUAL 40) + if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40) append_cpp_source_file("kmp_taskdeps.cpp") append_cpp_source_file("kmp_cancel.cpp") endif() - if(${STATS_GATHERING}) + if(${LIBOMP_STATS}) append_cpp_source_file("kmp_stats.cpp") append_cpp_source_file("kmp_stats_timing.cpp") endif()