480 lines · plain
1#2#//===----------------------------------------------------------------------===//3#//4#// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5#// See https://llvm.org/LICENSE.txt for license information.6#// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7#//8#//===----------------------------------------------------------------------===//9#10 11if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")12 message(FATAL_ERROR "Direct configuration not supported, please use parent directory!")13endif()14 15# Add cmake directory to search for custom cmake functions16set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})17 18# Set libomp version19set(LIBOMP_VERSION_MAJOR 5)20set(LIBOMP_VERSION_MINOR 0)21 22# These include files are in the cmake/ subdirectory23include(LibompUtils)24include(LibompGetArchitecture)25include(LibompHandleFlags)26include(LibompDefinitions)27 28# Determine the target architecture29if(${OPENMP_STANDALONE_BUILD})30 # If adding a new architecture, take a look at cmake/LibompGetArchitecture.cmake31 libomp_get_architecture(LIBOMP_DETECTED_ARCH)32 set(LIBOMP_ARCH ${LIBOMP_DETECTED_ARCH} CACHE STRING33 "The architecture to build for (x86_64/i386/arm/ppc/ppc64/ppc64le/aarch64/aarch64_32/mic/mips/mips64/riscv64/loongarch64/ve/s390x/sparc/sparcv9/wasm32).")34 # Should assertions be enabled? They are on by default.35 set(LIBOMP_ENABLE_ASSERTIONS TRUE CACHE BOOL36 "enable assertions?")37 string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)38else() # Part of LLVM build39 # Determine the native architecture from LLVM.40 string(TOLOWER "${LLVM_TARGET_ARCH}" LIBOMP_NATIVE_ARCH)41 if( LIBOMP_NATIVE_ARCH STREQUAL "host" )42 string(REGEX MATCH "^[^-]*" LIBOMP_NATIVE_ARCH ${LLVM_HOST_TRIPLE})43 endif ()44 if(LIBOMP_NATIVE_ARCH MATCHES "i[2-6]86")45 set(LIBOMP_ARCH i386)46 elseif(LIBOMP_NATIVE_ARCH STREQUAL "x86")47 set(LIBOMP_ARCH i386)48 elseif(LIBOMP_NATIVE_ARCH STREQUAL "amd64")49 set(LIBOMP_ARCH x86_64)50 elseif(LIBOMP_NATIVE_ARCH STREQUAL "x86_64")51 set(LIBOMP_ARCH x86_64)52 elseif(LIBOMP_NATIVE_ARCH MATCHES "powerpc64le")53 set(LIBOMP_ARCH ppc64le)54 elseif(LIBOMP_NATIVE_ARCH MATCHES "powerpc64")55 set(LIBOMP_ARCH ppc64)56 elseif(LIBOMP_NATIVE_ARCH MATCHES "powerpc")57 set(LIBOMP_ARCH ppc)58 elseif(LIBOMP_NATIVE_ARCH MATCHES "aarch64_32")59 set(LIBOMP_ARCH aarch64_32)60 elseif(LIBOMP_NATIVE_ARCH MATCHES "aarch64")61 set(LIBOMP_ARCH aarch64)62 elseif(LIBOMP_NATIVE_ARCH MATCHES "arm64")63 set(LIBOMP_ARCH aarch64)64 elseif(LIBOMP_NATIVE_ARCH MATCHES "arm")65 set(LIBOMP_ARCH arm)66 elseif(LIBOMP_NATIVE_ARCH MATCHES "riscv64")67 set(LIBOMP_ARCH riscv64)68 elseif(LIBOMP_NATIVE_ARCH MATCHES "loongarch64")69 set(LIBOMP_ARCH loongarch64)70 elseif(LIBOMP_NATIVE_ARCH MATCHES "ve")71 set(LIBOMP_ARCH ve)72 elseif(LIBOMP_NATIVE_ARCH MATCHES "s390x")73 set(LIBOMP_ARCH s390x)74 elseif(LIBOMP_NATIVE_ARCH MATCHES "sparcv9")75 set(LIBOMP_ARCH sparcv9)76 elseif(LIBOMP_NATIVE_ARCH MATCHES "sparc")77 set(LIBOMP_ARCH sparc)78 elseif(LIBOMP_NATIVE_ARCH MATCHES "wasm")79 set(LIBOMP_ARCH wasm32)80 else()81 # last ditch effort82 libomp_get_architecture(LIBOMP_ARCH)83 endif ()84 set(LIBOMP_ENABLE_ASSERTIONS ${LLVM_ENABLE_ASSERTIONS})85endif()86 87# Time profiling support88set(LIBOMP_PROFILING_SUPPORT ${OPENMP_ENABLE_LIBOMP_PROFILING})89 90# FUJITSU A64FX is a special processor because its cache line size is 256.91# We need to pass this information into kmp_config.h.92if(LIBOMP_ARCH STREQUAL "aarch64")93 libomp_is_aarch64_a64fx(LIBOMP_DETECT_AARCH64_A64FX)94 if (LIBOMP_DETECT_AARCH64_A64FX)95 set(LIBOMP_ARCH "aarch64_a64fx")96 set(LIBOMP_ARCH_AARCH64_A64FX TRUE)97 endif()98endif()99 100libomp_check_variable(LIBOMP_ARCH 32e x86_64 32 i386 arm ppc ppc64 ppc64le aarch64 aarch64_32 aarch64_a64fx mic mips mips64 riscv64 loongarch64 ve s390x sparc sparcv9 wasm32)101 102set(LIBOMP_LIB_TYPE normal CACHE STRING103 "Performance,Profiling,Stubs library (normal/profile/stubs)")104libomp_check_variable(LIBOMP_LIB_TYPE normal profile stubs)105# Set the OpenMP Year and Month associated with version106set(LIBOMP_OMP_YEAR_MONTH 201611)107set(LIBOMP_MIC_ARCH knc CACHE STRING108 "Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc). Ignored if not Intel(R) MIC Architecture build.")109if("${LIBOMP_ARCH}" STREQUAL "mic")110 libomp_check_variable(LIBOMP_MIC_ARCH knf knc)111endif()112set(LIBOMP_FORTRAN_MODULES FALSE CACHE BOOL113 "Create Fortran module files? (requires fortran compiler)")114 115# - Support for universal fat binary builds on Mac116# - Having this extra variable allows people to build this library as a universal library117# without forcing a universal build of the llvm/clang compiler.118set(LIBOMP_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}" CACHE STRING119 "For Mac builds, semicolon separated list of architectures to build for universal fat binary.")120set(CMAKE_OSX_ARCHITECTURES ${LIBOMP_OSX_ARCHITECTURES})121 122# Should @rpath be used for dynamic libraries on Mac?123# The if(NOT DEFINED) is there to guard a cached value of the variable if one124# exists so there is no interference with what the user wants. Also, no cache entry125# is created so there are no inadvertant effects on other parts of LLVM.126if(NOT DEFINED CMAKE_MACOSX_RPATH)127 set(CMAKE_MACOSX_RPATH TRUE)128endif()129 130# User specified flags. These are appended to the configured flags.131set(LIBOMP_CXXFLAGS "" CACHE STRING132 "Appended user specified C++ compiler flags.")133set(LIBOMP_CPPFLAGS "" CACHE STRING134 "Appended user specified C preprocessor flags.")135set(LIBOMP_ASMFLAGS "" CACHE STRING136 "Appended user specified assembler flags.")137set(LIBOMP_LDFLAGS "" CACHE STRING138 "Appended user specified linker flags.")139if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")140 set(LIBOMP_LIBFLAGS "-lperfstat" CACHE STRING141 "Appended user specified linked libs flags. (e.g., -lm)")142 if("${LIBOMP_ARCH}" STREQUAL "ppc")143 # PPC (32-bit) on AIX needs libatomic for __atomic_load_8, etc.144 set(LIBOMP_LIBFLAGS "${LIBOMP_LIBFLAGS} -latomic")145 endif()146else()147 set(LIBOMP_LIBFLAGS "" CACHE STRING148 "Appended user specified linked libs flags. (e.g., -lm)")149endif()150set(LIBOMP_FFLAGS "" CACHE STRING151 "Appended user specified Fortran compiler flags. These are only used if LIBOMP_FORTRAN_MODULES==TRUE.")152 153# Should the libomp library and generated headers be copied into the original source exports/ directory154# Turning this to FALSE aids parallel builds to not interfere with each other.155# Currently, the testsuite module expects the just built OpenMP library to be located inside the exports/156# directory. TODO: have testsuite run under llvm-lit directly. We can then get rid of copying to exports/157set(LIBOMP_COPY_EXPORTS FALSE CACHE STRING158 "Should exports be copied into source exports/ directory?")159 160# HWLOC-support161set(LIBOMP_USE_HWLOC FALSE CACHE BOOL162 "Use Hwloc (http://www.open-mpi.org/projects/hwloc/) library for affinity?")163set(LIBOMP_HWLOC_INSTALL_DIR /usr/local CACHE PATH164 "Install path for hwloc library")165 166# Get the build number from kmp_version.cpp167libomp_get_build_number("${CMAKE_CURRENT_SOURCE_DIR}" LIBOMP_VERSION_BUILD)168math(EXPR LIBOMP_VERSION_BUILD_YEAR "${LIBOMP_VERSION_BUILD}/10000")169math(EXPR LIBOMP_VERSION_BUILD_MONTH_DAY "${LIBOMP_VERSION_BUILD}%10000")170 171# Currently don't record any timestamps172set(LIBOMP_BUILD_DATE "No_Timestamp")173 174# Architecture175set(IA32 FALSE)176set(INTEL64 FALSE)177set(ARM FALSE)178set(AARCH64 FALSE)179set(AARCH64_32 FALSE)180set(AARCH64_A64FX FALSE)181set(PPC64BE FALSE)182set(PPC64LE FALSE)183set(PPC64 FALSE)184set(MIC FALSE)185set(MIPS64 FALSE)186set(MIPS FALSE)187set(RISCV64 FALSE)188set(LOONGARCH64 FALSE)189set(VE FALSE)190set(S390X FALSE)191set(WASM FALSE)192set(PPC FALSE)193set(SPARC FALSE)194set(SPARCV9 FALSE)195if("${LIBOMP_ARCH}" STREQUAL "i386" OR "${LIBOMP_ARCH}" STREQUAL "32") # IA-32 architecture196 set(IA32 TRUE)197elseif("${LIBOMP_ARCH}" STREQUAL "x86_64" OR "${LIBOMP_ARCH}" STREQUAL "32e") # Intel(R) 64 architecture198 set(INTEL64 TRUE)199elseif("${LIBOMP_ARCH}" STREQUAL "arm") # ARM architecture200 set(ARM TRUE)201elseif("${LIBOMP_ARCH}" STREQUAL "ppc") # PPC32 architecture202 set(PPC TRUE)203elseif("${LIBOMP_ARCH}" STREQUAL "ppc64") # PPC64BE architecture204 set(PPC64BE TRUE)205 set(PPC64 TRUE)206elseif("${LIBOMP_ARCH}" STREQUAL "ppc64le") # PPC64LE architecture207 set(PPC64LE TRUE)208 set(PPC64 TRUE)209elseif("${LIBOMP_ARCH}" STREQUAL "aarch64") # AARCH64 architecture210 set(AARCH64 TRUE)211elseif("${LIBOMP_ARCH}" STREQUAL "aarch64_32") # AARCH64_32 architecture212 set(AARCH64_32 TRUE)213elseif("${LIBOMP_ARCH}" STREQUAL "aarch64_a64fx") # AARCH64_A64FX architecture214 set(AARCH64_A64FX TRUE)215elseif("${LIBOMP_ARCH}" STREQUAL "mic") # Intel(R) Many Integrated Core Architecture216 set(MIC TRUE)217elseif("${LIBOMP_ARCH}" STREQUAL "mips") # MIPS architecture218 set(MIPS TRUE)219elseif("${LIBOMP_ARCH}" STREQUAL "mips64") # MIPS64 architecture220 set(MIPS64 TRUE)221elseif("${LIBOMP_ARCH}" STREQUAL "riscv64") # RISCV64 architecture222 set(RISCV64 TRUE)223elseif("${LIBOMP_ARCH}" STREQUAL "loongarch64") # LoongArch64 architecture224 set(LOONGARCH64 TRUE)225elseif("${LIBOMP_ARCH}" STREQUAL "ve") # VE architecture226 set(VE TRUE)227elseif("${LIBOMP_ARCH}" STREQUAL "s390x") # S390x (Z) architecture228 set(S390X TRUE)229elseif("${LIBOMP_ARCH}" STREQUAL "wasm32") # WebAssembly architecture230 set(WASM TRUE)231elseif("${LIBOMP_ARCH}" STREQUAL "sparc") # SPARC architecture232 set(SPARC TRUE)233elseif("${LIBOMP_ARCH}" STREQUAL "sparcv9") # SPARC V9 architecture234 set(SPARCV9 TRUE)235endif()236 237# Set some flags based on build_type238set(RELEASE_BUILD FALSE)239set(DEBUG_BUILD FALSE)240set(RELWITHDEBINFO_BUILD FALSE)241set(MINSIZEREL_BUILD FALSE)242if("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")243 set(RELEASE_BUILD TRUE)244elseif("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")245 set(DEBUG_BUILD TRUE)246elseif("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "RELWITHDEBINFO")247 set(RELWITHDEBINFO_BUILD TRUE)248elseif("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "MINSIZEREL")249 set(MINSIZEREL_BUILD TRUE)250endif()251 252# Include itt notify interface?253set(LIBOMP_USE_ITT_NOTIFY TRUE CACHE BOOL254 "Enable ITT notify?")255 256# normal, profile, stubs library.257set(NORMAL_LIBRARY FALSE)258set(STUBS_LIBRARY FALSE)259set(PROFILE_LIBRARY FALSE)260if("${LIBOMP_LIB_TYPE}" STREQUAL "normal")261 set(NORMAL_LIBRARY TRUE)262elseif("${LIBOMP_LIB_TYPE}" STREQUAL "profile")263 set(PROFILE_LIBRARY TRUE)264elseif("${LIBOMP_LIB_TYPE}" STREQUAL "stubs")265 set(STUBS_LIBRARY TRUE)266endif()267 268# Setting directory names269set(LIBOMP_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})270set(LIBOMP_SRC_DIR ${LIBOMP_BASE_DIR}/src)271set(LIBOMP_TOOLS_DIR ${LIBOMP_BASE_DIR}/tools)272set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include)273set(LIBOMP_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})274 275# Enabling Fortran if it is needed276if(${LIBOMP_FORTRAN_MODULES})277 enable_language(Fortran)278endif()279# Enable MASM Compiler if it is needed (Windows only)280if(WIN32)281 enable_language(ASM_MASM)282endif()283 284# Getting legal type/arch285libomp_get_legal_type(LIBOMP_LEGAL_TYPE)286libomp_get_legal_arch(LIBOMP_LEGAL_ARCH)287 288# Compiler flag checks, library checks, threading check, etc.289include(config-ix)290 291# Is there a quad precision data type available?292# TODO: Make this a real feature check293set(LIBOMP_USE_QUAD_PRECISION "${LIBOMP_HAVE_QUAD_PRECISION}" CACHE BOOL294 "Should 128-bit precision entry points be built?")295if(LIBOMP_USE_QUAD_PRECISION AND (NOT LIBOMP_HAVE_QUAD_PRECISION))296 libomp_error_say("128-bit quad precision functionality requested but not available")297endif()298 299# libgomp drop-in compatibility requires versioned symbols300set(LIBOMP_USE_VERSION_SYMBOLS "${LIBOMP_HAVE_VERSION_SYMBOLS}" CACHE BOOL301 "Should version symbols be used? These provide binary compatibility with libgomp.")302if(LIBOMP_USE_VERSION_SYMBOLS AND (NOT LIBOMP_HAVE_VERSION_SYMBOLS))303 libomp_error_say("Version symbols functionality requested but not available")304endif()305 306# On multinode systems, larger alignment is desired to avoid false sharing307set(LIBOMP_USE_INTERNODE_ALIGNMENT FALSE CACHE BOOL308 "Should larger alignment (4096 bytes) be used for some locks and data structures?")309 310# Build code that allows the OpenMP library to conveniently interface with debuggers311set(LIBOMP_USE_DEBUGGER FALSE CACHE BOOL312 "Enable debugger interface code?")313 314# Should we link to C++ library?315set(LIBOMP_USE_STDCPPLIB FALSE CACHE BOOL316 "Should we link to C++ library?")317 318# Intel(R) Transactional Synchronization Extensions (Intel(R) TSX) based locks have319# __asm code which can be troublesome for some compilers. This feature is also x86 specific.320# TODO: Make this a real feature check321set(LIBOMP_USE_ADAPTIVE_LOCKS "${LIBOMP_HAVE_ADAPTIVE_LOCKS}" CACHE BOOL322 "Should Intel(R) TSX lock be compiled (adaptive lock in kmp_lock.cpp). These are x86 specific.")323if(LIBOMP_USE_ADAPTIVE_LOCKS AND (NOT LIBOMP_HAVE_ADAPTIVE_LOCKS))324 libomp_error_say("Adaptive locks (Intel(R) TSX) functionality is only supported on x86 Architecture")325endif()326 327# - stats-gathering enables OpenMP stats where things like the number of328# parallel regions, clock ticks spent in particular openmp regions are recorded.329set(LIBOMP_STATS FALSE CACHE BOOL330 "Stats-Gathering functionality?")331if(LIBOMP_STATS AND (NOT LIBOMP_HAVE_STATS))332 libomp_error_say("Stats-gathering functionality requested but not available")333endif()334# The stats functionality requires the std c++ library335if(LIBOMP_STATS)336 set(LIBOMP_USE_STDCPPLIB TRUE)337endif()338 339# Shared library can be switched to a static library340set(LIBOMP_ENABLE_SHARED TRUE CACHE BOOL341 "Shared library instead of static library?")342 343if(WASM)344 libomp_warning_say("The WebAssembly build currently only supports static libraries; forcing LIBOMP_ENABLE_SHARED to false")345 set(LIBOMP_ENABLE_SHARED FALSE)346endif()347 348if(WIN32 AND NOT LIBOMP_ENABLE_SHARED)349 libomp_error_say("Static libraries requested but not available on Windows")350endif()351 352if(LIBOMP_USE_ITT_NOTIFY AND NOT LIBOMP_ENABLE_SHARED)353 message(STATUS "ITT Notify not supported for static libraries - forcing ITT Notify off")354 set(LIBOMP_USE_ITT_NOTIFY FALSE)355endif()356 357if(LIBOMP_USE_VERSION_SYMBOLS AND (NOT LIBOMP_ENABLE_SHARED) )358 message(STATUS "Version symbols not supported for static libraries - forcing Version symbols functionality off")359 set (LIBOMP_USE_VERSION_SYMBOLS FALSE)360endif()361 362# OMPT-support defaults to ON for OpenMP 5.0+ and if the requirements in363# cmake/config-ix.cmake are fulfilled.364set(OMPT_DEFAULT FALSE)365if ((LIBOMP_HAVE_OMPT_SUPPORT) AND (NOT WIN32))366 set(OMPT_DEFAULT TRUE)367endif()368set(LIBOMP_OMPT_SUPPORT ${OMPT_DEFAULT} CACHE BOOL369 "OMPT-support?")370 371set(LIBOMP_OMPT_DEBUG FALSE CACHE BOOL372 "Trace OMPT initialization?")373set(LIBOMP_OMPT_OPTIONAL TRUE CACHE BOOL374 "OMPT-optional?")375if(LIBOMP_OMPT_SUPPORT AND (NOT LIBOMP_HAVE_OMPT_SUPPORT))376 libomp_error_say("OpenMP Tools Interface requested but not available in this implementation")377endif()378 379# OMPD-support380# Enable if OMPT SUPPORT is ON381set(OMPD_DEFAULT FALSE)382if (LIBOMP_HAVE_OMPT_SUPPORT AND ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux"))383 set(OMPD_DEFAULT TRUE)384endif()385 386set(LIBOMP_OMPD_SUPPORT ${OMPD_DEFAULT} CACHE BOOL387 "OMPD-support?")388 389if(LIBOMP_OMPD_SUPPORT AND ((NOT LIBOMP_OMPT_SUPPORT) OR (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")))390 libomp_warning_say("OpenMP Debug Interface(OMPD) requested but not available in this implementation")391 set(LIBOMP_OMPD_SUPPORT FALSE)392endif()393 394# OMPX Taskgraph support395# Whether to build with OMPX Taskgraph (e.g. task record & replay)396set(LIBOMP_OMPX_TASKGRAPH FALSE CACHE BOOL "OMPX-taskgraph (task record & replay)?")397 398# Error check hwloc support after config-ix has run399if(LIBOMP_USE_HWLOC AND (NOT LIBOMP_HAVE_HWLOC))400 libomp_error_say("Hwloc requested but not available")401endif()402 403# Hierarchical scheduling support404set(LIBOMP_USE_HIER_SCHED FALSE CACHE BOOL405 "Hierarchical scheduling support?")406 407# Setting final library name408set(LIBOMP_DEFAULT_LIB_NAME libomp)409if(${PROFILE_LIBRARY})410 set(LIBOMP_DEFAULT_LIB_NAME ${LIBOMP_DEFAULT_LIB_NAME}prof)411endif()412if(${STUBS_LIBRARY})413 set(LIBOMP_DEFAULT_LIB_NAME ${LIBOMP_DEFAULT_LIB_NAME}stubs)414endif()415set(LIBOMP_LIB_NAME ${LIBOMP_DEFAULT_LIB_NAME} CACHE STRING "Base OMP library name")416if (OPENMP_MSVC_NAME_SCHEME)417 # MSVC_TOOLS_VERSION corresponds to the version of the VC++ toolset.418 set(MSVC_TOOLS_VERSION 140)419 set(LIBOMP_LIB_NAME ${LIBOMP_LIB_NAME}${MSVC_TOOLS_VERSION}.${LIBOMP_ARCH})420endif()421 422if(${LIBOMP_ENABLE_SHARED})423 set(LIBOMP_LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})424 set(LIBOMP_LIBRARY_KIND SHARED)425 set(LIBOMP_INSTALL_KIND LIBRARY)426else()427 set(LIBOMP_LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})428 set(LIBOMP_LIBRARY_KIND STATIC)429 set(LIBOMP_INSTALL_KIND ARCHIVE)430endif()431 432set(LIBOMP_LIB_FILE ${LIBOMP_LIB_NAME}${LIBOMP_LIBRARY_SUFFIX})433 434# Optional backwards compatibility aliases.435set(LIBOMP_INSTALL_ALIASES TRUE CACHE BOOL436 "Install libgomp and libiomp5 library aliases for backwards compatibility")437 438# Print configuration after all variables are set.439if(${OPENMP_STANDALONE_BUILD})440 libomp_say("Operating System -- ${CMAKE_SYSTEM_NAME}")441 libomp_say("Target Architecture -- ${LIBOMP_ARCH}")442 if(${MIC})443 libomp_say("Intel(R) MIC Architecture -- ${LIBOMP_MIC_ARCH}")444 endif()445 libomp_say("Build Type -- ${CMAKE_BUILD_TYPE}")446 libomp_say("Library Kind -- ${LIBOMP_LIBRARY_KIND}")447 libomp_say("Library Type -- ${LIBOMP_LIB_TYPE}")448 libomp_say("Fortran Modules -- ${LIBOMP_FORTRAN_MODULES}")449 # will say development if all zeros450 if(${LIBOMP_VERSION_BUILD} STREQUAL 00000000)451 set(LIBOMP_BUILD Development)452 else()453 set(LIBOMP_BUILD ${LIBOMP_VERSION_BUILD})454 endif()455 libomp_say("Build -- ${LIBOMP_BUILD}")456 libomp_say("Use Stats-gathering -- ${LIBOMP_STATS}")457 libomp_say("Use Debugger-support -- ${LIBOMP_USE_DEBUGGER}")458 libomp_say("Use ITT notify -- ${LIBOMP_USE_ITT_NOTIFY}")459 libomp_say("Use OMPT-support -- ${LIBOMP_OMPT_SUPPORT}")460 if(${LIBOMP_OMPT_SUPPORT})461 libomp_say("Use OMPT-optional -- ${LIBOMP_OMPT_OPTIONAL}")462 endif()463 libomp_say("Use OMPD-support -- ${LIBOMP_OMPD_SUPPORT}")464 libomp_say("Use Adaptive locks -- ${LIBOMP_USE_ADAPTIVE_LOCKS}")465 libomp_say("Use quad precision -- ${LIBOMP_USE_QUAD_PRECISION}")466 libomp_say("Use Hwloc library -- ${LIBOMP_USE_HWLOC}")467 libomp_say("Use OMPX-taskgraph -- ${LIBOMP_OMPX_TASKGRAPH}")468endif()469 470add_subdirectory(src)471add_subdirectory(test)472 473# make these variables available for tools:474set(LIBOMP_LIBRARY_DIR ${LIBOMP_LIBRARY_DIR} PARENT_SCOPE)475set(LIBOMP_INCLUDE_DIR ${LIBOMP_INCLUDE_DIR} PARENT_SCOPE)476set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_OMP_TOOLS_INCLUDE_DIR} PARENT_SCOPE)477# make these variables available for tools/libompd:478set(LIBOMP_SRC_DIR ${LIBOMP_SRC_DIR} PARENT_SCOPE)479set(LIBOMP_OMPD_SUPPORT ${LIBOMP_OMPD_SUPPORT} PARENT_SCOPE)480