Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- cmake/share/cmake-3.31/Modules/Compiler/CrayPrgEnv.cmake +136 -0
- cmake/share/cmake-3.31/Modules/Compiler/Embarcadero-DetermineCompiler.cmake +7 -0
- cmake/share/cmake-3.31/Modules/Compiler/Flang-FindBinUtils.cmake +1 -0
- cmake/share/cmake-3.31/Modules/Compiler/Flang-Fortran.cmake +16 -0
- cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-C.cmake +22 -0
- cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-CXX.cmake +49 -0
- cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-DetermineCompiler.cmake +17 -0
- cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-Fortran.cmake +16 -0
- cmake/share/cmake-3.31/Modules/Compiler/Fujitsu.cmake +44 -0
- cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-C.cmake +6 -0
- cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-CXX.cmake +6 -0
- cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake +9 -0
- cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-FindBinUtils.cmake +6 -0
- cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang.cmake +11 -0
- cmake/share/cmake-3.31/Modules/Compiler/G95-Fortran.cmake +13 -0
- cmake/share/cmake-3.31/Modules/Compiler/GHS-C.cmake +10 -0
- cmake/share/cmake-3.31/Modules/Compiler/GHS-CXX.cmake +10 -0
- cmake/share/cmake-3.31/Modules/Compiler/GHS-DetermineCompiler.cmake +9 -0
- cmake/share/cmake-3.31/Modules/Compiler/GHS.cmake +8 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-ASM.cmake +13 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-C-DetermineCompiler.cmake +11 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-C-FeatureTests.cmake +17 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-C.cmake +16 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake +15 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-CXX-FeatureTests.cmake +109 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-CXX.cmake +47 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-FindBinUtils.cmake +39 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-Fortran.cmake +24 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-OBJC.cmake +12 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU-OBJCXX.cmake +20 -0
- cmake/share/cmake-3.31/Modules/Compiler/GNU.cmake +264 -0
- cmake/share/cmake-3.31/Modules/Compiler/HP-ASM.cmake +3 -0
- cmake/share/cmake-3.31/Modules/Compiler/HP-C-DetermineCompiler.cmake +8 -0
- cmake/share/cmake-3.31/Modules/Compiler/HP-C.cmake +7 -0
- cmake/share/cmake-3.31/Modules/Compiler/HP-CXX-DetermineCompiler.cmake +8 -0
- cmake/share/cmake-3.31/Modules/Compiler/HP-CXX.cmake +16 -0
- cmake/share/cmake-3.31/Modules/Compiler/HP-Fortran.cmake +12 -0
- cmake/share/cmake-3.31/Modules/Compiler/IAR-ASM.cmake +79 -0
- cmake/share/cmake-3.31/Modules/Compiler/IAR-C.cmake +86 -0
- cmake/share/cmake-3.31/Modules/Compiler/IAR-CXX.cmake +95 -0
- cmake/share/cmake-3.31/Modules/Compiler/IAR-DetermineCompiler.cmake +37 -0
- cmake/share/cmake-3.31/Modules/Compiler/IAR.cmake +66 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake +6 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake +6 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMClang-ASM.cmake +5 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake +8 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMClang-C.cmake +33 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake +8 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMClang-CXX.cmake +44 -0
- cmake/share/cmake-3.31/Modules/Compiler/IBMClang.cmake +84 -0
cmake/share/cmake-3.31/Modules/Compiler/CrayPrgEnv.cmake
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Guard against multiple inclusions
|
| 2 |
+
if(__cmake_craype_crayprgenv)
|
| 3 |
+
return()
|
| 4 |
+
endif()
|
| 5 |
+
set(__cmake_craype_crayprgenv 1)
|
| 6 |
+
|
| 7 |
+
# CrayPrgEnv: loaded when compiling through the Cray compiler wrapper.
|
| 8 |
+
# The compiler wrapper can run on a front-end node or a compute node.
|
| 9 |
+
|
| 10 |
+
cmake_policy(PUSH)
|
| 11 |
+
cmake_policy(SET CMP0057 NEW) # if IN_LIST
|
| 12 |
+
|
| 13 |
+
# One-time setup of the craype environment. First, check the wrapper config.
|
| 14 |
+
# The wrapper's selection of a compiler (gcc, clang, intel, etc.) and
|
| 15 |
+
# default include/library paths is selected using the "module" command.
|
| 16 |
+
# The CRAYPE_LINK_TYPE environment variable partly controls if static
|
| 17 |
+
# or dynamic binaries are generated (see __cmake_craype_linktype below).
|
| 18 |
+
# Running cmake and then changing module and/or linktype configuration
|
| 19 |
+
# may cause build problems (since the data in the cmake cache may no
|
| 20 |
+
# longer be correct after the change). We can look for this and warn
|
| 21 |
+
# the user about it. Second, use the "module" provided PKG_CONFIG_PATH-like
|
| 22 |
+
# environment variable to add additional prefixes to the system prefix
|
| 23 |
+
# path.
|
| 24 |
+
function(__cmake_craype_setupenv)
|
| 25 |
+
if(NOT DEFINED __cmake_craype_setupenv_done) # only done once per run
|
| 26 |
+
set(__cmake_craype_setupenv_done 1 PARENT_SCOPE)
|
| 27 |
+
unset(__cmake_check)
|
| 28 |
+
set(CMAKE_CRAYPE_LINKTYPE "$ENV{CRAYPE_LINK_TYPE}" CACHE STRING
|
| 29 |
+
"saved value of CRAYPE_LINK_TYPE environment variable")
|
| 30 |
+
set(CMAKE_CRAYPE_LOADEDMODULES "$ENV{LOADEDMODULES}" CACHE STRING
|
| 31 |
+
"saved value of LOADEDMODULES environment variable")
|
| 32 |
+
mark_as_advanced(CMAKE_CRAYPE_LINKTYPE CMAKE_CRAYPE_LOADEDMODULES)
|
| 33 |
+
if (NOT "${CMAKE_CRAYPE_LINKTYPE}" STREQUAL "$ENV{CRAYPE_LINK_TYPE}")
|
| 34 |
+
string(APPEND __cmake_check "CRAYPE_LINK_TYPE ")
|
| 35 |
+
endif()
|
| 36 |
+
if (NOT "${CMAKE_CRAYPE_LOADEDMODULES}" STREQUAL "$ENV{LOADEDMODULES}")
|
| 37 |
+
string(APPEND __cmake_check "LOADEDMODULES ")
|
| 38 |
+
endif()
|
| 39 |
+
if(DEFINED __cmake_check)
|
| 40 |
+
message(STATUS "NOTE: ${__cmake_check}changed since initial config!")
|
| 41 |
+
message(STATUS "NOTE: this may cause unexpected build errors.")
|
| 42 |
+
endif()
|
| 43 |
+
# loop over variables of interest
|
| 44 |
+
foreach(pkgcfgvar PKG_CONFIG_PATH PKG_CONFIG_PATH_DEFAULT
|
| 45 |
+
PE_PKG_CONFIG_PATH)
|
| 46 |
+
file(TO_CMAKE_PATH "$ENV{${pkgcfgvar}}" pkgcfg)
|
| 47 |
+
foreach(path ${pkgcfg})
|
| 48 |
+
string(REGEX REPLACE "(.*)/lib[^/]*/pkgconfig$" "\\1" path "${path}")
|
| 49 |
+
if(NOT "${path}" STREQUAL "" AND
|
| 50 |
+
NOT "${path}" IN_LIST CMAKE_SYSTEM_PREFIX_PATH)
|
| 51 |
+
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${path}")
|
| 52 |
+
endif()
|
| 53 |
+
endforeach()
|
| 54 |
+
endforeach()
|
| 55 |
+
# push it up out of this function into the parent scope
|
| 56 |
+
set(CMAKE_SYSTEM_PREFIX_PATH "${CMAKE_SYSTEM_PREFIX_PATH}" PARENT_SCOPE)
|
| 57 |
+
endif()
|
| 58 |
+
endfunction()
|
| 59 |
+
|
| 60 |
+
# The wrapper disables dynamic linking by default. Dynamic linking is
|
| 61 |
+
# enabled either by setting $ENV{CRAYPE_LINK_TYPE} to "dynamic" or by
|
| 62 |
+
# specifying "-dynamic" to the wrapper when linking. Specifying "-static"
|
| 63 |
+
# to the wrapper when linking takes priority over $ENV{CRAYPE_LINK_TYPE}.
|
| 64 |
+
# Furthermore, if you specify multiple "-dynamic" and "-static" flags to
|
| 65 |
+
# the wrapper when linking, the last one will win. In this case, the
|
| 66 |
+
# wrapper will also print a warning like:
|
| 67 |
+
# Warning: -dynamic was already seen on command line, overriding with -static.
|
| 68 |
+
#
|
| 69 |
+
# note that cmake applies both CMAKE_${lang}_FLAGS and CMAKE_EXE_LINKER_FLAGS
|
| 70 |
+
# (in that order) to the linking command, so -dynamic can appear in either
|
| 71 |
+
# variable.
|
| 72 |
+
#
|
| 73 |
+
# Note: As of CrayPE v19.06 (which translates to the craype/2.6.0 module)
|
| 74 |
+
# the default has changed and is now dynamic by default. This is handled
|
| 75 |
+
# accordingly
|
| 76 |
+
function(__cmake_craype_linktype lang rv)
|
| 77 |
+
# start with ENV, but allow flags to override
|
| 78 |
+
if(("$ENV{CRAYPE_VERSION}" STREQUAL "") OR
|
| 79 |
+
("$ENV{CRAYPE_VERSION}" VERSION_LESS "2.6"))
|
| 80 |
+
if("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic")
|
| 81 |
+
set(linktype dynamic)
|
| 82 |
+
else()
|
| 83 |
+
set(linktype static)
|
| 84 |
+
endif()
|
| 85 |
+
else()
|
| 86 |
+
if("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "static")
|
| 87 |
+
set(linktype static)
|
| 88 |
+
else()
|
| 89 |
+
set(linktype dynamic)
|
| 90 |
+
endif()
|
| 91 |
+
endif()
|
| 92 |
+
|
| 93 |
+
# combine flags and convert to a list so we can apply the flags in order
|
| 94 |
+
set(linkflags "${CMAKE_${lang}_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
|
| 95 |
+
string(REPLACE " " ";" linkflags "${linkflags}")
|
| 96 |
+
foreach(flag IN LISTS linkflags)
|
| 97 |
+
if("${flag}" STREQUAL "-dynamic")
|
| 98 |
+
set(linktype dynamic)
|
| 99 |
+
elseif("${flag}" STREQUAL "-static")
|
| 100 |
+
set(linktype static)
|
| 101 |
+
endif()
|
| 102 |
+
endforeach()
|
| 103 |
+
set(${rv} ${linktype} PARENT_SCOPE)
|
| 104 |
+
endfunction()
|
| 105 |
+
|
| 106 |
+
macro(__CrayPrgEnv_setup lang)
|
| 107 |
+
if(DEFINED ENV{CRAYPE_VERSION})
|
| 108 |
+
message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION} ${lang}")
|
| 109 |
+
elseif(DEFINED ENV{ASYNCPE_VERSION})
|
| 110 |
+
message(STATUS "Cray XT Programming Environment $ENV{ASYNCPE_VERSION} ${lang}")
|
| 111 |
+
else()
|
| 112 |
+
message(STATUS "Cray Programming Environment (unknown version) ${lang}")
|
| 113 |
+
endif()
|
| 114 |
+
|
| 115 |
+
# setup the craype environment
|
| 116 |
+
__cmake_craype_setupenv()
|
| 117 |
+
|
| 118 |
+
# Flags for the Cray wrappers
|
| 119 |
+
set(CMAKE_STATIC_LIBRARY_LINK_${lang}_FLAGS "-static")
|
| 120 |
+
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
|
| 121 |
+
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-dynamic")
|
| 122 |
+
|
| 123 |
+
# determine linktype from environment and compiler flags
|
| 124 |
+
__cmake_craype_linktype(${lang} __cmake_craype_${lang}_linktype)
|
| 125 |
+
|
| 126 |
+
# switch off shared libs if we get a static linktype
|
| 127 |
+
if("${__cmake_craype_${lang}_linktype}" STREQUAL "static")
|
| 128 |
+
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
| 129 |
+
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "")
|
| 130 |
+
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
| 131 |
+
set(CMAKE_LINK_SEARCH_START_STATIC TRUE)
|
| 132 |
+
endif()
|
| 133 |
+
|
| 134 |
+
endmacro()
|
| 135 |
+
|
| 136 |
+
cmake_policy(POP)
|
cmake/share/cmake-3.31/Modules/Compiler/Embarcadero-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_pp_test "defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)")
|
| 3 |
+
|
| 4 |
+
set(_compiler_id_version_compute "
|
| 5 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_HEX@(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_HEX@(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__CODEGEARC_VERSION__ & 0xFFFF)")
|
cmake/share/cmake-3.31/Modules/Compiler/Flang-FindBinUtils.cmake
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/Clang-FindBinUtils)
|
cmake/share/cmake-3.31/Modules/Compiler/Flang-Fortran.cmake
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/Clang)
|
| 2 |
+
__compiler_clang(Fortran)
|
| 3 |
+
|
| 4 |
+
set(CMAKE_Fortran_SUBMODULE_SEP "-")
|
| 5 |
+
set(CMAKE_Fortran_SUBMODULE_EXT ".mod")
|
| 6 |
+
|
| 7 |
+
set(CMAKE_Fortran_PREPROCESS_SOURCE
|
| 8 |
+
"<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
| 9 |
+
|
| 10 |
+
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
|
| 11 |
+
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
|
| 12 |
+
|
| 13 |
+
set(CMAKE_Fortran_MODDIR_FLAG "-J")
|
| 14 |
+
|
| 15 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
|
| 16 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
|
cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-C.cmake
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
| 2 |
+
# file Copyright.txt or https://cmake.org/licensing for details.
|
| 3 |
+
include(Compiler/Fujitsu)
|
| 4 |
+
__compiler_fujitsu(C)
|
| 5 |
+
|
| 6 |
+
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4)
|
| 7 |
+
set(CMAKE_C90_STANDARD_COMPILE_OPTION -std=c89)
|
| 8 |
+
set(CMAKE_C90_EXTENSION_COMPILE_OPTION -std=gnu89)
|
| 9 |
+
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
|
| 10 |
+
|
| 11 |
+
set(CMAKE_C99_STANDARD_COMPILE_OPTION -std=c99)
|
| 12 |
+
set(CMAKE_C99_EXTENSION_COMPILE_OPTION -std=gnu99)
|
| 13 |
+
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
|
| 14 |
+
|
| 15 |
+
set(CMAKE_C11_STANDARD_COMPILE_OPTION -std=c11)
|
| 16 |
+
set(CMAKE_C11_EXTENSION_COMPILE_OPTION -std=gnu11)
|
| 17 |
+
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
|
| 18 |
+
|
| 19 |
+
set(CMAKE_C_STANDARD_LATEST 11)
|
| 20 |
+
endif()
|
| 21 |
+
|
| 22 |
+
__compiler_check_default_language_standard(C 4 11)
|
cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-CXX.cmake
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
| 2 |
+
# file Copyright.txt or https://cmake.org/licensing for details.
|
| 3 |
+
include(Compiler/Fujitsu)
|
| 4 |
+
__compiler_fujitsu(CXX)
|
| 5 |
+
|
| 6 |
+
#set(CMAKE_PCH_EXTENSION .pch)
|
| 7 |
+
#set(CMAKE_PCH_EPILOGUE "#pragma hdrstop")
|
| 8 |
+
#set(CMAKE_CXX_COMPILE_OPTIONS_USE_PCH --no_pch_messages -include <PCH_HEADER> --use_pch <PCH_FILE>)
|
| 9 |
+
#set(CMAKE_CXX_COMPILE_OPTIONS_CREATE_PCH --no_pch_messages -include <PCH_HEADER> --create_pch <PCH_FILE>)
|
| 10 |
+
|
| 11 |
+
# The Fujitsu compiler offers both a 98 and 03 mode. These two are
|
| 12 |
+
# essentially interchangeable as 03 simply provides clarity to some 98
|
| 13 |
+
# ambiguyity.
|
| 14 |
+
#
|
| 15 |
+
# Re: Stroustrup's C++ FAQ:
|
| 16 |
+
# What is the difference between C++98 and C++03?
|
| 17 |
+
# From a programmer's view there is none. The C++03 revision of the
|
| 18 |
+
# standard was a bug fix release for implementers to ensure greater
|
| 19 |
+
# consistency and portability. In particular, tutorial and reference
|
| 20 |
+
# material describing C++98 and C++03 can be used interchangeably by all
|
| 21 |
+
# except compiler writers and standards gurus.
|
| 22 |
+
#
|
| 23 |
+
# Since CMake doesn't actually have an 03 mode and they're effectively
|
| 24 |
+
# interchangeable then we're just going to explicitly use 03 mode in the
|
| 25 |
+
# compiler when 98 is requested.
|
| 26 |
+
|
| 27 |
+
# The version matching is messy here. The std support seems to be related to
|
| 28 |
+
# the compiler tweak version derived from the patch id in the version string.
|
| 29 |
+
|
| 30 |
+
if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 4)
|
| 31 |
+
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION -std=c++03)
|
| 32 |
+
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION -std=gnu++03)
|
| 33 |
+
set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
|
| 34 |
+
|
| 35 |
+
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION -std=c++11)
|
| 36 |
+
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION -std=gnu++11)
|
| 37 |
+
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
|
| 38 |
+
|
| 39 |
+
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION -std=c++14)
|
| 40 |
+
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION -std=gnu++14)
|
| 41 |
+
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
|
| 42 |
+
|
| 43 |
+
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION -std=c++17)
|
| 44 |
+
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION -std=gnu++17)
|
| 45 |
+
|
| 46 |
+
set(CMAKE_CXX_STANDARD_LATEST 17)
|
| 47 |
+
endif()
|
| 48 |
+
|
| 49 |
+
__compiler_check_default_language_standard(CXX 4 14)
|
cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_pp_test "defined(__FUJITSU)")
|
| 3 |
+
|
| 4 |
+
set(_compiler_id_version_compute "
|
| 5 |
+
# if defined(__FCC_version__)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION __FCC_version__
|
| 7 |
+
# elif defined(__FCC_major__)
|
| 8 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__FCC_major__)
|
| 9 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__FCC_minor__)
|
| 10 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__FCC_patchlevel__)
|
| 11 |
+
# endif
|
| 12 |
+
# if defined(__fcc_version)
|
| 13 |
+
# define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__fcc_version)
|
| 14 |
+
# elif defined(__FCC_VERSION)
|
| 15 |
+
# define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__FCC_VERSION)
|
| 16 |
+
# endif
|
| 17 |
+
")
|
cmake/share/cmake-3.31/Modules/Compiler/Fujitsu-Fortran.cmake
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/Fujitsu)
|
| 2 |
+
__compiler_fujitsu(Fortran)
|
| 3 |
+
|
| 4 |
+
set(CMAKE_Fortran_SUBMODULE_SEP ".")
|
| 5 |
+
set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
|
| 6 |
+
|
| 7 |
+
set(CMAKE_Fortran_PREPROCESS_SOURCE
|
| 8 |
+
"<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -Cpp -P <SOURCE> -o <PREPROCESSED_SOURCE>")
|
| 9 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-Cpp")
|
| 10 |
+
|
| 11 |
+
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Fixed")
|
| 12 |
+
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Free")
|
| 13 |
+
|
| 14 |
+
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT "")
|
| 15 |
+
|
| 16 |
+
set(CMAKE_Fortran_MODDIR_FLAG "-M ")
|
cmake/share/cmake-3.31/Modules/Compiler/Fujitsu.cmake
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
| 2 |
+
# file Copyright.txt or https://cmake.org/licensing for details.
|
| 3 |
+
|
| 4 |
+
# This module is shared by multiple languages; use include blocker.
|
| 5 |
+
if(__COMPILER_FUJITSU)
|
| 6 |
+
return()
|
| 7 |
+
endif()
|
| 8 |
+
set(__COMPILER_FUJITSU 1)
|
| 9 |
+
|
| 10 |
+
include(Compiler/CMakeCommonCompilerMacros)
|
| 11 |
+
|
| 12 |
+
macro(__compiler_fujitsu lang)
|
| 13 |
+
set(CMAKE_${lang}_VERBOSE_FLAG "-###")
|
| 14 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_WARNING_AS_ERROR "-cwno")
|
| 15 |
+
|
| 16 |
+
# Initial configuration flags
|
| 17 |
+
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
| 18 |
+
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0")
|
| 19 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
|
| 20 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
|
| 21 |
+
|
| 22 |
+
# PIC flags
|
| 23 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
|
| 24 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
|
| 25 |
+
|
| 26 |
+
# Passing link options to the compiler
|
| 27 |
+
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
|
| 28 |
+
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
|
| 29 |
+
|
| 30 |
+
# IPO flag
|
| 31 |
+
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
|
| 32 |
+
if ("${lang}" STREQUAL "Fortran")
|
| 33 |
+
# Supported by Fortran compiler only
|
| 34 |
+
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
|
| 35 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-Klto")
|
| 36 |
+
else()
|
| 37 |
+
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
|
| 38 |
+
endif()
|
| 39 |
+
|
| 40 |
+
# How to actually call the compiler
|
| 41 |
+
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
|
| 42 |
+
"<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E $<$<COMPILE_LANGUAGE:Fortran>:-Cpp> <SOURCE> > <PREPROCESSED_SOURCE>")
|
| 43 |
+
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
| 44 |
+
endmacro()
|
cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-C.cmake
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/FujitsuClang)
|
| 2 |
+
|
| 3 |
+
set(_fjclang_ver "${CMAKE_C_COMPILER_VERSION_INTERNAL}")
|
| 4 |
+
set(CMAKE_C_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION_INTERNAL}")
|
| 5 |
+
include(Compiler/Clang-C)
|
| 6 |
+
set(CMAKE_C_COMPILER_VERSION "${_fjclang_ver}")
|
cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-CXX.cmake
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/FujitsuClang)
|
| 2 |
+
|
| 3 |
+
set(_fjclang_ver "${CMAKE_CXX_COMPILER_VERSION_INTERNAL}")
|
| 4 |
+
set(CMAKE_CXX_COMPILER_VERSION "${CMAKE_CXX_COMPILER_VERSION_INTERNAL}")
|
| 5 |
+
include(Compiler/Clang-CXX)
|
| 6 |
+
set(CMAKE_CXX_COMPILER_VERSION "${_fjclang_ver}")
|
cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_pp_test "defined(__CLANG_FUJITSU)")
|
| 3 |
+
|
| 4 |
+
set(_compiler_id_version_compute "
|
| 5 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__FCC_major__)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__FCC_minor__)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__FCC_patchlevel__)
|
| 8 |
+
# define @PREFIX@COMPILER_VERSION_INTERNAL_STR __clang_version__
|
| 9 |
+
")
|
cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang-FindBinUtils.cmake
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "")
|
| 2 |
+
message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
|
| 3 |
+
endif()
|
| 4 |
+
|
| 5 |
+
set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR ar)
|
| 6 |
+
set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB ranlib)
|
cmake/share/cmake-3.31/Modules/Compiler/FujitsuClang.cmake
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
| 2 |
+
# file Copyright.txt or https://cmake.org/licensing for details.
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
# This module is shared by multiple languages; use include blocker.
|
| 6 |
+
if(__COMPILER_FUJITSUCLANG)
|
| 7 |
+
return()
|
| 8 |
+
endif()
|
| 9 |
+
set(__COMPILER_FUJITSUCLANG 1)
|
| 10 |
+
|
| 11 |
+
include(Compiler/Clang)
|
cmake/share/cmake-3.31/Modules/Compiler/G95-Fortran.cmake
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
|
| 2 |
+
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
|
| 3 |
+
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
|
| 4 |
+
string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
|
| 5 |
+
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
| 6 |
+
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
|
| 7 |
+
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
| 8 |
+
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
|
| 9 |
+
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
|
| 10 |
+
set(CMAKE_Fortran_LINKER_WRAPPER_FLAG "-Wl,")
|
| 11 |
+
set(CMAKE_Fortran_LINKER_WRAPPER_FLAG_SEP ",")
|
| 12 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
|
| 13 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-no-cpp")
|
cmake/share/cmake-3.31/Modules/Compiler/GHS-C.cmake
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/GHS)
|
| 2 |
+
|
| 3 |
+
set(CMAKE_C_VERBOSE_FLAG "-v")
|
| 4 |
+
set(CMAKE_C_OUTPUT_EXTENSION ".o")
|
| 5 |
+
|
| 6 |
+
string(APPEND CMAKE_C_FLAGS_INIT " ")
|
| 7 |
+
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -Odebug -g")
|
| 8 |
+
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Ospace")
|
| 9 |
+
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -O")
|
| 10 |
+
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -O -g")
|
cmake/share/cmake-3.31/Modules/Compiler/GHS-CXX.cmake
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/GHS)
|
| 2 |
+
|
| 3 |
+
set(CMAKE_CXX_VERBOSE_FLAG "-v")
|
| 4 |
+
set(CMAKE_CXX_OUTPUT_EXTENSION ".o")
|
| 5 |
+
|
| 6 |
+
string(APPEND CMAKE_CXX_FLAGS_INIT " ")
|
| 7 |
+
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -Odebug -g")
|
| 8 |
+
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -Ospace")
|
| 9 |
+
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -O")
|
| 10 |
+
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -O -g")
|
cmake/share/cmake-3.31/Modules/Compiler/GHS-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(_compiler_id_pp_test "defined(__ghs__)")
|
| 2 |
+
|
| 3 |
+
set(_compiler_id_version_compute "
|
| 4 |
+
/* __GHS_VERSION_NUMBER = VVVVRP */
|
| 5 |
+
# ifdef __GHS_VERSION_NUMBER
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GHS_VERSION_NUMBER / 100)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GHS_VERSION_NUMBER / 10 % 10)
|
| 8 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__GHS_VERSION_NUMBER % 10)
|
| 9 |
+
# endif")
|
cmake/share/cmake-3.31/Modules/Compiler/GHS.cmake
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if(__COMPILER_GHS)
|
| 2 |
+
return()
|
| 3 |
+
endif()
|
| 4 |
+
set(__COMPILER_GHS 1)
|
| 5 |
+
|
| 6 |
+
set(CMAKE_EXECUTABLE_SUFFIX "")
|
| 7 |
+
set(CMAKE_LIBRARY_PATH_TERMINATOR "")
|
| 8 |
+
set(CMAKE_LIBRARY_PATH_FLAG "")
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-ASM.cmake
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is loaded when gcc/g++ is used for assembler files (the "ASM" cmake language)
|
| 2 |
+
include(Compiler/GNU)
|
| 3 |
+
|
| 4 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm)
|
| 5 |
+
|
| 6 |
+
__compiler_gnu(ASM)
|
| 7 |
+
|
| 8 |
+
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_MATCH STREQUAL "GNU assembler")
|
| 9 |
+
set(CMAKE_DEPFILE_FLAGS_ASM${ASM_DIALECT} "--MD <DEP_FILE>")
|
| 10 |
+
set(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
|
| 11 |
+
"<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
| 12 |
+
set(CMAKE_ASM_DEFINE_FLAG "--defsym ")
|
| 13 |
+
endif()
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-C-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_pp_test "defined(__GNUC__)")
|
| 3 |
+
|
| 4 |
+
set(_compiler_id_version_compute "
|
| 5 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GNUC__)
|
| 6 |
+
# if defined(__GNUC_MINOR__)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__)
|
| 8 |
+
# endif
|
| 9 |
+
# if defined(__GNUC_PATCHLEVEL__)
|
| 10 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__)
|
| 11 |
+
# endif")
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-C-FeatureTests.cmake
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 304")
|
| 3 |
+
|
| 4 |
+
# GNU 4.7 correctly sets __STDC_VERSION__ to 201112L, but GNU 4.6 sets it
|
| 5 |
+
# to 201000L. As the former is strictly greater than the latter, test only
|
| 6 |
+
# for the latter. If in the future CMake learns about a C feature which was
|
| 7 |
+
# introduced with GNU 4.7, that should test for the correct version, similar
|
| 8 |
+
# to the distinction between __cplusplus and __GXX_EXPERIMENTAL_CXX0X__ tests.
|
| 9 |
+
set(GNU46_C11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L")
|
| 10 |
+
set(_cmake_feature_test_c_static_assert "${GNU46_C11}")
|
| 11 |
+
# Since 3.4 at least:
|
| 12 |
+
set(GNU34_C99 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L")
|
| 13 |
+
set(_cmake_feature_test_c_restrict "${GNU34_C99}")
|
| 14 |
+
set(_cmake_feature_test_c_variadic_macros "${GNU34_C99}")
|
| 15 |
+
|
| 16 |
+
set(GNU_C90 "${_cmake_oldestSupported}")
|
| 17 |
+
set(_cmake_feature_test_c_function_prototypes "${GNU_C90}")
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-C.cmake
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/GNU)
|
| 2 |
+
__compiler_gnu(C)
|
| 3 |
+
__compiler_gnu_c_standards(C)
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
|
| 7 |
+
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
|
| 8 |
+
AND CMAKE_DEPFILE_FLAGS_C)
|
| 9 |
+
# dependencies are computed by the compiler itself
|
| 10 |
+
set(CMAKE_C_DEPFILE_FORMAT gcc)
|
| 11 |
+
set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
|
| 12 |
+
endif()
|
| 13 |
+
|
| 14 |
+
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
|
| 15 |
+
|
| 16 |
+
__compiler_check_default_language_standard(C 3.4 90 5.0 11 8.1 17)
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_pp_test "defined(__GNUC__) || defined(__GNUG__)")
|
| 3 |
+
|
| 4 |
+
set(_compiler_id_version_compute "
|
| 5 |
+
# if defined(__GNUC__)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GNUC__)
|
| 7 |
+
# else
|
| 8 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GNUG__)
|
| 9 |
+
# endif
|
| 10 |
+
# if defined(__GNUC_MINOR__)
|
| 11 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__)
|
| 12 |
+
# endif
|
| 13 |
+
# if defined(__GNUC_PATCHLEVEL__)
|
| 14 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__)
|
| 15 |
+
# endif")
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-CXX-FeatureTests.cmake
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# Reference: http://gcc.gnu.org/projects/cxx0x.html
|
| 3 |
+
# http://gcc.gnu.org/projects/cxx1y.html
|
| 4 |
+
|
| 5 |
+
set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 404")
|
| 6 |
+
|
| 7 |
+
set(GNU50_CXX14 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L")
|
| 8 |
+
set(_cmake_feature_test_cxx_variable_templates "${GNU50_CXX14}")
|
| 9 |
+
set(_cmake_feature_test_cxx_relaxed_constexpr "${GNU50_CXX14}")
|
| 10 |
+
set(_cmake_feature_test_cxx_aggregate_default_initializers "${GNU50_CXX14}")
|
| 11 |
+
|
| 12 |
+
# GNU 4.9 in c++14 mode sets __cplusplus to 201300L, so don't test for the
|
| 13 |
+
# correct value of it below.
|
| 14 |
+
# https://patchwork.ozlabs.org/patch/382470/
|
| 15 |
+
set(GNU49_CXX14 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L")
|
| 16 |
+
set(_cmake_feature_test_cxx_contextual_conversions "${GNU49_CXX14}")
|
| 17 |
+
set(_cmake_feature_test_cxx_attribute_deprecated "${GNU49_CXX14}")
|
| 18 |
+
set(_cmake_feature_test_cxx_decltype_auto "${GNU49_CXX14}")
|
| 19 |
+
set(_cmake_feature_test_cxx_digit_separators "${GNU49_CXX14}")
|
| 20 |
+
set(_cmake_feature_test_cxx_generic_lambdas "${GNU49_CXX14}")
|
| 21 |
+
# GNU 4.3 supports binary literals as an extension, but may warn about
|
| 22 |
+
# use of extensions prior to GNU 4.9
|
| 23 |
+
# http://stackoverflow.com/questions/16334024/difference-between-gcc-binary-literals-and-c14-ones
|
| 24 |
+
set(_cmake_feature_test_cxx_binary_literals "${GNU49_CXX14}")
|
| 25 |
+
# The features below are documented as available in GNU 4.8 (by implementing an
|
| 26 |
+
# earlier draft of the standard paper), but that version of the compiler
|
| 27 |
+
# does not set __cplusplus to a value greater than 201103L until GNU 4.9:
|
| 28 |
+
# http://gcc.gnu.org/onlinedocs/gcc-4.8.2/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros
|
| 29 |
+
# http://gcc.gnu.org/onlinedocs/gcc-4.9.0/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros
|
| 30 |
+
# So, CMake only reports availability for it with GNU 4.9 or later.
|
| 31 |
+
set(_cmake_feature_test_cxx_return_type_deduction "${GNU49_CXX14}")
|
| 32 |
+
set(_cmake_feature_test_cxx_lambda_init_captures "${GNU49_CXX14}")
|
| 33 |
+
|
| 34 |
+
# Introduced in GCC 4.8.1
|
| 35 |
+
set(GNU481_CXX11 "((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L")
|
| 36 |
+
set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${GNU481_CXX11}")
|
| 37 |
+
set(_cmake_feature_test_cxx_reference_qualified_functions "${GNU481_CXX11}")
|
| 38 |
+
set(GNU48_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L")
|
| 39 |
+
set(_cmake_feature_test_cxx_alignas "${GNU48_CXX11}")
|
| 40 |
+
# The alignof feature works with GNU 4.7 and -std=c++11, but it is documented
|
| 41 |
+
# as available with GNU 4.8, so treat that as true.
|
| 42 |
+
set(_cmake_feature_test_cxx_alignof "${GNU48_CXX11}")
|
| 43 |
+
set(_cmake_feature_test_cxx_attributes "${GNU48_CXX11}")
|
| 44 |
+
set(_cmake_feature_test_cxx_inheriting_constructors "${GNU48_CXX11}")
|
| 45 |
+
set(_cmake_feature_test_cxx_thread_local "${GNU48_CXX11}")
|
| 46 |
+
set(GNU47_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L")
|
| 47 |
+
set(_cmake_feature_test_cxx_alias_templates "${GNU47_CXX11}")
|
| 48 |
+
set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
|
| 49 |
+
set(_cmake_feature_test_cxx_extended_friend_declarations "${GNU47_CXX11}")
|
| 50 |
+
set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
|
| 51 |
+
set(_cmake_feature_test_cxx_nonstatic_member_init "${GNU47_CXX11}")
|
| 52 |
+
set(_cmake_feature_test_cxx_override "${GNU47_CXX11}")
|
| 53 |
+
set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
|
| 54 |
+
# NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor
|
| 55 |
+
# release following that (March 2012), and the first minor release to
|
| 56 |
+
# support -std=c++11. Prior to that, support for C++11 features is technically
|
| 57 |
+
# experimental and possibly incomplete (see for example the note below about
|
| 58 |
+
# cxx_variadic_template_template_parameters)
|
| 59 |
+
# GNU does not define __cplusplus correctly before version 4.7.
|
| 60 |
+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
|
| 61 |
+
# __GXX_EXPERIMENTAL_CXX0X__ is defined in prior versions, but may not be
|
| 62 |
+
# defined in the future.
|
| 63 |
+
set(GNU_CXX0X_DEFINED "(__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))")
|
| 64 |
+
set(GNU46_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && ${GNU_CXX0X_DEFINED}")
|
| 65 |
+
set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}")
|
| 66 |
+
set(_cmake_feature_test_cxx_defaulted_move_initializers "${GNU46_CXX11}")
|
| 67 |
+
set(_cmake_feature_test_cxx_enum_forward_declarations "${GNU46_CXX11}")
|
| 68 |
+
set(_cmake_feature_test_cxx_noexcept "${GNU46_CXX11}")
|
| 69 |
+
set(_cmake_feature_test_cxx_nullptr "${GNU46_CXX11}")
|
| 70 |
+
set(_cmake_feature_test_cxx_range_for "${GNU46_CXX11}")
|
| 71 |
+
set(_cmake_feature_test_cxx_unrestricted_unions "${GNU46_CXX11}")
|
| 72 |
+
set(GNU45_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && ${GNU_CXX0X_DEFINED}")
|
| 73 |
+
set(_cmake_feature_test_cxx_explicit_conversions "${GNU45_CXX11}")
|
| 74 |
+
set(_cmake_feature_test_cxx_lambdas "${GNU45_CXX11}")
|
| 75 |
+
set(_cmake_feature_test_cxx_local_type_template_args "${GNU45_CXX11}")
|
| 76 |
+
set(_cmake_feature_test_cxx_raw_string_literals "${GNU45_CXX11}")
|
| 77 |
+
set(GNU44_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && ${GNU_CXX0X_DEFINED}")
|
| 78 |
+
set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
|
| 79 |
+
set(_cmake_feature_test_cxx_defaulted_functions "${GNU44_CXX11}")
|
| 80 |
+
set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}")
|
| 81 |
+
set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}")
|
| 82 |
+
set(_cmake_feature_test_cxx_inline_namespaces "${GNU44_CXX11}")
|
| 83 |
+
set(_cmake_feature_test_cxx_sizeof_member "${GNU44_CXX11}")
|
| 84 |
+
set(_cmake_feature_test_cxx_strong_enums "${GNU44_CXX11}")
|
| 85 |
+
set(_cmake_feature_test_cxx_trailing_return_types "${GNU44_CXX11}")
|
| 86 |
+
set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}")
|
| 87 |
+
set(_cmake_feature_test_cxx_uniform_initialization "${GNU44_CXX11}")
|
| 88 |
+
set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
|
| 89 |
+
# TODO: If features are ever recorded for GNU 4.3, there should possibly
|
| 90 |
+
# be a new feature added like cxx_variadic_template_template_parameters,
|
| 91 |
+
# which is implemented by GNU 4.4, but not 4.3. cxx_variadic_templates is
|
| 92 |
+
# actually implemented by GNU 4.3, but variadic template template parameters
|
| 93 |
+
# 'completes' it, so that is the version we record as having the variadic
|
| 94 |
+
# templates capability in CMake. See
|
| 95 |
+
# http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
|
| 96 |
+
# TODO: Should be supported by GNU 4.3
|
| 97 |
+
set(GNU43_CXX11 "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
|
| 98 |
+
set(_cmake_feature_test_cxx_decltype "${GNU43_CXX11}")
|
| 99 |
+
set(_cmake_feature_test_cxx_default_function_template_args "${GNU43_CXX11}")
|
| 100 |
+
set(_cmake_feature_test_cxx_long_long_type "${GNU43_CXX11}")
|
| 101 |
+
set(_cmake_feature_test_cxx_right_angle_brackets "${GNU43_CXX11}")
|
| 102 |
+
set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}")
|
| 103 |
+
set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
|
| 104 |
+
# TODO: Should be supported since GNU 3.4?
|
| 105 |
+
set(_cmake_feature_test_cxx_extern_templates "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
|
| 106 |
+
# TODO: Should be supported forever?
|
| 107 |
+
set(_cmake_feature_test_cxx_func_identifier "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
|
| 108 |
+
set(_cmake_feature_test_cxx_variadic_macros "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
|
| 109 |
+
set(_cmake_feature_test_cxx_template_template_parameters "${_cmake_oldestSupported} && __cplusplus")
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-CXX.cmake
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/GNU)
|
| 2 |
+
__compiler_gnu(CXX)
|
| 3 |
+
__compiler_gnu_cxx_standards(CXX)
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
|
| 7 |
+
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
|
| 8 |
+
AND CMAKE_DEPFILE_FLAGS_CXX)
|
| 9 |
+
# dependencies are computed by the compiler itself
|
| 10 |
+
set(CMAKE_CXX_DEPFILE_FORMAT gcc)
|
| 11 |
+
set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
|
| 12 |
+
endif()
|
| 13 |
+
|
| 14 |
+
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
|
| 15 |
+
|
| 16 |
+
if (WIN32)
|
| 17 |
+
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
| 18 |
+
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fno-keep-inline-dllexport")
|
| 19 |
+
endif()
|
| 20 |
+
else()
|
| 21 |
+
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
|
| 22 |
+
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
| 23 |
+
endif()
|
| 24 |
+
endif()
|
| 25 |
+
|
| 26 |
+
__compiler_check_default_language_standard(CXX 3.4 98 6.0 14 11.1 17)
|
| 27 |
+
|
| 28 |
+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0)
|
| 29 |
+
string(CONCAT CMAKE_CXX_SCANDEP_SOURCE
|
| 30 |
+
"<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E -x c++ <SOURCE>"
|
| 31 |
+
" -MT <DYNDEP_FILE> -MD -MF <DEP_FILE>"
|
| 32 |
+
" -fmodules-ts -fdeps-file=<DYNDEP_FILE> -fdeps-target=<OBJECT> -fdeps-format=p1689r5"
|
| 33 |
+
" -o <PREPROCESSED_SOURCE>")
|
| 34 |
+
set(CMAKE_CXX_MODULE_MAP_FORMAT "gcc")
|
| 35 |
+
string(CONCAT CMAKE_CXX_MODULE_MAP_FLAG
|
| 36 |
+
# Turn on modules.
|
| 37 |
+
"-fmodules-ts"
|
| 38 |
+
# Read the module mapper file.
|
| 39 |
+
" -fmodule-mapper=<MODULE_MAP_FILE>"
|
| 40 |
+
# Make sure dependency tracking is enabled (missing from `try_*`).
|
| 41 |
+
" -MD"
|
| 42 |
+
# Suppress `CXX_MODULES +=` from generated depfile snippets.
|
| 43 |
+
" -fdeps-format=p1689r5"
|
| 44 |
+
# Force C++ as a language.
|
| 45 |
+
" -x c++")
|
| 46 |
+
set(CMAKE_CXX_MODULE_BMI_ONLY_FLAG "-fmodule-only")
|
| 47 |
+
endif()
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-FindBinUtils.cmake
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "")
|
| 2 |
+
message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
|
| 3 |
+
endif()
|
| 4 |
+
|
| 5 |
+
# Ubuntu 16.04:
|
| 6 |
+
# * /usr/bin/gcc-ar-5
|
| 7 |
+
# * /usr/bin/gcc-ranlib-5
|
| 8 |
+
string(REGEX MATCH "^([0-9]+)" __version_x
|
| 9 |
+
"${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}")
|
| 10 |
+
|
| 11 |
+
string(REGEX MATCH "^([0-9]+\\.[0-9]+)" __version_x_y
|
| 12 |
+
"${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}")
|
| 13 |
+
|
| 14 |
+
# Try to find tools in the same directory as GCC itself
|
| 15 |
+
get_filename_component(__gcc_hints "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY)
|
| 16 |
+
|
| 17 |
+
# http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ar.1.html
|
| 18 |
+
find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES
|
| 19 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x_y}"
|
| 20 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x}"
|
| 21 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${__version_x}"
|
| 22 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_COMPILER_SUFFIX}"
|
| 23 |
+
HINTS ${__gcc_hints}
|
| 24 |
+
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH
|
| 25 |
+
DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
|
| 26 |
+
)
|
| 27 |
+
mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR)
|
| 28 |
+
|
| 29 |
+
# http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html
|
| 30 |
+
find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES
|
| 31 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x_y}"
|
| 32 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x}"
|
| 33 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib${__version_x}"
|
| 34 |
+
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib${_CMAKE_COMPILER_SUFFIX}"
|
| 35 |
+
HINTS ${__gcc_hints}
|
| 36 |
+
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH
|
| 37 |
+
DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
|
| 38 |
+
)
|
| 39 |
+
mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB)
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-Fortran.cmake
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/GNU)
|
| 2 |
+
__compiler_gnu(Fortran)
|
| 3 |
+
|
| 4 |
+
set(CMAKE_Fortran_SUBMODULE_SEP "@")
|
| 5 |
+
set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
|
| 6 |
+
|
| 7 |
+
set(CMAKE_Fortran_PREPROCESS_SOURCE
|
| 8 |
+
"<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")
|
| 9 |
+
|
| 10 |
+
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
|
| 11 |
+
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
|
| 12 |
+
|
| 13 |
+
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.4)
|
| 14 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
|
| 15 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
|
| 16 |
+
endif()
|
| 17 |
+
|
| 18 |
+
set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpreprocessed")
|
| 19 |
+
|
| 20 |
+
# No -isystem for Fortran because it will not find .mod files.
|
| 21 |
+
unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
|
| 22 |
+
|
| 23 |
+
# Fortran-specific feature flags.
|
| 24 |
+
set(CMAKE_Fortran_MODDIR_FLAG -J)
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-OBJC.cmake
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/GNU)
|
| 2 |
+
__compiler_gnu(OBJC)
|
| 3 |
+
__compiler_gnu_c_standards(OBJC)
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
|
| 7 |
+
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
|
| 8 |
+
AND CMAKE_DEPFILE_FLAGS_OBJC)
|
| 9 |
+
# dependencies are computed by the compiler itself
|
| 10 |
+
set(CMAKE_OBJC_DEPFILE_FORMAT gcc)
|
| 11 |
+
set(CMAKE_OBJC_DEPENDS_USE_COMPILER TRUE)
|
| 12 |
+
endif()
|
cmake/share/cmake-3.31/Modules/Compiler/GNU-OBJCXX.cmake
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/GNU)
|
| 2 |
+
__compiler_gnu(OBJCXX)
|
| 3 |
+
__compiler_gnu_cxx_standards(OBJCXX)
|
| 4 |
+
|
| 5 |
+
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
|
| 6 |
+
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
|
| 7 |
+
AND CMAKE_DEPFILE_FLAGS_OBJCXX)
|
| 8 |
+
# dependencies are computed by the compiler itself
|
| 9 |
+
set(CMAKE_OBJCXX_DEPFILE_FORMAT gcc)
|
| 10 |
+
set(CMAKE_OBJCXX_DEPENDS_USE_COMPILER TRUE)
|
| 11 |
+
endif()
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 4.2)
|
| 15 |
+
set(CMAKE_OBJCXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
| 16 |
+
endif()
|
| 17 |
+
|
| 18 |
+
if(NOT CMAKE_OBJCXX_LINK_FLAGS)
|
| 19 |
+
set(CMAKE_OBCXX_LINK_FLAGS "-lstdc++")
|
| 20 |
+
endif()
|
cmake/share/cmake-3.31/Modules/Compiler/GNU.cmake
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
| 2 |
+
# file Copyright.txt or https://cmake.org/licensing for details.
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
# This module is shared by multiple languages; use include blocker.
|
| 6 |
+
if(__COMPILER_GNU)
|
| 7 |
+
return()
|
| 8 |
+
endif()
|
| 9 |
+
set(__COMPILER_GNU 1)
|
| 10 |
+
|
| 11 |
+
include(Compiler/CMakeCommonCompilerMacros)
|
| 12 |
+
|
| 13 |
+
set(__pch_header_C "c-header")
|
| 14 |
+
set(__pch_header_CXX "c++-header")
|
| 15 |
+
set(__pch_header_OBJC "objective-c-header")
|
| 16 |
+
set(__pch_header_OBJCXX "objective-c++-header")
|
| 17 |
+
|
| 18 |
+
macro(__compiler_gnu lang)
|
| 19 |
+
# Feature flags.
|
| 20 |
+
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
| 21 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_WARNING_AS_ERROR "-Werror")
|
| 22 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
|
| 23 |
+
set (_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER NO)
|
| 24 |
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
|
| 25 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
|
| 26 |
+
# Support of PIE at link stage depends on various elements : platform, compiler, linker
|
| 27 |
+
# so to activate it, module CheckPIESupported must be used.
|
| 28 |
+
set (_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER YES)
|
| 29 |
+
set(CMAKE_${lang}_LINK_OPTIONS_PIE ${CMAKE_${lang}_COMPILE_OPTIONS_PIE} "-pie")
|
| 30 |
+
set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "-no-pie")
|
| 31 |
+
endif()
|
| 32 |
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.0)
|
| 33 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
|
| 34 |
+
endif()
|
| 35 |
+
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
|
| 36 |
+
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
|
| 37 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_SYSROOT "--sysroot=")
|
| 38 |
+
|
| 39 |
+
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
|
| 40 |
+
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
|
| 41 |
+
|
| 42 |
+
# Older versions of gcc (< 4.5) contain a bug causing them to report a missing
|
| 43 |
+
# header file as a warning if depfiles are enabled, causing check_header_file
|
| 44 |
+
# tests to always succeed. Work around this by disabling dependency tracking
|
| 45 |
+
# in try_compile mode.
|
| 46 |
+
get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
|
| 47 |
+
if(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" AND _IN_TC AND NOT CMAKE_FORCE_DEPFILES)
|
| 48 |
+
else()
|
| 49 |
+
# distcc does not transform -o to -MT when invoking the preprocessor
|
| 50 |
+
# internally, as it ought to. Work around this bug by setting -MT here
|
| 51 |
+
# even though it isn't strictly necessary.
|
| 52 |
+
set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
|
| 53 |
+
endif()
|
| 54 |
+
|
| 55 |
+
# Initial configuration flags.
|
| 56 |
+
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
| 57 |
+
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
| 58 |
+
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
|
| 59 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
|
| 60 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
| 61 |
+
if(NOT "x${lang}" STREQUAL "xFortran")
|
| 62 |
+
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
| 63 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -DNDEBUG")
|
| 64 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
|
| 65 |
+
endif()
|
| 66 |
+
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
| 67 |
+
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
| 68 |
+
if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462
|
| 69 |
+
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
|
| 70 |
+
endif()
|
| 71 |
+
|
| 72 |
+
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
|
| 73 |
+
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
|
| 74 |
+
|
| 75 |
+
# '-flto' introduced since GCC 4.5:
|
| 76 |
+
# * https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/Option-Summary.html (no)
|
| 77 |
+
# * https://gcc.gnu.org/onlinedocs/gcc-4.5.4/gcc/Option-Summary.html (yes)
|
| 78 |
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.5)
|
| 79 |
+
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
|
| 80 |
+
|
| 81 |
+
set(__lto_flags "")
|
| 82 |
+
|
| 83 |
+
# '-flto=auto' introduced since GCC 10.1:
|
| 84 |
+
# * https://gcc.gnu.org/onlinedocs/gcc-9.5.0/gcc/Optimize-Options.html#Optimize-Options (no)
|
| 85 |
+
# * https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#Optimize-Options (yes)
|
| 86 |
+
# Since GCC 12.1, the abundance of a parameter produces a warning if compiling multiple targets.
|
| 87 |
+
# FIXME: What version of GCC for Windows added support for -flto=auto? 10.3 does not have it.
|
| 88 |
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 11.0)
|
| 89 |
+
list(APPEND __lto_flags -flto=auto)
|
| 90 |
+
elseif(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 10.1)
|
| 91 |
+
if (CMAKE_HOST_WIN32)
|
| 92 |
+
list(APPEND __lto_flags -flto=1)
|
| 93 |
+
else()
|
| 94 |
+
list(APPEND __lto_flags -flto=auto)
|
| 95 |
+
endif()
|
| 96 |
+
else()
|
| 97 |
+
list(APPEND __lto_flags -flto)
|
| 98 |
+
endif()
|
| 99 |
+
|
| 100 |
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.7 AND NOT APPLE)
|
| 101 |
+
# '-ffat-lto-objects' introduced since GCC 4.7:
|
| 102 |
+
# * https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/Option-Summary.html (no)
|
| 103 |
+
# * https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gcc/Option-Summary.html (yes)
|
| 104 |
+
list(APPEND __lto_flags -fno-fat-lto-objects)
|
| 105 |
+
endif()
|
| 106 |
+
|
| 107 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO ${__lto_flags})
|
| 108 |
+
|
| 109 |
+
# Need to use version of 'ar'/'ranlib' with plugin support.
|
| 110 |
+
# Quote from [documentation][1]:
|
| 111 |
+
#
|
| 112 |
+
# To create static libraries suitable for LTO,
|
| 113 |
+
# use gcc-ar and gcc-ranlib instead of ar and ranlib
|
| 114 |
+
#
|
| 115 |
+
# [1]: https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Optimize-Options.html
|
| 116 |
+
set(CMAKE_${lang}_ARCHIVE_CREATE_IPO
|
| 117 |
+
"\"${CMAKE_${lang}_COMPILER_AR}\" qc <TARGET> <LINK_FLAGS> <OBJECTS>"
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
set(CMAKE_${lang}_ARCHIVE_APPEND_IPO
|
| 121 |
+
"\"${CMAKE_${lang}_COMPILER_AR}\" q <TARGET> <LINK_FLAGS> <OBJECTS>"
|
| 122 |
+
)
|
| 123 |
+
|
| 124 |
+
set(CMAKE_${lang}_ARCHIVE_FINISH_IPO
|
| 125 |
+
"\"${CMAKE_${lang}_COMPILER_RANLIB}\" <TARGET>"
|
| 126 |
+
)
|
| 127 |
+
endif()
|
| 128 |
+
|
| 129 |
+
if("${lang}" STREQUAL "CXX")
|
| 130 |
+
set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}")
|
| 131 |
+
if(CMAKE_${lang}_COMPILER_ARG1)
|
| 132 |
+
separate_arguments(_COMPILER_ARGS NATIVE_COMMAND "${CMAKE_${lang}_COMPILER_ARG1}")
|
| 133 |
+
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
|
| 134 |
+
unset(_COMPILER_ARGS)
|
| 135 |
+
endif()
|
| 136 |
+
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
|
| 137 |
+
endif()
|
| 138 |
+
|
| 139 |
+
if(NOT "x${lang}" STREQUAL "xFortran")
|
| 140 |
+
set(CMAKE_PCH_EXTENSION .gch)
|
| 141 |
+
if (NOT CMAKE_GENERATOR MATCHES "Xcode")
|
| 142 |
+
set(CMAKE_PCH_PROLOGUE "#pragma GCC system_header")
|
| 143 |
+
endif()
|
| 144 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch)
|
| 145 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -include <PCH_HEADER>)
|
| 146 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -x ${__pch_header_${lang}} -include <PCH_HEADER>)
|
| 147 |
+
endif()
|
| 148 |
+
|
| 149 |
+
# '-fdiagnostics-color=always' introduced since GCC 4.9
|
| 150 |
+
# https://gcc.gnu.org/gcc-4.9/changes.html
|
| 151 |
+
if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 4.9)
|
| 152 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_COLOR_DIAGNOSTICS "-fdiagnostics-color=always")
|
| 153 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_COLOR_DIAGNOSTICS_OFF "-fno-diagnostics-color")
|
| 154 |
+
endif()
|
| 155 |
+
endmacro()
|
| 156 |
+
|
| 157 |
+
macro(__compiler_gnu_c_standards lang)
|
| 158 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.5)
|
| 159 |
+
set(CMAKE_${lang}90_STANDARD_COMPILE_OPTION "-std=c90")
|
| 160 |
+
set(CMAKE_${lang}90_EXTENSION_COMPILE_OPTION "-std=gnu90")
|
| 161 |
+
set(CMAKE_${lang}_STANDARD_LATEST 90)
|
| 162 |
+
elseif (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
|
| 163 |
+
set(CMAKE_${lang}90_STANDARD_COMPILE_OPTION "-std=c89")
|
| 164 |
+
set(CMAKE_${lang}90_EXTENSION_COMPILE_OPTION "-std=gnu89")
|
| 165 |
+
set(CMAKE_${lang}_STANDARD_LATEST 90)
|
| 166 |
+
endif()
|
| 167 |
+
|
| 168 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
|
| 169 |
+
set(CMAKE_${lang}90_STANDARD__HAS_FULL_SUPPORT ON)
|
| 170 |
+
set(CMAKE_${lang}99_STANDARD_COMPILE_OPTION "-std=c99")
|
| 171 |
+
set(CMAKE_${lang}99_EXTENSION_COMPILE_OPTION "-std=gnu99")
|
| 172 |
+
set(CMAKE_${lang}99_STANDARD__HAS_FULL_SUPPORT ON)
|
| 173 |
+
set(CMAKE_${lang}_STANDARD_LATEST 99)
|
| 174 |
+
endif()
|
| 175 |
+
|
| 176 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.7)
|
| 177 |
+
set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "-std=c11")
|
| 178 |
+
set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "-std=gnu11")
|
| 179 |
+
set(CMAKE_${lang}11_STANDARD__HAS_FULL_SUPPORT ON)
|
| 180 |
+
set(CMAKE_${lang}_STANDARD_LATEST 11)
|
| 181 |
+
elseif (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.6)
|
| 182 |
+
set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "-std=c1x")
|
| 183 |
+
set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "-std=gnu1x")
|
| 184 |
+
set(CMAKE_${lang}_STANDARD_LATEST 11)
|
| 185 |
+
endif()
|
| 186 |
+
|
| 187 |
+
if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1)
|
| 188 |
+
set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std=c17")
|
| 189 |
+
set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std=gnu17")
|
| 190 |
+
set(CMAKE_${lang}_STANDARD_LATEST 17)
|
| 191 |
+
endif()
|
| 192 |
+
|
| 193 |
+
if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 9.1)
|
| 194 |
+
set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c2x")
|
| 195 |
+
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu2x")
|
| 196 |
+
set(CMAKE_${lang}_STANDARD_LATEST 23)
|
| 197 |
+
endif()
|
| 198 |
+
endmacro()
|
| 199 |
+
|
| 200 |
+
macro(__compiler_gnu_cxx_standards lang)
|
| 201 |
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
|
| 202 |
+
set(CMAKE_${lang}98_STANDARD_COMPILE_OPTION "-std=c++98")
|
| 203 |
+
set(CMAKE_${lang}98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
|
| 204 |
+
set(CMAKE_${lang}_STANDARD_LATEST 98)
|
| 205 |
+
endif()
|
| 206 |
+
|
| 207 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.7)
|
| 208 |
+
set(CMAKE_${lang}98_STANDARD__HAS_FULL_SUPPORT ON)
|
| 209 |
+
set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "-std=c++11")
|
| 210 |
+
set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
|
| 211 |
+
set(CMAKE_${lang}_STANDARD_LATEST 11)
|
| 212 |
+
elseif (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.4)
|
| 213 |
+
# 4.3 supports 0x variants
|
| 214 |
+
set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "-std=c++0x")
|
| 215 |
+
set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
|
| 216 |
+
set(CMAKE_${lang}_STANDARD_LATEST 11)
|
| 217 |
+
endif()
|
| 218 |
+
|
| 219 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.8.1)
|
| 220 |
+
set(CMAKE_${lang}11_STANDARD__HAS_FULL_SUPPORT ON)
|
| 221 |
+
endif()
|
| 222 |
+
|
| 223 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.9)
|
| 224 |
+
set(CMAKE_${lang}14_STANDARD_COMPILE_OPTION "-std=c++14")
|
| 225 |
+
set(CMAKE_${lang}14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
|
| 226 |
+
set(CMAKE_${lang}_STANDARD_LATEST 14)
|
| 227 |
+
elseif (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.8)
|
| 228 |
+
set(CMAKE_${lang}14_STANDARD_COMPILE_OPTION "-std=c++1y")
|
| 229 |
+
set(CMAKE_${lang}14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
|
| 230 |
+
set(CMAKE_${lang}_STANDARD_LATEST 14)
|
| 231 |
+
endif()
|
| 232 |
+
|
| 233 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 5.0)
|
| 234 |
+
set(CMAKE_${lang}14_STANDARD__HAS_FULL_SUPPORT ON)
|
| 235 |
+
endif()
|
| 236 |
+
|
| 237 |
+
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 8.0)
|
| 238 |
+
set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std=c++17")
|
| 239 |
+
set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
|
| 240 |
+
set(CMAKE_${lang}_STANDARD_LATEST 17)
|
| 241 |
+
elseif (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 5.1)
|
| 242 |
+
set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std=c++1z")
|
| 243 |
+
set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
|
| 244 |
+
set(CMAKE_${lang}_STANDARD_LATEST 17)
|
| 245 |
+
endif()
|
| 246 |
+
|
| 247 |
+
if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 11.1)
|
| 248 |
+
set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std=c++20")
|
| 249 |
+
set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=gnu++20")
|
| 250 |
+
set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++23")
|
| 251 |
+
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu++23")
|
| 252 |
+
set(CMAKE_${lang}_STANDARD_LATEST 23)
|
| 253 |
+
elseif(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
|
| 254 |
+
set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std=c++2a")
|
| 255 |
+
set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
|
| 256 |
+
set(CMAKE_${lang}_STANDARD_LATEST 20)
|
| 257 |
+
endif()
|
| 258 |
+
|
| 259 |
+
if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0)
|
| 260 |
+
set(CMAKE_${lang}26_STANDARD_COMPILE_OPTION "-std=c++26")
|
| 261 |
+
set(CMAKE_${lang}26_EXTENSION_COMPILE_OPTION "-std=gnu++26")
|
| 262 |
+
set(CMAKE_${lang}_STANDARD_LATEST 26)
|
| 263 |
+
endif()
|
| 264 |
+
endmacro()
|
cmake/share/cmake-3.31/Modules/Compiler/HP-ASM.cmake
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(CMAKE_ASM_VERBOSE_FLAG "-v")
|
| 2 |
+
|
| 3 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
|
cmake/share/cmake-3.31/Modules/Compiler/HP-C-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_pp_test "defined(__HP_cc)")
|
| 3 |
+
|
| 4 |
+
set(_compiler_id_version_compute "
|
| 5 |
+
/* __HP_cc = VVRRPP */
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__HP_cc/10000)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__HP_cc/100 % 100)
|
| 8 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__HP_cc % 100)")
|
cmake/share/cmake-3.31/Modules/Compiler/HP-C.cmake
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(CMAKE_C_VERBOSE_FLAG "-v")
|
| 2 |
+
|
| 3 |
+
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
| 4 |
+
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
| 5 |
+
|
| 6 |
+
set(CMAKE_C_LINKER_WRAPPER_FLAG "-Wl,")
|
| 7 |
+
set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",")
|
cmake/share/cmake-3.31/Modules/Compiler/HP-CXX-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_pp_test "defined(__HP_aCC)")
|
| 3 |
+
|
| 4 |
+
set(_compiler_id_version_compute "
|
| 5 |
+
/* __HP_aCC = VVRRPP */
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__HP_aCC/10000)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__HP_aCC/100 % 100)
|
| 8 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__HP_aCC % 100)")
|
cmake/share/cmake-3.31/Modules/Compiler/HP-CXX.cmake
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(CMAKE_CXX_VERBOSE_FLAG "-v")
|
| 2 |
+
|
| 3 |
+
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
| 4 |
+
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
| 5 |
+
|
| 6 |
+
set(CMAKE_CXX_LINKER_WRAPPER_FLAG "-Wl,")
|
| 7 |
+
set(CMAKE_CXX_LINKER_WRAPPER_FLAG_SEP ",")
|
| 8 |
+
|
| 9 |
+
# HP aCC since version 3.80 supports the flag +hpxstd98 to get ANSI C++98
|
| 10 |
+
# template support. It is known that version 6.25 doesn't need that flag.
|
| 11 |
+
# Current assumption: the flag is needed for every version from 3.80 to 4
|
| 12 |
+
# to get it working.
|
| 13 |
+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4 AND
|
| 14 |
+
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.80)
|
| 15 |
+
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "+hpxstd98")
|
| 16 |
+
endif()
|
cmake/share/cmake-3.31/Modules/Compiler/HP-Fortran.cmake
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
| 2 |
+
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "+source=fixed")
|
| 3 |
+
set(CMAKE_Fortran_FORMAT_FREE_FLAG "+source=free")
|
| 4 |
+
|
| 5 |
+
set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE "<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
| 6 |
+
set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE "<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
| 7 |
+
|
| 8 |
+
set(CMAKE_Fortran_LINKER_WRAPPER_FLAG "-Wl,")
|
| 9 |
+
set(CMAKE_Fortran_LINKER_WRAPPER_FLAG ",")
|
| 10 |
+
|
| 11 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "+cpp=yes")
|
| 12 |
+
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "+cpp=no")
|
cmake/share/cmake-3.31/Modules/Compiler/IAR-ASM.cmake
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is processed when the IAR Assembler is used
|
| 2 |
+
|
| 3 |
+
include(Compiler/IAR)
|
| 4 |
+
|
| 5 |
+
# Architecture specific
|
| 6 |
+
if("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
|
| 7 |
+
__compiler_iar_ilink(ASM)
|
| 8 |
+
__assembler_iar_deps("-y" 9.30)
|
| 9 |
+
set(_CMAKE_IAR_SILENCER_FLAG " -S")
|
| 10 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa;S)
|
| 11 |
+
|
| 12 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX")
|
| 13 |
+
__compiler_iar_ilink(ASM)
|
| 14 |
+
__assembler_iar_deps("--dependencies=ns" 2.50.1)
|
| 15 |
+
set(_CMAKE_IAR_SILENCER_FLAG " --silent")
|
| 16 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa;S)
|
| 17 |
+
|
| 18 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RH850")
|
| 19 |
+
__compiler_iar_ilink(ASM)
|
| 20 |
+
__assembler_iar_deps("--dependencies=ns" 2)
|
| 21 |
+
set(_CMAKE_IAR_SILENCER_FLAG " --silent")
|
| 22 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa;S)
|
| 23 |
+
|
| 24 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RL78")
|
| 25 |
+
__compiler_iar_ilink(ASM)
|
| 26 |
+
__assembler_iar_deps("--dependencies=ns" 2)
|
| 27 |
+
set(_CMAKE_IAR_SILENCER_FLAG " --silent")
|
| 28 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa;S)
|
| 29 |
+
|
| 30 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" MATCHES "(RISCV|RISC-V)")
|
| 31 |
+
__compiler_iar_ilink(ASM)
|
| 32 |
+
__assembler_iar_deps("--dependencies=ns" 1)
|
| 33 |
+
set(_CMAKE_IAR_SILENCER_FLAG " --silent")
|
| 34 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa;S)
|
| 35 |
+
|
| 36 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
|
| 37 |
+
__compiler_iar_xlink(ASM)
|
| 38 |
+
__assembler_iar_deps("-y" 8)
|
| 39 |
+
set(_CMAKE_IAR_SILENCER_FLAG " -S")
|
| 40 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
|
| 41 |
+
set(CMAKE_ASM_OUTPUT_EXTENSION ".r90")
|
| 42 |
+
|
| 43 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
|
| 44 |
+
__compiler_iar_xlink(ASM)
|
| 45 |
+
__assembler_iar_deps("-y" 8)
|
| 46 |
+
set(_CMAKE_IAR_SILENCER_FLAG " -S")
|
| 47 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s43;asm;msa)
|
| 48 |
+
set(CMAKE_ASM_OUTPUT_EXTENSION ".r43")
|
| 49 |
+
|
| 50 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
|
| 51 |
+
__compiler_iar_xlink(ASM)
|
| 52 |
+
set(_CMAKE_IAR_SILENCER_FLAG " -S")
|
| 53 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s85;asm;msa)
|
| 54 |
+
set(CMAKE_ASM_OUTPUT_EXTENSION ".r85")
|
| 55 |
+
|
| 56 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
|
| 57 |
+
__compiler_iar_xlink(ASM)
|
| 58 |
+
set(_CMAKE_IAR_SILENCER_FLAG " -S")
|
| 59 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s51;asm;msa)
|
| 60 |
+
set(CMAKE_ASM_OUTPUT_EXTENSION ".r51")
|
| 61 |
+
|
| 62 |
+
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
|
| 63 |
+
__compiler_iar_ilink(ASM)
|
| 64 |
+
__assembler_iar_deps("--dependencies=ns" 2)
|
| 65 |
+
set(_CMAKE_IAR_SILENCER_FLAG " --silent")
|
| 66 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa;S)
|
| 67 |
+
|
| 68 |
+
else()
|
| 69 |
+
message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID not detected. This should be automatic." )
|
| 70 |
+
endif()
|
| 71 |
+
|
| 72 |
+
string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -r")
|
| 73 |
+
string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
| 74 |
+
string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -DNDEBUG")
|
| 75 |
+
string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -r -DNDEBUG")
|
| 76 |
+
|
| 77 |
+
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> ${_CMAKE_IAR_SILENCER_FLAG} <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
|
| 78 |
+
|
| 79 |
+
unset(_CMAKE_IAR_SILENCER_FLAG)
|
cmake/share/cmake-3.31/Modules/Compiler/IAR-C.cmake
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is processed when the IAR C Compiler is used
|
| 2 |
+
#
|
| 3 |
+
# C Language Specification support
|
| 4 |
+
# - Newer versions of the IAR C Compiler require the --c89 flag to build a file under the C90 standard.
|
| 5 |
+
# - Earlier versions of the compiler had C90 by default, not requiring the backward-compatibility flag.
|
| 6 |
+
#
|
| 7 |
+
# The IAR Language Extensions
|
| 8 |
+
# - The IAR Language Extensions can be enabled by -e flag
|
| 9 |
+
#
|
| 10 |
+
include(Compiler/IAR)
|
| 11 |
+
include(Compiler/CMakeCommonCompilerMacros)
|
| 12 |
+
|
| 13 |
+
if(NOT CMAKE_C_COMPILER_VERSION)
|
| 14 |
+
message(FATAL_ERROR "Could not detect CMAKE_C_COMPILER_VERSION. This should be automatic. Check your product license.\n")
|
| 15 |
+
endif()
|
| 16 |
+
|
| 17 |
+
# Unused after CMP0128
|
| 18 |
+
set(CMAKE_C_EXTENSION_COMPILE_OPTION -e)
|
| 19 |
+
|
| 20 |
+
if(CMAKE_C_COMPILER_VERSION_INTERNAL VERSION_GREATER 7)
|
| 21 |
+
set(CMAKE_C90_STANDARD_COMPILE_OPTION --c89)
|
| 22 |
+
set(CMAKE_C90_EXTENSION_COMPILE_OPTION --c89 -e)
|
| 23 |
+
else()
|
| 24 |
+
set(CMAKE_C90_STANDARD_COMPILE_OPTION "")
|
| 25 |
+
set(CMAKE_C90_EXTENSION_COMPILE_OPTION -e)
|
| 26 |
+
endif()
|
| 27 |
+
|
| 28 |
+
set(CMAKE_C${CMAKE_C_STANDARD_COMPUTED_DEFAULT}_STANDARD_COMPILE_OPTION "")
|
| 29 |
+
set(CMAKE_C${CMAKE_C_STANDARD_COMPUTED_DEFAULT}_EXTENSION_COMPILE_OPTION -e)
|
| 30 |
+
|
| 31 |
+
# Architecture specific
|
| 32 |
+
if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
|
| 33 |
+
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5)
|
| 34 |
+
# IAR C Compiler for Arm prior version 5.xx uses XLINK. Support in CMake is not implemented.
|
| 35 |
+
message(FATAL_ERROR "IAR C Compiler for Arm version ${CMAKE_C_COMPILER_VERSION} not supported by CMake.")
|
| 36 |
+
endif()
|
| 37 |
+
__compiler_iar_ilink(C)
|
| 38 |
+
__compiler_check_default_language_standard(C 5.10 90 6.10 99 8.10 11 8.40 17)
|
| 39 |
+
|
| 40 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX")
|
| 41 |
+
__compiler_iar_ilink(C)
|
| 42 |
+
__compiler_check_default_language_standard(C 1.10 90 2.10 99 4.10 11 4.20 17)
|
| 43 |
+
|
| 44 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "RH850")
|
| 45 |
+
__compiler_iar_ilink(C)
|
| 46 |
+
__compiler_check_default_language_standard(C 1.10 90 1.10 99 2.10 11 2.21 17)
|
| 47 |
+
|
| 48 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "RL78")
|
| 49 |
+
if(CMAKE_C_COMPILER_VERSION VERSION_LESS 2)
|
| 50 |
+
# IAR C Compiler for RL78 prior version 2.xx uses XLINK. Support in CMake is not implemented.
|
| 51 |
+
message(FATAL_ERROR "IAR C Compiler for RL78 version ${CMAKE_C_COMPILER_VERSION} not supported by CMake.")
|
| 52 |
+
endif()
|
| 53 |
+
__compiler_iar_ilink(C)
|
| 54 |
+
__compiler_check_default_language_standard(C 2.10 90 2.10 99 4.10 11 4.20 17)
|
| 55 |
+
|
| 56 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV")
|
| 57 |
+
__compiler_iar_ilink(C)
|
| 58 |
+
__compiler_check_default_language_standard(C 1.10 90 1.10 99 1.10 11 1.21 17)
|
| 59 |
+
|
| 60 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
|
| 61 |
+
__compiler_iar_xlink(C)
|
| 62 |
+
__compiler_check_default_language_standard(C 7.10 99 8.10 17)
|
| 63 |
+
set(CMAKE_C_OUTPUT_EXTENSION ".r90")
|
| 64 |
+
|
| 65 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
|
| 66 |
+
__compiler_iar_xlink(C)
|
| 67 |
+
__compiler_check_default_language_standard(C 1.10 90 5.10 99)
|
| 68 |
+
set(CMAKE_C_OUTPUT_EXTENSION ".r43")
|
| 69 |
+
|
| 70 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
|
| 71 |
+
__compiler_iar_xlink(C)
|
| 72 |
+
__compiler_check_default_language_standard(C 1.10 90 4.10 99)
|
| 73 |
+
set(CMAKE_C_OUTPUT_EXTENSION ".r85")
|
| 74 |
+
|
| 75 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
|
| 76 |
+
__compiler_iar_xlink(C)
|
| 77 |
+
__compiler_check_default_language_standard(C 6.10 90 8.10 99)
|
| 78 |
+
set(CMAKE_C_OUTPUT_EXTENSION ".r51")
|
| 79 |
+
|
| 80 |
+
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
|
| 81 |
+
__compiler_iar_ilink(C)
|
| 82 |
+
__compiler_check_default_language_standard(C 3.11 90 3.11 99)
|
| 83 |
+
|
| 84 |
+
else()
|
| 85 |
+
message(FATAL_ERROR "CMAKE_C_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.")
|
| 86 |
+
endif()
|
cmake/share/cmake-3.31/Modules/Compiler/IAR-CXX.cmake
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is processed when the IAR C++ Compiler is used
|
| 2 |
+
#
|
| 3 |
+
# C++ Language Specification support
|
| 4 |
+
# - Newer versions of the IAR C++ Compiler require the --c++ flag to build a C++ file.
|
| 5 |
+
# Earlier versions for non-ARM architectures provided Embedded C++, enabled with the --eec++ flag.
|
| 6 |
+
#
|
| 7 |
+
# The IAR Language Extensions
|
| 8 |
+
# - The IAR Language Extensions can be enabled by -e flag
|
| 9 |
+
#
|
| 10 |
+
include(Compiler/IAR)
|
| 11 |
+
include(Compiler/CMakeCommonCompilerMacros)
|
| 12 |
+
|
| 13 |
+
if(NOT CMAKE_CXX_COMPILER_VERSION)
|
| 14 |
+
message(FATAL_ERROR "Could not detect CMAKE_CXX_COMPILER_VERSION. This should be automatic. Check your product license.\n")
|
| 15 |
+
endif()
|
| 16 |
+
|
| 17 |
+
# Whenever needed, override this default behavior using CMAKE_IAR_CXX_FLAG in your toolchain file.
|
| 18 |
+
if(NOT CMAKE_IAR_CXX_FLAG)
|
| 19 |
+
cmake_policy(PUSH)
|
| 20 |
+
cmake_policy(SET CMP0057 NEW) # if IN_LIST
|
| 21 |
+
|
| 22 |
+
set(_CMAKE_IAR_MODERNCXX_LIST 14 17)
|
| 23 |
+
if(${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT} IN_LIST _CMAKE_IAR_MODERNCXX_LIST OR
|
| 24 |
+
("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM" AND ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT} EQUAL 98))
|
| 25 |
+
set(CMAKE_IAR_CXX_FLAG --c++)
|
| 26 |
+
else()
|
| 27 |
+
set(CMAKE_IAR_CXX_FLAG --eec++)
|
| 28 |
+
endif()
|
| 29 |
+
unset(_CMAKE_IAR_MODERNCXX_LIST)
|
| 30 |
+
|
| 31 |
+
cmake_policy(POP)
|
| 32 |
+
endif()
|
| 33 |
+
|
| 34 |
+
set(CMAKE_CXX_STANDARD_COMPILE_OPTION "")
|
| 35 |
+
set(CMAKE_CXX_EXTENSION_COMPILE_OPTION -e) # Unused after CMP0128
|
| 36 |
+
|
| 37 |
+
set(CMAKE_CXX${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}_STANDARD_COMPILE_OPTION "")
|
| 38 |
+
set(CMAKE_CXX${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}_EXTENSION_COMPILE_OPTION -e)
|
| 39 |
+
|
| 40 |
+
# Architecture specific
|
| 41 |
+
if("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
|
| 42 |
+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
|
| 43 |
+
# IAR C++ Compiler for Arm prior version 5.xx uses XLINK. Support in CMake is not implemented.
|
| 44 |
+
message(FATAL_ERROR "IAR C++ Compiler for Arm version ${CMAKE_CXX_COMPILER_VERSION} not supported by CMake.")
|
| 45 |
+
endif()
|
| 46 |
+
__compiler_iar_ilink(CXX)
|
| 47 |
+
__compiler_check_default_language_standard(CXX 5.10 98 8.10 14 8.40 17)
|
| 48 |
+
|
| 49 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX")
|
| 50 |
+
__compiler_iar_ilink(CXX)
|
| 51 |
+
__compiler_check_default_language_standard(CXX 2.10 98 4.10 14 4.20 17)
|
| 52 |
+
|
| 53 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "RH850")
|
| 54 |
+
__compiler_iar_ilink(CXX)
|
| 55 |
+
__compiler_check_default_language_standard(CXX 1.10 98 2.10 14 2.21 17)
|
| 56 |
+
|
| 57 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "RL78")
|
| 58 |
+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2)
|
| 59 |
+
# IAR C++ Compiler for RL78 prior version 2.xx uses XLINK. Support in CMake is not implemented.
|
| 60 |
+
message(FATAL_ERROR "IAR C++ Compiler for RL78 version ${CMAKE_CXX_COMPILER_VERSION} not supported by CMake.")
|
| 61 |
+
endif()
|
| 62 |
+
__compiler_iar_ilink(CXX)
|
| 63 |
+
__compiler_check_default_language_standard(CXX 2.10 98 4.10 14 4.20 17)
|
| 64 |
+
|
| 65 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV")
|
| 66 |
+
__compiler_iar_ilink(CXX)
|
| 67 |
+
__compiler_check_default_language_standard(CXX 1.10 98 1.10 14 1.21 17)
|
| 68 |
+
|
| 69 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
|
| 70 |
+
__compiler_iar_xlink(CXX)
|
| 71 |
+
__compiler_check_default_language_standard(CXX 7.10 98 8.10 17)
|
| 72 |
+
set(CMAKE_CXX_OUTPUT_EXTENSION ".r90")
|
| 73 |
+
|
| 74 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
|
| 75 |
+
__compiler_iar_xlink(CXX)
|
| 76 |
+
__compiler_check_default_language_standard(CXX 5.10 98)
|
| 77 |
+
set(CMAKE_CXX_OUTPUT_EXTENSION ".r43")
|
| 78 |
+
|
| 79 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
|
| 80 |
+
__compiler_iar_xlink(CXX)
|
| 81 |
+
__compiler_check_default_language_standard(CXX 1.10 98)
|
| 82 |
+
set(CMAKE_CXX_OUTPUT_EXTENSION ".r85")
|
| 83 |
+
|
| 84 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
|
| 85 |
+
__compiler_iar_xlink(CXX)
|
| 86 |
+
__compiler_check_default_language_standard(CXX 6.10 98)
|
| 87 |
+
set(CMAKE_CXX_OUTPUT_EXTENSION ".r51")
|
| 88 |
+
|
| 89 |
+
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
|
| 90 |
+
__compiler_iar_ilink(CXX)
|
| 91 |
+
__compiler_check_default_language_standard(CXX 3.11 98)
|
| 92 |
+
|
| 93 |
+
else()
|
| 94 |
+
message(FATAL_ERROR "CMAKE_CXX_COMPILER_ARCHITECTURE_ID not detected. This should be automatic." )
|
| 95 |
+
endif()
|
cmake/share/cmake-3.31/Modules/Compiler/IAR-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# IAR C/C++ Compiler (https://www.iar.com)
|
| 2 |
+
# CPU <arch> supported in CMake: 8051, Arm, AVR, MSP430, RH850, RISC-V, RL78, RX and V850
|
| 3 |
+
#
|
| 4 |
+
# IAR C/C++ Compiler for <arch> internal integer symbols used in CMake:
|
| 5 |
+
#
|
| 6 |
+
# __IAR_SYSTEMS_ICC__
|
| 7 |
+
# Provides the compiler internal platform version
|
| 8 |
+
# __ICC<arch>__
|
| 9 |
+
# Provides 1 for the current <arch> in use
|
| 10 |
+
# __VER__
|
| 11 |
+
# Provides the current version in use
|
| 12 |
+
# The semantic version of the compiler is architecture-dependent
|
| 13 |
+
# When <arch> is ARM:
|
| 14 |
+
# CMAKE_<LANG>_COMPILER_VERSION_MAJOR = (__VER__ / 1E6)
|
| 15 |
+
# CMAKE_<LANG>_COMPILER_VERSION_MINOR = (__VER__ / 1E3) % 1E3
|
| 16 |
+
# CMAKE_<LANG>_COMPILER_VERSION_PATCH = (__VER__ % 1E3)
|
| 17 |
+
# When <arch> is non-ARM:
|
| 18 |
+
# CMAKE_<LANG>_COMPILER_VERSION_MAJOR = (__VER__ / 1E2)
|
| 19 |
+
# CMAKE_<LANG>_COMPILER_VERSION_MINOR = (__VER__ - ((__VER__/ 1E2) * 1E2))
|
| 20 |
+
# CMAKE_<LANG>_COMPILER_VERSION_PATCH = (__SUBVERSION__)
|
| 21 |
+
# __SUBVERSION__
|
| 22 |
+
# Provides the version's patch level for non-ARM <arch>
|
| 23 |
+
#
|
| 24 |
+
set(_compiler_id_pp_test "defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)")
|
| 25 |
+
|
| 26 |
+
set(_compiler_id_version_compute "
|
| 27 |
+
# if defined(__VER__) && defined(__ICCARM__)
|
| 28 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 1000000)
|
| 29 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(((__VER__) / 1000) % 1000)
|
| 30 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@((__VER__) % 1000)
|
| 31 |
+
# define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__IAR_SYSTEMS_ICC__)
|
| 32 |
+
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
|
| 33 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 100)
|
| 34 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@((__VER__) - (((__VER__) / 100)*100))
|
| 35 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__SUBVERSION__)
|
| 36 |
+
# define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__IAR_SYSTEMS_ICC__)
|
| 37 |
+
# endif")
|
cmake/share/cmake-3.31/Modules/Compiler/IAR.cmake
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is processed when the IAR C/C++ Compiler is used
|
| 2 |
+
#
|
| 3 |
+
# CPU <arch> supported in CMake: 8051, Arm, AVR, MSP430, RH850, RISC-V, RL78, RX, STM8 and V850
|
| 4 |
+
#
|
| 5 |
+
# The compiler user documentation is architecture-dependent
|
| 6 |
+
# and it can found with the product installation under <arch>/doc/{EW,BX}<arch>_DevelopmentGuide.ENU.pdf
|
| 7 |
+
#
|
| 8 |
+
#
|
| 9 |
+
include_guard()
|
| 10 |
+
|
| 11 |
+
macro(__compiler_iar_common lang)
|
| 12 |
+
if ("x${lang}" MATCHES "^x(C|CXX)$")
|
| 13 |
+
set(CMAKE_${lang}_COMPILE_OBJECT "<CMAKE_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
|
| 14 |
+
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> --preprocess=cnl <PREPROCESSED_SOURCE>")
|
| 15 |
+
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -lAH <ASSEMBLY_SOURCE> -o <OBJECT>.dummy")
|
| 16 |
+
|
| 17 |
+
set(CMAKE_DEPFILE_FLAGS_${lang} "--dependencies=ns <DEP_FILE>")
|
| 18 |
+
|
| 19 |
+
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
| 20 |
+
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -r")
|
| 21 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -Oh -DNDEBUG")
|
| 22 |
+
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Ohz -DNDEBUG")
|
| 23 |
+
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Oh -r -DNDEBUG")
|
| 24 |
+
endif()
|
| 25 |
+
|
| 26 |
+
set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
|
| 27 |
+
set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-f ")
|
| 28 |
+
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-f ")
|
| 29 |
+
|
| 30 |
+
set(CMAKE_${lang}_ARCHIVE_FINISH "")
|
| 31 |
+
endmacro()
|
| 32 |
+
|
| 33 |
+
macro(__compiler_iar_ilink lang)
|
| 34 |
+
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
|
| 35 |
+
set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
|
| 36 |
+
|
| 37 |
+
__compiler_iar_common(${lang})
|
| 38 |
+
|
| 39 |
+
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " --silent")
|
| 40 |
+
set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
|
| 41 |
+
|
| 42 |
+
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS>")
|
| 43 |
+
set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS>")
|
| 44 |
+
set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> <TARGET> --replace <LINK_FLAGS> <OBJECTS>")
|
| 45 |
+
endmacro()
|
| 46 |
+
|
| 47 |
+
macro(__compiler_iar_xlink lang)
|
| 48 |
+
set(CMAKE_EXECUTABLE_SUFFIX ".bin")
|
| 49 |
+
|
| 50 |
+
__compiler_iar_common(${lang})
|
| 51 |
+
|
| 52 |
+
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " -S")
|
| 53 |
+
set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
|
| 54 |
+
|
| 55 |
+
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> <TARGET> <LINK_FLAGS> <OBJECTS>")
|
| 56 |
+
set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> <TARGET> <LINK_FLAGS> <OBJECTS>")
|
| 57 |
+
set(CMAKE_${lang}_ARCHIVE_APPEND "")
|
| 58 |
+
|
| 59 |
+
set(CMAKE_LIBRARY_PATH_FLAG "-I")
|
| 60 |
+
endmacro()
|
| 61 |
+
|
| 62 |
+
macro(__assembler_iar_deps flag min_version)
|
| 63 |
+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL ${min_version})
|
| 64 |
+
set(CMAKE_DEPFILE_FLAGS_ASM "${flag} <DEP_FILE>")
|
| 65 |
+
endif()
|
| 66 |
+
endmacro()
|
cmake/share/cmake-3.31/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_version_compute "
|
| 3 |
+
/* __IBMC__ = VRP */
|
| 4 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__IBMC__/100)
|
| 5 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__IBMC__/10 % 10)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__IBMC__ % 10)")
|
cmake/share/cmake-3.31/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
set(_compiler_id_version_compute "
|
| 3 |
+
/* __IBMCPP__ = VRP */
|
| 4 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__IBMCPP__/100)
|
| 5 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__IBMCPP__/10 % 10)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__IBMCPP__ % 10)")
|
cmake/share/cmake-3.31/Modules/Compiler/IBMClang-ASM.cmake
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/IBMClang)
|
| 2 |
+
|
| 3 |
+
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm)
|
| 4 |
+
|
| 5 |
+
__compiler_ibmclang(ASM)
|
cmake/share/cmake-3.31/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(_compiler_id_pp_test "defined(__open_xl__) && defined(__clang__)")
|
| 2 |
+
|
| 3 |
+
set(_compiler_id_version_compute "
|
| 4 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__open_xl_version__)
|
| 5 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__open_xl_release__)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__open_xl_modification__)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__open_xl_ptf_fix_level__)
|
| 8 |
+
")
|
cmake/share/cmake-3.31/Modules/Compiler/IBMClang-C.cmake
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/IBMClang)
|
| 2 |
+
__compiler_ibmclang(C)
|
| 3 |
+
|
| 4 |
+
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
|
| 5 |
+
|
| 6 |
+
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
|
| 7 |
+
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
|
| 8 |
+
AND CMAKE_DEPFILE_FLAGS_C)
|
| 9 |
+
# dependencies are computed by the compiler itself
|
| 10 |
+
set(CMAKE_C_DEPFILE_FORMAT gcc)
|
| 11 |
+
set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
|
| 12 |
+
endif()
|
| 13 |
+
|
| 14 |
+
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
|
| 15 |
+
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
|
| 16 |
+
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
|
| 17 |
+
|
| 18 |
+
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
|
| 19 |
+
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
|
| 20 |
+
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
|
| 21 |
+
|
| 22 |
+
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
|
| 23 |
+
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
|
| 24 |
+
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
|
| 25 |
+
|
| 26 |
+
set(CMAKE_C_STANDARD_LATEST 11)
|
| 27 |
+
|
| 28 |
+
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 17.1.0)
|
| 29 |
+
set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std=c17")
|
| 30 |
+
set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17")
|
| 31 |
+
set(CMAKE_C_STANDARD_LATEST 17)
|
| 32 |
+
endif ()
|
| 33 |
+
__compiler_check_default_language_standard(C 17.1.0 17)
|
cmake/share/cmake-3.31/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
set(_compiler_id_pp_test "defined(__open_xl__) && defined(__clang__)")
|
| 2 |
+
|
| 3 |
+
set(_compiler_id_version_compute "
|
| 4 |
+
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__open_xl_version__)
|
| 5 |
+
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__open_xl_release__)
|
| 6 |
+
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__open_xl_modification__)
|
| 7 |
+
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__open_xl_ptf_fix_level__)
|
| 8 |
+
")
|
cmake/share/cmake-3.31/Modules/Compiler/IBMClang-CXX.cmake
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
include(Compiler/IBMClang)
|
| 2 |
+
__compiler_ibmclang(CXX)
|
| 3 |
+
|
| 4 |
+
if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
|
| 5 |
+
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
|
| 6 |
+
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
|
| 7 |
+
AND CMAKE_DEPFILE_FLAGS_CXX)
|
| 8 |
+
# dependencies are computed by the compiler itself
|
| 9 |
+
set(CMAKE_CXX_DEPFILE_FORMAT gcc)
|
| 10 |
+
set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
|
| 11 |
+
endif()
|
| 12 |
+
|
| 13 |
+
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
|
| 14 |
+
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
| 15 |
+
endif()
|
| 16 |
+
|
| 17 |
+
set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
|
| 18 |
+
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
|
| 19 |
+
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
|
| 20 |
+
|
| 21 |
+
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
|
| 22 |
+
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
|
| 23 |
+
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
|
| 24 |
+
|
| 25 |
+
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
|
| 26 |
+
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
|
| 27 |
+
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
|
| 28 |
+
|
| 29 |
+
set(CMAKE_CXX_STANDARD_LATEST 14)
|
| 30 |
+
|
| 31 |
+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.1.0)
|
| 32 |
+
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
|
| 33 |
+
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
|
| 34 |
+
set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++20")
|
| 35 |
+
set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++20")
|
| 36 |
+
set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "-std=c++2b")
|
| 37 |
+
set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "-std=gnu++2b")
|
| 38 |
+
set(CMAKE_CXX_STANDARD_LATEST 23)
|
| 39 |
+
endif()
|
| 40 |
+
|
| 41 |
+
__compiler_check_default_language_standard(CXX 17.1.0 17)
|
| 42 |
+
|
| 43 |
+
set(CMAKE_CXX_COMPILE_OBJECT
|
| 44 |
+
"<CMAKE_CXX_COMPILER> -x c++ <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
|
cmake/share/cmake-3.31/Modules/Compiler/IBMClang.cmake
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
| 2 |
+
# file Copyright.txt or https://cmake.org/licensing for details.
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
# This module is shared by multiple languages; use include blocker.
|
| 6 |
+
if(__COMPILER_IBMClang)
|
| 7 |
+
return()
|
| 8 |
+
endif()
|
| 9 |
+
set(__COMPILER_IBMClang 1)
|
| 10 |
+
|
| 11 |
+
include(Compiler/CMakeCommonCompilerMacros)
|
| 12 |
+
|
| 13 |
+
set(__pch_header_C "c-header")
|
| 14 |
+
set(__pch_header_CXX "c++-header")
|
| 15 |
+
set(__pch_header_OBJC "objective-c-header")
|
| 16 |
+
set(__pch_header_OBJCXX "objective-c++-header")
|
| 17 |
+
|
| 18 |
+
include(Compiler/GNU)
|
| 19 |
+
|
| 20 |
+
macro(__compiler_ibmclang lang)
|
| 21 |
+
__compiler_gnu(${lang})
|
| 22 |
+
|
| 23 |
+
# Feature flags.
|
| 24 |
+
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
| 25 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
|
| 26 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIC")
|
| 27 |
+
set(CMAKE_${lang}_RESPONSE_FILE_FLAG "@")
|
| 28 |
+
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "@")
|
| 29 |
+
|
| 30 |
+
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
|
| 31 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
|
| 32 |
+
|
| 33 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "--target=")
|
| 34 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN "--gcc-toolchain=")
|
| 35 |
+
|
| 36 |
+
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Xlinker" " ")
|
| 37 |
+
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP)
|
| 38 |
+
|
| 39 |
+
if(CMAKE_${lang}_COMPILER_TARGET AND "${lang}" STREQUAL "CXX")
|
| 40 |
+
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
|
| 41 |
+
endif()
|
| 42 |
+
|
| 43 |
+
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
|
| 44 |
+
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
|
| 45 |
+
|
| 46 |
+
# Thin LTO is not yet supported on AIX.
|
| 47 |
+
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "AIX"))
|
| 48 |
+
set(_CMAKE_LTO_THIN TRUE)
|
| 49 |
+
endif()
|
| 50 |
+
|
| 51 |
+
if(_CMAKE_LTO_THIN)
|
| 52 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-flto=thin")
|
| 53 |
+
else()
|
| 54 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-flto")
|
| 55 |
+
endif()
|
| 56 |
+
|
| 57 |
+
set(__ar "${CMAKE_${lang}_COMPILER_AR}")
|
| 58 |
+
set(__ranlib "${CMAKE_${lang}_COMPILER_RANLIB}")
|
| 59 |
+
|
| 60 |
+
set(CMAKE_${lang}_ARCHIVE_CREATE_IPO
|
| 61 |
+
"\"${__ar}\" qc <TARGET> <LINK_FLAGS> <OBJECTS>"
|
| 62 |
+
)
|
| 63 |
+
|
| 64 |
+
set(CMAKE_${lang}_ARCHIVE_APPEND_IPO
|
| 65 |
+
"\"${__ar}\" q <TARGET> <LINK_FLAGS> <OBJECTS>"
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
set(CMAKE_${lang}_ARCHIVE_FINISH_IPO
|
| 69 |
+
"\"${__ranlib}\" <TARGET>"
|
| 70 |
+
)
|
| 71 |
+
|
| 72 |
+
if("${lang}" STREQUAL "CXX")
|
| 73 |
+
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
|
| 74 |
+
endif()
|
| 75 |
+
|
| 76 |
+
set(CMAKE_PCH_EXTENSION .pch)
|
| 77 |
+
|
| 78 |
+
set(CMAKE_PCH_PROLOGUE "#pragma clang system_header")
|
| 79 |
+
|
| 80 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
|
| 81 |
+
|
| 82 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Xclang -include-pch -Xclang <PCH_FILE> -Xclang -include -Xclang <PCH_HEADER>)
|
| 83 |
+
set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Xclang -emit-pch -Xclang -include -Xclang <PCH_HEADER> -x ${__pch_header_${lang}})
|
| 84 |
+
endmacro()
|