New upstream version 3.25.1

ci/unstable
Timo Röhling 2 years ago
parent 1d5f9d1e05
commit b61d7a265d

@ -41,7 +41,8 @@ to tell CMake how to invoke the C++20 module dependency scanning tool.
MSVC 19.34 (provided with Visual Studio 17.4) and above contains the support MSVC 19.34 (provided with Visual Studio 17.4) and above contains the support
that CMake needs and has these variables already set up as required and only that CMake needs and has these variables already set up as required and only
the UUID variable needs to be set. the UUID and the ``CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP`` variables need to be
set.
For example, add code like the following to a test project: For example, add code like the following to a test project:
@ -76,8 +77,9 @@ For compilers that generate module maps, tell CMake as follows:
set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG
"${compiler_flags_for_module_map} -fmodule-mapper=<MODULE_MAP_FILE>") "${compiler_flags_for_module_map} -fmodule-mapper=<MODULE_MAP_FILE>")
Currently, the only supported format is ``gcc``. The format is described in Currently, the only supported formats are ``gcc`` and ``msvc``. The ``gcc``
the GCC documentation, but the relevant section for the purposes of CMake is: format is described in the GCC documentation, but the relevant section for the
purposes of CMake is:
A mapping file consisting of space-separated module-name, filename A mapping file consisting of space-separated module-name, filename
pairs, one per line. Only the mappings for the direct imports and any pairs, one per line. Only the mappings for the direct imports and any
@ -88,6 +90,10 @@ the GCC documentation, but the relevant section for the purposes of CMake is:
-- GCC module mapper documentation -- GCC module mapper documentation
The ``msvc`` format is a response file containing flags required to compile
any module interfaces properly as well as find any required files to satisfy
``import`` statements as required for Microsoft's Visual Studio toolchains.
.. _`D1483r1`: https://mathstuf.fedorapeople.org/fortran-modules/fortran-modules.html .. _`D1483r1`: https://mathstuf.fedorapeople.org/fortran-modules/fortran-modules.html
.. _`P1689r5`: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html .. _`P1689r5`: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html
.. _`cxx-modules-sandbox`: https://github.com/mathstuf/cxx-modules-sandbox .. _`cxx-modules-sandbox`: https://github.com/mathstuf/cxx-modules-sandbox

@ -223,11 +223,6 @@ Deprecated and Removed Features
Other Changes Other Changes
============= =============
* On Windows, when targeting the MSVC ABI, the :command:`find_library` command
now accepts ``.a`` file names after first considering ``.lib``. This is
symmetric with existing behavior when targeting the GNU ABI, in which the
command accepts ``.lib`` file names after first considering ``.a``.
* The :envvar:`SSL_CERT_FILE` and :envvar:`SSL_CERT_DIR` environment * The :envvar:`SSL_CERT_FILE` and :envvar:`SSL_CERT_DIR` environment
variables can now be used to override where to find certificate variables can now be used to override where to find certificate
authorities for TLS/SSL operations. authorities for TLS/SSL operations.
@ -238,3 +233,16 @@ Other Changes
* The :generator:`Xcode` generator no longer adds the per-config suffix * The :generator:`Xcode` generator no longer adds the per-config suffix
``$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`` to library search paths. ``$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`` to library search paths.
See policy :policy:`CMP0142`. See policy :policy:`CMP0142`.
Updates
=======
Changes made since CMake 3.25.0 include the following.
3.25.1
------
* On Windows, when targeting the MSVC ABI, the :command:`find_library`
command no longer accepts ``.a`` file names. This behavior was added
in CMake 3.25.0, but has been reverted due finding GNU-ABI libraries
in cases we did not previously.

@ -30,16 +30,19 @@ if(NOT CMAKE_RC_COMPILER)
# finally list compilers to try # finally list compilers to try
if(CMAKE_RC_COMPILER_INIT) if(CMAKE_RC_COMPILER_INIT)
set(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT}) set(_CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT})
else() set(_CMAKE_RC_COMPILER_FALLBACK ${CMAKE_RC_COMPILER_INIT})
set(CMAKE_RC_COMPILER_LIST rc) elseif(NOT _CMAKE_RC_COMPILER_LIST)
set(_CMAKE_RC_COMPILER_LIST rc)
endif() endif()
# Find the compiler. # Find the compiler.
find_program(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler") find_program(CMAKE_RC_COMPILER NAMES ${_CMAKE_RC_COMPILER_LIST} DOC "RC compiler")
if(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER) if(_CMAKE_RC_COMPILER_FALLBACK AND NOT CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE) set(CMAKE_RC_COMPILER "${_CMAKE_RC_COMPILER_FALLBACK}" CACHE FILEPATH "RC compiler" FORCE)
endif() endif()
unset(_CMAKE_RC_COMPILER_FALLBACK)
unset(_CMAKE_RC_COMPILER_LIST)
endif() endif()
mark_as_advanced(CMAKE_RC_COMPILER) mark_as_advanced(CMAKE_RC_COMPILER)

@ -70,10 +70,11 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
message(FATAL_ERROR "Unknown arguments:\n ${ARGN}\n") message(FATAL_ERROR "Unknown arguments:\n ${ARGN}\n")
endif() endif()
string(MAKE_C_IDENTIFIER ${VARIABLE} _variable_escaped)
if(_lang STREQUAL "C") if(_lang STREQUAL "C")
set(src ${VARIABLE}.c) set(src ${_variable_escaped}.c)
elseif(_lang STREQUAL "CXX") elseif(_lang STREQUAL "CXX")
set(src ${VARIABLE}.cpp) set(src ${_variable_escaped}.cpp)
else() else()
message(FATAL_ERROR "Unknown language:\n ${_lang}\nSupported languages: C, CXX.\n") message(FATAL_ERROR "Unknown language:\n ${_lang}\nSupported languages: C, CXX.\n")
endif() endif()

@ -103,10 +103,11 @@ function(__check_type_size_impl type var map builtin language)
endif() endif()
# Perform language check # Perform language check
string(MAKE_C_IDENTIFIER ${var} _var_escaped)
if(language STREQUAL "C") if(language STREQUAL "C")
set(src ${var}.c) set(src ${_var_escaped}.c)
elseif(language STREQUAL "CXX") elseif(language STREQUAL "CXX")
set(src ${var}.cpp) set(src ${_var_escaped}.cpp)
else() else()
message(FATAL_ERROR "Unknown language:\n ${language}\nSupported languages: C, CXX.\n") message(FATAL_ERROR "Unknown language:\n ${language}\nSupported languages: C, CXX.\n")
endif() endif()

@ -79,7 +79,6 @@ elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
endif() endif()
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.34") if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.34")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE
"<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> <SOURCE> -nologo -TP" "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> <SOURCE> -nologo -TP"
" -showIncludes" " -showIncludes"

@ -1150,8 +1150,10 @@ if(NOT CUDA_VERSION VERSION_LESS "9.0")
find_cuda_helper_libs(nppc) find_cuda_helper_libs(nppc)
find_cuda_helper_libs(nppial) find_cuda_helper_libs(nppial)
find_cuda_helper_libs(nppicc) find_cuda_helper_libs(nppicc)
set(CUDA_npp_LIBRARY ${CUDA_nppc_LIBRARY} ${CUDA_nppial_LIBRARY} ${CUDA_nppicc_LIBRARY})
if(CUDA_VERSION VERSION_LESS "11.0") if(CUDA_VERSION VERSION_LESS "11.0")
find_cuda_helper_libs(nppicom) find_cuda_helper_libs(nppicom)
list(APPEND CUDA_npp_LIBRARY ${CUDA_nppicom_LIBRARY})
endif() endif()
find_cuda_helper_libs(nppidei) find_cuda_helper_libs(nppidei)
find_cuda_helper_libs(nppif) find_cuda_helper_libs(nppif)
@ -1161,7 +1163,7 @@ if(NOT CUDA_VERSION VERSION_LESS "9.0")
find_cuda_helper_libs(nppisu) find_cuda_helper_libs(nppisu)
find_cuda_helper_libs(nppitc) find_cuda_helper_libs(nppitc)
find_cuda_helper_libs(npps) find_cuda_helper_libs(npps)
set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}") list(APPEND CUDA_npp_LIBRARY ${CUDA_nppidei_LIBRARY} ${CUDA_nppif_LIBRARY} ${CUDA_nppig_LIBRARY} ${CUDA_nppim_LIBRARY} ${CUDA_nppist_LIBRARY} ${CUDA_nppisu_LIBRARY} ${CUDA_nppitc_LIBRARY} ${CUDA_npps_LIBRARY})
elseif(CUDA_VERSION VERSION_GREATER "5.0") elseif(CUDA_VERSION VERSION_GREATER "5.0")
# In CUDA 5.5 NPP was split into 3 separate libraries. # In CUDA 5.5 NPP was split into 3 separate libraries.
find_cuda_helper_libs(nppc) find_cuda_helper_libs(nppc)

@ -1060,9 +1060,11 @@ if(CUDAToolkit_FOUND)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.1.0) if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.1.0)
if(NOT TARGET CUDA::nvptxcompiler_static) if(NOT TARGET CUDA::nvptxcompiler_static)
_CUDAToolkit_find_and_add_import_lib(nvptxcompiler_static DEPS cuda_driver) _CUDAToolkit_find_and_add_import_lib(nvptxcompiler_static DEPS cuda_driver)
if(TARGET CUDA::nvptxcompiler_static)
target_link_libraries(CUDA::nvptxcompiler_static INTERFACE Threads::Threads) target_link_libraries(CUDA::nvptxcompiler_static INTERFACE Threads::Threads)
endif() endif()
endif() endif()
endif()
_CUDAToolkit_find_and_add_import_lib(nvml ALT nvidia-ml nvml) _CUDAToolkit_find_and_add_import_lib(nvml ALT nvidia-ml nvml)

@ -71,9 +71,6 @@ Hints
.. versionadded:: 3.18 .. versionadded:: 3.18
``Ruby_ROOT_DIR``
Define the root directory of a Ruby installation.
``Ruby_FIND_VIRTUALENV`` ``Ruby_FIND_VIRTUALENV``
This variable defines the handling of virtual environments managed by This variable defines the handling of virtual environments managed by
``rvm``. It is meaningful only when a virtual environment ``rvm``. It is meaningful only when a virtual environment

@ -5,6 +5,7 @@ if(CMAKE_ANDROID_NDK)
endif() endif()
include(Platform/Linux) include(Platform/Linux)
unset(LINUX)
set(ANDROID 1) set(ANDROID 1)

@ -157,7 +157,8 @@ macro(__windows_compiler_gnu lang)
endif() endif()
if(NOT CMAKE_RC_COMPILER_INIT AND NOT CMAKE_GENERATOR_RC) if(NOT CMAKE_RC_COMPILER_INIT AND NOT CMAKE_GENERATOR_RC)
set(CMAKE_RC_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}windres windres) set(_CMAKE_RC_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}windres windres)
set(_CMAKE_RC_COMPILER_FALLBACK windres)
endif() endif()
enable_language(RC) enable_language(RC)

@ -19,8 +19,8 @@ set(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
set(CMAKE_DL_LIBS "") set(CMAKE_DL_LIBS "")
set(CMAKE_EXTRA_LINK_EXTENSIONS ".targets") set(CMAKE_EXTRA_LINK_EXTENSIONS ".targets")
set(CMAKE_FIND_LIBRARY_PREFIXES "" "lib") set(CMAKE_FIND_LIBRARY_PREFIXES "")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a") set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
# for borland make long command lines are redirected to a file # for borland make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use # with the following syntax, see Windows-bcc32.cmake for use

@ -1,7 +1,7 @@
# CMake version number components. # CMake version number components.
set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 25) set(CMake_VERSION_MINOR 25)
set(CMake_VERSION_PATCH 0) set(CMake_VERSION_PATCH 1)
#set(CMake_VERSION_RC 0) #set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0) set(CMake_VERSION_IS_DIRTY 0)
@ -21,7 +21,7 @@ endif()
if(NOT CMake_VERSION_NO_GIT) if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info. # If this source was exported by 'git archive', use its commit info.
set(git_info [==[13e46189c7 CMake 3.25.0]==]) set(git_info [==[5676593be9 CMake 3.25.1]==])
# Otherwise, try to identify the current development source version. # Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* " if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "

@ -548,16 +548,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 2 #define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 432 #define YYLAST 433
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 41 #define YYNTOKENS 41
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 14 #define YYNNTS 14
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 64 #define YYNRULES 65
/* YYNSTATES -- Number of states. */ /* YYNSTATES -- Number of states. */
#define YYNSTATES 121 #define YYNSTATES 123
/* YYMAXUTOK -- Last valid token kind. */ /* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 295 #define YYMAXUTOK 295
@ -608,15 +608,15 @@ static const yytype_int8 yytranslate[] =
#if YYDEBUG #if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] = static const yytype_int16 yyrline[] =
{ {
0, 106, 106, 106, 109, 113, 118, 123, 129, 136, 0, 106, 106, 106, 109, 113, 118, 123, 129, 136,
141, 145, 150, 162, 167, 172, 177, 182, 187, 192, 141, 146, 150, 155, 167, 172, 177, 182, 187, 192,
197, 202, 206, 210, 214, 218, 219, 224, 224, 224, 197, 202, 207, 211, 215, 219, 223, 224, 229, 229,
225, 225, 226, 226, 227, 227, 228, 228, 229, 229, 229, 230, 230, 231, 231, 232, 232, 233, 233, 234,
230, 230, 231, 231, 232, 232, 233, 233, 236, 237, 234, 235, 235, 236, 236, 237, 237, 238, 238, 241,
238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
248, 249, 250, 251, 252 252, 253, 254, 255, 256, 257
}; };
#endif #endif
@ -670,15 +670,15 @@ static const yytype_int16 yypact[] =
-39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
-39, -39, -39, -39, -39, -39, -25, -19, 20, -8, -39, -39, -39, -39, -39, -39, -25, -19, 20, -8,
-15, -22, -39, -6, 14, 15, 16, 17, -39, -39, -15, -22, -39, -6, 14, 15, 16, 17, -39, -39,
-39, -39, -39, -39, 59, 49, 51, -39, 63, 64, -39, -39, -39, -39, 59, 51, 48, -39, 63, 64,
35, 36, 37, -39, -39, -39, -39, -39, -39, 74, 35, 36, 37, -39, -39, -39, -39, -39, -39, 75,
112, 127, 165, 180, -39, -39, -39, -39, -39, -39, 113, 128, 166, 181, -39, -39, -39, -39, -39, -39,
-39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
-39, -39, -39, -39, -39, -39, -39, -20, 43, -39, -39, -39, -39, -39, 68, -39, -39, -39, -20, 44,
218, 233, 271, 286, 324, 339, -39, -39, -39, -39, -39, 219, 234, 272, 287, 325, 340, -39, -39, -39,
-39, 39, 40, 41, 377, -39, -39, -39, -39, -39, -39, -39, -39, 40, 41, 42, 378, -39, -39, -39,
-39, 46, 78, -39, -39, 50, -39, 392, 79, -39, -39, -39, -39, 46, 79, -39, -39, 50, -39, 393,
-39 90, -39, -39
}; };
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@ -686,19 +686,19 @@ static const yytype_int16 yypact[] =
means the default is an error. */ means the default is an error. */
static const yytype_int8 yydefact[] = static const yytype_int8 yydefact[] =
{ {
2, 0, 1, 0, 25, 0, 27, 28, 29, 31, 2, 0, 1, 0, 26, 0, 28, 29, 30, 32,
30, 33, 32, 34, 36, 38, 42, 40, 44, 35, 31, 34, 33, 35, 37, 39, 43, 41, 45, 36,
37, 39, 43, 41, 45, 46, 0, 0, 0, 0, 38, 40, 44, 42, 46, 47, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0, 0, 0, 46, 46, 0, 0, 3, 0, 0, 0, 0, 0, 47, 47,
46, 46, 26, 46, 0, 0, 0, 4, 0, 0, 47, 47, 27, 47, 0, 0, 0, 4, 0, 0,
0, 0, 0, 46, 46, 46, 46, 46, 46, 0, 0, 0, 0, 47, 47, 47, 47, 47, 47, 0,
0, 0, 0, 0, 15, 57, 56, 64, 62, 58, 0, 0, 0, 0, 16, 58, 57, 65, 63, 59,
59, 60, 61, 63, 55, 48, 49, 50, 51, 52, 60, 61, 62, 64, 56, 49, 50, 51, 52, 53,
53, 54, 47, 10, 13, 9, 6, 0, 0, 46, 54, 55, 48, 11, 0, 14, 9, 6, 0, 0,
0, 0, 0, 0, 0, 0, 21, 22, 23, 24, 47, 0, 0, 0, 0, 0, 0, 22, 23, 24,
14, 0, 0, 0, 0, 5, 16, 17, 18, 19, 25, 15, 10, 0, 0, 0, 0, 5, 17, 18,
20, 0, 0, 46, 11, 0, 7, 0, 0, 12, 19, 20, 21, 0, 0, 47, 12, 0, 7, 0,
8 0, 13, 8
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
@ -720,50 +720,50 @@ static const yytype_int8 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int8 yytable[] = static const yytype_int8 yytable[] =
{ {
59, 60, 61, 62, 51, 63, 52, 101, 42, 43, 59, 60, 61, 62, 51, 63, 52, 103, 42, 43,
102, 53, 45, 46, 50, 90, 91, 92, 93, 94, 104, 53, 45, 46, 50, 91, 92, 93, 94, 95,
95, 2, 3, 47, 4, 49, 54, 5, 6, 7, 96, 2, 3, 47, 4, 49, 54, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 55, 56, 57, 18, 19, 20, 21, 22, 23, 24, 55, 56, 57,
58, 104, 83, 48, 84, 25, 26, 27, 28, 29, 58, 85, 106, 48, 83, 25, 26, 27, 28, 29,
30, 31, 64, 65, 66, 67, 85, 86, 87, 88, 30, 31, 64, 65, 66, 67, 86, 87, 88, 89,
89, 103, 111, 112, 113, 117, 115, 96, 65, 66, 90, 102, 105, 113, 114, 115, 117, 119, 97, 65,
67, 116, 120, 118, 0, 68, 69, 70, 71, 72, 66, 67, 118, 120, 84, 68, 69, 70, 71, 72,
73, 74, 75, 122, 76, 77, 78, 79, 80, 81,
0, 68, 69, 70, 71, 72, 73, 74, 75, 0,
76, 77, 78, 79, 80, 81, 98, 65, 66, 67,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 99, 65, 66, 67, 0, 0, 0, 0, 68,
69, 70, 71, 72, 73, 74, 75, 0, 76, 77,
78, 79, 80, 81, 68, 69, 70, 71, 72, 73,
74, 75, 0, 76, 77, 78, 79, 80, 81, 100,
65, 66, 67, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 101, 65, 66, 67, 0, 0,
0, 0, 68, 69, 70, 71, 72, 73, 74, 75,
0, 76, 77, 78, 79, 80, 81, 68, 69, 70,
71, 72, 73, 74, 75, 0, 76, 77, 78, 79,
80, 81, 107, 65, 66, 67, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 108, 65, 66,
67, 0, 0, 0, 0, 68, 69, 70, 71, 72,
73, 74, 75, 0, 76, 77, 78, 79, 80, 81, 73, 74, 75, 0, 76, 77, 78, 79, 80, 81,
68, 69, 70, 71, 72, 73, 74, 75, 0, 76, 68, 69, 70, 71, 72, 73, 74, 75, 0, 76,
77, 78, 79, 80, 81, 97, 65, 66, 67, 0, 77, 78, 79, 80, 81, 109, 65, 66, 67, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
98, 65, 66, 67, 0, 0, 0, 0, 68, 69, 110, 65, 66, 67, 0, 0, 0, 0, 68, 69,
70, 71, 72, 73, 74, 75, 0, 76, 77, 78, 70, 71, 72, 73, 74, 75, 0, 76, 77, 78,
79, 80, 81, 68, 69, 70, 71, 72, 73, 74, 79, 80, 81, 68, 69, 70, 71, 72, 73, 74,
75, 0, 76, 77, 78, 79, 80, 81, 99, 65, 75, 0, 76, 77, 78, 79, 80, 81, 111, 65,
66, 67, 0, 0, 0, 0, 0, 0, 0, 0, 66, 67, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 100, 65, 66, 67, 0, 0, 0, 0, 0, 0, 112, 65, 66, 67, 0, 0, 0,
0, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 68, 69, 70, 71, 72, 73, 74, 75, 0,
76, 77, 78, 79, 80, 81, 68, 69, 70, 71, 76, 77, 78, 79, 80, 81, 68, 69, 70, 71,
72, 73, 74, 75, 0, 76, 77, 78, 79, 80, 72, 73, 74, 75, 0, 76, 77, 78, 79, 80,
81, 105, 65, 66, 67, 0, 0, 0, 0, 0, 81, 116, 65, 66, 67, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 106, 65, 66, 67, 0, 0, 0, 0, 0, 0, 121, 65, 66, 67,
0, 0, 0, 0, 68, 69, 70, 71, 72, 73, 0, 0, 0, 0, 68, 69, 70, 71, 72, 73,
74, 75, 0, 76, 77, 78, 79, 80, 81, 68, 74, 75, 0, 76, 77, 78, 79, 80, 81, 68,
69, 70, 71, 72, 73, 74, 75, 0, 76, 77, 69, 70, 71, 72, 73, 74, 75, 0, 76, 77,
78, 79, 80, 81, 107, 65, 66, 67, 0, 0, 78, 79, 80, 81
0, 0, 0, 0, 0, 0, 0, 0, 0, 108,
65, 66, 67, 0, 0, 0, 0, 68, 69, 70,
71, 72, 73, 74, 75, 0, 76, 77, 78, 79,
80, 81, 68, 69, 70, 71, 72, 73, 74, 75,
0, 76, 77, 78, 79, 80, 81, 109, 65, 66,
67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 110, 65, 66, 67, 0, 0, 0, 0,
68, 69, 70, 71, 72, 73, 74, 75, 0, 76,
77, 78, 79, 80, 81, 68, 69, 70, 71, 72,
73, 74, 75, 0, 76, 77, 78, 79, 80, 81,
114, 65, 66, 67, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 119, 65, 66, 67, 0,
0, 0, 0, 68, 69, 70, 71, 72, 73, 74,
75, 0, 76, 77, 78, 79, 80, 81, 68, 69,
70, 71, 72, 73, 74, 75, 0, 76, 77, 78,
79, 80, 81
}; };
static const yytype_int8 yycheck[] = static const yytype_int8 yycheck[] =
@ -773,10 +773,26 @@ static const yytype_int8 yycheck[] =
58, 0, 1, 3, 3, 33, 32, 6, 7, 8, 58, 0, 1, 3, 3, 33, 32, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 33, 33, 33, 19, 20, 21, 22, 23, 24, 25, 33, 33, 33,
33, 89, 3, 33, 3, 34, 35, 36, 37, 38, 33, 3, 90, 33, 3, 34, 35, 36, 37, 38,
39, 40, 3, 4, 5, 6, 3, 3, 33, 33, 39, 40, 3, 4, 5, 6, 3, 3, 33, 33,
33, 28, 33, 33, 33, 113, 30, 3, 4, 5, 33, 3, 28, 33, 33, 33, 30, 115, 3, 4,
6, 3, 3, 33, -1, 26, 27, 28, 29, 30, 5, 6, 3, 33, 33, 26, 27, 28, 29, 30,
31, 32, 33, 3, 35, 36, 37, 38, 39, 40,
-1, 26, 27, 28, 29, 30, 31, 32, 33, -1,
35, 36, 37, 38, 39, 40, 3, 4, 5, 6,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 3, 4, 5, 6, -1, -1, -1, -1, 26,
27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
37, 38, 39, 40, 26, 27, 28, 29, 30, 31,
32, 33, -1, 35, 36, 37, 38, 39, 40, 3,
4, 5, 6, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 3, 4, 5, 6, -1, -1,
-1, -1, 26, 27, 28, 29, 30, 31, 32, 33,
-1, 35, 36, 37, 38, 39, 40, 26, 27, 28,
29, 30, 31, 32, 33, -1, 35, 36, 37, 38,
39, 40, 3, 4, 5, 6, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
6, -1, -1, -1, -1, 26, 27, 28, 29, 30,
31, 32, 33, -1, 35, 36, 37, 38, 39, 40, 31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
26, 27, 28, 29, 30, 31, 32, 33, -1, 35, 26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
36, 37, 38, 39, 40, 3, 4, 5, 6, -1, 36, 37, 38, 39, 40, 3, 4, 5, 6, -1,
@ -795,23 +811,7 @@ static const yytype_int8 yycheck[] =
-1, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31,
32, 33, -1, 35, 36, 37, 38, 39, 40, 26, 32, 33, -1, 35, 36, 37, 38, 39, 40, 26,
27, 28, 29, 30, 31, 32, 33, -1, 35, 36, 27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
37, 38, 39, 40, 3, 4, 5, 6, -1, -1, 37, 38, 39, 40
-1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4, 5, 6, -1, -1, -1, -1, 26, 27, 28,
29, 30, 31, 32, 33, -1, 35, 36, 37, 38,
39, 40, 26, 27, 28, 29, 30, 31, 32, 33,
-1, 35, 36, 37, 38, 39, 40, 3, 4, 5,
6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 3, 4, 5, 6, -1, -1, -1, -1,
26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
36, 37, 38, 39, 40, 26, 27, 28, 29, 30,
31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
3, 4, 5, 6, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 3, 4, 5, 6, -1,
-1, -1, -1, 26, 27, 28, 29, 30, 31, 32,
33, -1, 35, 36, 37, 38, 39, 40, 26, 27,
28, 29, 30, 31, 32, 33, -1, 35, 36, 37,
38, 39, 40
}; };
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
@ -826,11 +826,11 @@ static const yytype_int8 yystos[] =
29, 26, 28, 33, 32, 33, 33, 33, 33, 53, 29, 26, 28, 33, 32, 33, 33, 33, 33, 53,
53, 53, 53, 53, 3, 4, 5, 6, 26, 27, 53, 53, 53, 53, 3, 4, 5, 6, 26, 27,
28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38,
39, 40, 54, 3, 3, 3, 3, 33, 33, 33, 39, 40, 54, 3, 33, 3, 3, 3, 33, 33,
53, 53, 53, 53, 53, 53, 3, 3, 3, 3, 33, 53, 53, 53, 53, 53, 53, 3, 3, 3,
3, 27, 30, 28, 53, 3, 3, 3, 3, 3, 3, 3, 3, 27, 30, 28, 53, 3, 3, 3,
3, 33, 33, 33, 3, 30, 3, 53, 33, 3, 3, 3, 3, 33, 33, 33, 3, 30, 3, 53,
3 33, 3, 3
}; };
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
@ -838,23 +838,23 @@ static const yytype_int8 yyr1[] =
{ {
0, 41, 42, 42, 43, 43, 43, 43, 43, 43, 0, 41, 42, 42, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44,
45, 45, 46, 46, 47, 47, 48, 48, 49, 49, 44, 45, 45, 46, 46, 47, 47, 48, 48, 49,
50, 50, 51, 51, 52, 52, 53, 53, 54, 54, 49, 50, 50, 51, 51, 52, 52, 53, 53, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54 54, 54, 54, 54, 54, 54
}; };
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
static const yytype_int8 yyr2[] = static const yytype_int8 yyr2[] =
{ {
0, 2, 0, 2, 2, 4, 3, 6, 8, 3, 0, 2, 0, 2, 2, 4, 3, 6, 8, 3,
3, 5, 7, 3, 4, 3, 4, 4, 4, 4, 4, 3, 5, 7, 3, 4, 3, 4, 4, 4,
4, 3, 3, 3, 3, 1, 2, 1, 1, 1, 4, 4, 3, 3, 3, 3, 1, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1
}; };
@ -1679,28 +1679,38 @@ yyreduce:
#line 1680 "cmFortranParser.cxx" #line 1680 "cmFortranParser.cxx"
break; break;
case 10: /* stmt: END INTERFACE EOSTMT */ case 10: /* stmt: END INTERFACE WORD EOSTMT */
#line 141 "cmFortranParser.y" #line 141 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_SetInInterface(parser, false); cmFortranParser_SetInInterface(parser, false);
free((yyvsp[-1].string));
} }
#line 1689 "cmFortranParser.cxx" #line 1690 "cmFortranParser.cxx"
break; break;
case 11: /* stmt: USE DCOLON WORD other EOSTMT */ case 11: /* stmt: END INTERFACE EOSTMT */
#line 145 "cmFortranParser.y" #line 146 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); cmFortranParser_SetInInterface(parser, false);
free((yyvsp[-2].string));
} }
#line 1699 "cmFortranParser.cxx" #line 1699 "cmFortranParser.cxx"
break; break;
case 12: /* stmt: USE COMMA WORD DCOLON WORD other EOSTMT */ case 12: /* stmt: USE DCOLON WORD other EOSTMT */
#line 150 "cmFortranParser.y" #line 150 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
#line 1709 "cmFortranParser.cxx"
break;
case 13: /* stmt: USE COMMA WORD DCOLON WORD other EOSTMT */
#line 155 "cmFortranParser.y"
{
if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) { if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
@ -1712,40 +1722,30 @@ yyreduce:
free((yyvsp[-4].string)); free((yyvsp[-4].string));
free((yyvsp[-2].string)); free((yyvsp[-2].string));
} }
#line 1716 "cmFortranParser.cxx"
break;
case 13: /* stmt: INCLUDE STRING EOSTMT */
#line 162 "cmFortranParser.y"
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleInclude(parser, (yyvsp[-1].string));
free((yyvsp[-1].string));
}
#line 1726 "cmFortranParser.cxx" #line 1726 "cmFortranParser.cxx"
break; break;
case 14: /* stmt: CPP_LINE_DIRECTIVE STRING other EOSTMT */ case 14: /* stmt: INCLUDE STRING EOSTMT */
#line 167 "cmFortranParser.y" #line 167 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string)); cmFortranParser_RuleInclude(parser, (yyvsp[-1].string));
free((yyvsp[-2].string)); free((yyvsp[-1].string));
} }
#line 1736 "cmFortranParser.cxx" #line 1736 "cmFortranParser.cxx"
break; break;
case 15: /* stmt: CPP_INCLUDE_ANGLE other EOSTMT */ case 15: /* stmt: CPP_LINE_DIRECTIVE STRING other EOSTMT */
#line 172 "cmFortranParser.y" #line 172 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string));
free((yyvsp[-2].string)); free((yyvsp[-2].string));
} }
#line 1746 "cmFortranParser.cxx" #line 1746 "cmFortranParser.cxx"
break; break;
case 16: /* stmt: include STRING other EOSTMT */ case 16: /* stmt: CPP_INCLUDE_ANGLE other EOSTMT */
#line 177 "cmFortranParser.y" #line 177 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
@ -1755,96 +1755,106 @@ yyreduce:
#line 1756 "cmFortranParser.cxx" #line 1756 "cmFortranParser.cxx"
break; break;
case 17: /* stmt: define WORD other EOSTMT */ case 17: /* stmt: include STRING other EOSTMT */
#line 182 "cmFortranParser.y" #line 182 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleDefine(parser, (yyvsp[-2].string)); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
free((yyvsp[-2].string)); free((yyvsp[-2].string));
} }
#line 1766 "cmFortranParser.cxx" #line 1766 "cmFortranParser.cxx"
break; break;
case 18: /* stmt: undef WORD other EOSTMT */ case 18: /* stmt: define WORD other EOSTMT */
#line 187 "cmFortranParser.y" #line 187 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleUndef(parser, (yyvsp[-2].string)); cmFortranParser_RuleDefine(parser, (yyvsp[-2].string));
free((yyvsp[-2].string)); free((yyvsp[-2].string));
} }
#line 1776 "cmFortranParser.cxx" #line 1776 "cmFortranParser.cxx"
break; break;
case 19: /* stmt: ifdef WORD other EOSTMT */ case 19: /* stmt: undef WORD other EOSTMT */
#line 192 "cmFortranParser.y" #line 192 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string)); cmFortranParser_RuleUndef(parser, (yyvsp[-2].string));
free((yyvsp[-2].string)); free((yyvsp[-2].string));
} }
#line 1786 "cmFortranParser.cxx" #line 1786 "cmFortranParser.cxx"
break; break;
case 20: /* stmt: ifndef WORD other EOSTMT */ case 20: /* stmt: ifdef WORD other EOSTMT */
#line 197 "cmFortranParser.y" #line 197 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string)); cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string));
free((yyvsp[-2].string)); free((yyvsp[-2].string));
} }
#line 1796 "cmFortranParser.cxx" #line 1796 "cmFortranParser.cxx"
break; break;
case 21: /* stmt: if other EOSTMT */ case 21: /* stmt: ifndef WORD other EOSTMT */
#line 202 "cmFortranParser.y" #line 202 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
#line 1806 "cmFortranParser.cxx"
break;
case 22: /* stmt: if other EOSTMT */
#line 207 "cmFortranParser.y"
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleIf(parser); cmFortranParser_RuleIf(parser);
} }
#line 1805 "cmFortranParser.cxx" #line 1815 "cmFortranParser.cxx"
break; break;
case 22: /* stmt: elif other EOSTMT */ case 23: /* stmt: elif other EOSTMT */
#line 206 "cmFortranParser.y" #line 211 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleElif(parser); cmFortranParser_RuleElif(parser);
} }
#line 1814 "cmFortranParser.cxx" #line 1824 "cmFortranParser.cxx"
break; break;
case 23: /* stmt: else other EOSTMT */ case 24: /* stmt: else other EOSTMT */
#line 210 "cmFortranParser.y" #line 215 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleElse(parser); cmFortranParser_RuleElse(parser);
} }
#line 1823 "cmFortranParser.cxx" #line 1833 "cmFortranParser.cxx"
break; break;
case 24: /* stmt: endif other EOSTMT */ case 25: /* stmt: endif other EOSTMT */
#line 214 "cmFortranParser.y" #line 219 "cmFortranParser.y"
{ {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleEndif(parser); cmFortranParser_RuleEndif(parser);
} }
#line 1832 "cmFortranParser.cxx" #line 1842 "cmFortranParser.cxx"
break; break;
case 48: /* misc_code: WORD */ case 49: /* misc_code: WORD */
#line 236 "cmFortranParser.y" #line 241 "cmFortranParser.y"
{ free ((yyvsp[0].string)); } { free ((yyvsp[0].string)); }
#line 1838 "cmFortranParser.cxx" #line 1848 "cmFortranParser.cxx"
break; break;
case 55: /* misc_code: STRING */ case 56: /* misc_code: STRING */
#line 243 "cmFortranParser.y" #line 248 "cmFortranParser.y"
{ free ((yyvsp[0].string)); } { free ((yyvsp[0].string)); }
#line 1844 "cmFortranParser.cxx" #line 1854 "cmFortranParser.cxx"
break; break;
#line 1848 "cmFortranParser.cxx" #line 1858 "cmFortranParser.cxx"
default: break; default: break;
} }
@ -2068,6 +2078,6 @@ yyreturnlab:
return yyresult; return yyresult;
} }
#line 255 "cmFortranParser.y" #line 260 "cmFortranParser.y"
/* End of grammar */ /* End of grammar */

@ -138,6 +138,11 @@ stmt:
cmFortranParser_SetInInterface(parser, true); cmFortranParser_SetInInterface(parser, true);
free($2); free($2);
} }
| END INTERFACE WORD EOSTMT {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_SetInInterface(parser, false);
free($3);
}
| END INTERFACE EOSTMT { | END INTERFACE EOSTMT {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_SetInInterface(parser, false); cmFortranParser_SetInInterface(parser, false);

@ -206,6 +206,8 @@ auto const TryRunSourcesArgParser =
auto const TryRunOldArgParser = makeTryRunParser(TryCompileOldArgParser); auto const TryRunOldArgParser = makeTryRunParser(TryCompileOldArgParser);
#undef BIND_LANG_PROPS #undef BIND_LANG_PROPS
std::string const TryCompileDefaultConfig = "DEBUG";
} }
Arguments cmCoreTryCompile::ParseArgs( Arguments cmCoreTryCompile::ParseArgs(
@ -706,9 +708,9 @@ bool cmCoreTryCompile::TryCompileCode(Arguments& arguments,
CM_FALLTHROUGH; CM_FALLTHROUGH;
case cmPolicies::NEW: { case cmPolicies::NEW: {
// NEW behavior is to pass config-specific compiler flags. // NEW behavior is to pass config-specific compiler flags.
static std::string const cfgDefault = "DEBUG"; std::string const cfg = !tcConfig.empty()
std::string const cfg = ? cmSystemTools::UpperCase(tcConfig)
!tcConfig.empty() ? cmSystemTools::UpperCase(tcConfig) : cfgDefault; : TryCompileDefaultConfig;
for (std::string const& li : testLangs) { for (std::string const& li : testLangs) {
std::string const langFlagsCfg = std::string const langFlagsCfg =
cmStrCat("CMAKE_", li, "_FLAGS_", cfg); cmStrCat("CMAKE_", li, "_FLAGS_", cfg);
@ -1199,7 +1201,12 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName)
tmpOutputFile += targetName; tmpOutputFile += targetName;
if (this->Makefile->GetGlobalGenerator()->IsMultiConfig()) { if (this->Makefile->GetGlobalGenerator()->IsMultiConfig()) {
tmpOutputFile += "_DEBUG"; std::string const tcConfig =
this->Makefile->GetSafeDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
std::string const cfg = !tcConfig.empty()
? cmSystemTools::UpperCase(tcConfig)
: TryCompileDefaultConfig;
tmpOutputFile = cmStrCat(tmpOutputFile, '_', cfg);
} }
tmpOutputFile += "_loc"; tmpOutputFile += "_loc";

@ -3581,15 +3581,22 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
libItem.IsPath == cmComputeLinkInformation::ItemIsPath::Yes && libItem.IsPath == cmComputeLinkInformation::ItemIsPath::Yes &&
forceLinkPhase))) { forceLinkPhase))) {
std::string libName; std::string libName;
bool canUseLinkPhase = true; bool canUseLinkPhase = !libItem.HasFeature() ||
libItem.GetFeatureName() == "__CMAKE_LINK_FRAMEWORK"_s ||
libItem.GetFeatureName() == "FRAMEWORK"_s ||
libItem.GetFeatureName() == "WEAK_FRAMEWORK"_s ||
libItem.GetFeatureName() == "WEAK_LIBRARY"_s;
if (canUseLinkPhase) {
if (libItem.Target) { if (libItem.Target) {
if (libItem.Target->GetType() == cmStateEnums::UNKNOWN_LIBRARY) { if (libItem.Target->GetType() == cmStateEnums::UNKNOWN_LIBRARY) {
canUseLinkPhase = canUseLinkPhase && forceLinkPhase; canUseLinkPhase = canUseLinkPhase && forceLinkPhase;
} else { } else {
// If a library target uses custom build output directory Xcode // If a library target uses custom build output directory Xcode
// won't pick it up so we have to resort back to linker flags, but // won't pick it up so we have to resort back to linker flags,
// that's OK as long as the custom output dir is absolute path. // but that's OK as long as the custom output dir is absolute
for (auto const& libConfigName : this->CurrentConfigurationTypes) { // path.
for (auto const& libConfigName :
this->CurrentConfigurationTypes) {
canUseLinkPhase = canUseLinkPhase && canUseLinkPhase = canUseLinkPhase &&
libItem.Target->UsesDefaultOutputDir( libItem.Target->UsesDefaultOutputDir(
libConfigName, cmStateEnums::RuntimeBinaryArtifact); libConfigName, cmStateEnums::RuntimeBinaryArtifact);
@ -3598,12 +3605,14 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
libName = libItem.Target->GetName(); libName = libItem.Target->GetName();
} else { } else {
libName = cmSystemTools::GetFilenameName(libItem.Value.Value); libName = cmSystemTools::GetFilenameName(libItem.Value.Value);
// We don't want all the possible files here, just standard libraries // We don't want all the possible files here, just standard
// libraries
const auto libExt = cmSystemTools::GetFilenameExtension(libName); const auto libExt = cmSystemTools::GetFilenameExtension(libName);
if (!IsLinkPhaseLibraryExtension(libExt)) { if (!IsLinkPhaseLibraryExtension(libExt)) {
canUseLinkPhase = false; canUseLinkPhase = false;
} }
} }
}
if (canUseLinkPhase) { if (canUseLinkPhase) {
// Add unique configuration name to target-config map for later // Add unique configuration name to target-config map for later
// checks // checks
@ -3658,6 +3667,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
// separately. // separately.
std::vector<std::string> linkSearchPaths; std::vector<std::string> linkSearchPaths;
std::vector<std::string> frameworkSearchPaths; std::vector<std::string> frameworkSearchPaths;
std::set<std::pair<cmXCodeObject*, std::string>> linkBuildFileSet;
for (auto const& libItem : linkPhaseTargetVector) { for (auto const& libItem : linkPhaseTargetVector) {
// Add target output directory as a library search path // Add target output directory as a library search path
std::string linkDir; std::string linkDir;
@ -3760,10 +3770,32 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
cmSystemTools::Error("Missing files of PBXFrameworksBuildPhase"); cmSystemTools::Error("Missing files of PBXFrameworksBuildPhase");
continue; continue;
} }
if (buildFile && !buildFiles->HasObject(buildFile)) { if (buildFile) {
if (cmHasPrefix(libItem->GetFeatureName(), "WEAK_"_s)) {
auto key = std::make_pair(buildFile->GetAttribute("fileRef"),
libItem->GetFeatureName());
if (linkBuildFileSet.find(key) != linkBuildFileSet.end()) {
continue;
}
linkBuildFileSet.insert(key);
cmXCodeObject* buildObject =
this->CreateObject(cmXCodeObject::PBXBuildFile);
buildObject->AddAttribute("fileRef", key.first);
// Add settings, ATTRIBUTES, Weak flag
cmXCodeObject* settings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
cmXCodeObject* attrs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
attrs->AddObject(this->CreateString("Weak"));
settings->AddAttribute("ATTRIBUTES", attrs);
buildObject->AddAttribute("settings", settings);
buildFile = buildObject;
}
if (!buildFiles->HasObject(buildFile)) {
buildFiles->AddObject(buildFile); buildFiles->AddObject(buildFile);
} }
} }
}
// Loop over configuration types and set per-configuration info. // Loop over configuration types and set per-configuration info.
for (auto const& configName : this->CurrentConfigurationTypes) { for (auto const& configName : this->CurrentConfigurationTypes) {

@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 3.14)
project(TestFindBoostPython CXX) project(TestFindBoostPython CXX)
include(CTest) include(CTest)
find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37 python38 python39 python310) find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37 python38 python39 python310 python311 python312)
set(FAILTEST TRUE) set(FAILTEST TRUE)
foreach (v IN ITEMS 27 34 35 36 37 38 39 310) foreach (v IN ITEMS 27 34 35 36 37 38 39 310 311 312)
if (Boost_PYTHON${v}_FOUND) if (Boost_PYTHON${v}_FOUND)
set(FAILTEST FALSE) set(FAILTEST FALSE)
break() break()

@ -42,6 +42,16 @@ add_executable(test_module
test_module_implementation.f90 test_module_implementation.f90
test_module_interface.f90) test_module_interface.f90)
add_executable(test_multi_module
# Place this first so that we do not get "lucky" and find the module provided
# by compiling `test_multi_module.f90` first.
test_multi_module_main.f90
test_multi_module.f90)
set_property(TARGET test_multi_module PROPERTY
JOB_POOL_COMPILE multi_module_serial)
set_property(GLOBAL APPEND PROPERTY
JOB_POOLS multi_module_serial=1)
add_executable(test_use_in_comment_fixedform add_executable(test_use_in_comment_fixedform
test_use_in_comment_fixedform.f) test_use_in_comment_fixedform.f)
set_property(SOURCE test_use_in_comment_fixedform.f PROPERTY Fortran_FORMAT FIXED) set_property(SOURCE test_use_in_comment_fixedform.f PROPERTY Fortran_FORMAT FIXED)

@ -0,0 +1,8 @@
module first
interface inner
end interface inner
end module first
module second
REAL :: C = 1
end module second

@ -0,0 +1,4 @@
PROGRAM MAINF90
use second
PRINT *,'Constant is',C
END PROGRAM MAINF90

@ -65,8 +65,12 @@ add_custom_target(prebuildDependencies ALL
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build --target staticFrameworkExt sharedFrameworkExt --config Debug COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build --target staticFrameworkExt sharedFrameworkExt --config Debug
) )
add_executable(app1 mainOuter.m) add_executable(app1 mainOuter.m)
add_executable(app2 mainOuter.m)
add_executable(app3 mainOuter.m)
add_library(static1 STATIC funcOuter.c) add_library(static1 STATIC funcOuter.c)
add_library(shared1 SHARED funcOuter.c) add_library(shared1 SHARED funcOuter.c)
add_library(shared3 SHARED funcOuter.c)
add_library(shared4 SHARED funcOuter.c)
add_library(module1 MODULE funcOuter.c) add_library(module1 MODULE funcOuter.c)
add_library(obj1 OBJECT funcOuter.c) add_library(obj1 OBJECT funcOuter.c)
add_library(staticFramework1 STATIC funcOuter.c) add_library(staticFramework1 STATIC funcOuter.c)
@ -74,8 +78,12 @@ add_library(sharedFramework1 SHARED funcOuter.c)
set_target_properties(staticFramework1 PROPERTIES FRAMEWORK TRUE) set_target_properties(staticFramework1 PROPERTIES FRAMEWORK TRUE)
set_target_properties(sharedFramework1 PROPERTIES FRAMEWORK TRUE) set_target_properties(sharedFramework1 PROPERTIES FRAMEWORK TRUE)
add_dependencies(app1 prebuildDependencies) add_dependencies(app1 prebuildDependencies)
add_dependencies(app2 prebuildDependencies)
add_dependencies(app3 prebuildDependencies)
add_dependencies(static1 prebuildDependencies) add_dependencies(static1 prebuildDependencies)
add_dependencies(shared1 prebuildDependencies) add_dependencies(shared1 prebuildDependencies)
add_dependencies(shared3 prebuildDependencies)
add_dependencies(shared4 prebuildDependencies)
add_dependencies(module1 prebuildDependencies) add_dependencies(module1 prebuildDependencies)
add_dependencies(obj1 prebuildDependencies) add_dependencies(obj1 prebuildDependencies)
add_dependencies(staticFramework1 prebuildDependencies) add_dependencies(staticFramework1 prebuildDependencies)
@ -103,6 +111,14 @@ set(libresolv \"${libresolv}\")
set(CoreFoundation \"${CoreFoundation}\") set(CoreFoundation \"${CoreFoundation}\")
") ")
macro(SET_LINK_LIBRARIES)
foreach(mainTarget IN LISTS mainTargets)
foreach(linkTo IN LISTS linkToThings)
target_link_libraries(${mainTarget} PRIVATE ${linkTo})
endforeach()
endforeach()
endmacro()
set(mainTargets set(mainTargets
app1 app1
static1 static1
@ -125,8 +141,44 @@ set(linkToThings
"${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/staticFrameworkExt.framework" "${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/staticFrameworkExt.framework"
) )
foreach(mainTarget IN LISTS mainTargets) set_link_libraries()
foreach(linkTo IN LISTS linkToThings)
target_link_libraries(${mainTarget} PRIVATE ${linkTo}) set(mainTargets
endforeach() app2
endforeach() shared3
)
set(linkToThings
static2
"$<LINK_LIBRARY:WEAK_LIBRARY,shared2>"
obj2
staticFramework2
"$<LINK_LIBRARY:WEAK_FRAMEWORK,sharedFramework2>"
imported2
${libresolv}
${CoreFoundation}
"$<LINK_LIBRARY:WEAK_FRAMEWORK,${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/sharedFrameworkExt.framework>"
"${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/staticFrameworkExt.framework"
)
set_link_libraries()
set(mainTargets
app3
shared4
)
set(linkToThings
static2
"$<LINK_LIBRARY:REEXPORT_LIBRARY,shared2>"
obj2
staticFramework2
"$<LINK_LIBRARY:REEXPORT_FRAMEWORK,sharedFramework2>"
imported2
${libresolv}
${CoreFoundation}
"$<LINK_LIBRARY:REEXPORT_FRAMEWORK,${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/sharedFrameworkExt.framework>"
"${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/build/Debug/staticFrameworkExt.framework"
)
set_link_libraries()

@ -4,13 +4,20 @@ include(${RunCMake_TEST_BINARY_DIR}/foundLibs.cmake)
# obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path # obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path
# ${libz} --> This is for imported2 # ${libz} --> This is for imported2
foreach(mainTarget IN ITEMS app1 shared1 module1 sharedFramework1) foreach(mainTarget IN ITEMS app1 app2 shared1 shared3 module1 sharedFramework1)
checkFlags(OTHER_LDFLAGS ${mainTarget} checkFlags(OTHER_LDFLAGS ${mainTarget}
"obj2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt" "obj2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
"static2;shared2;staticFramework2;sharedFramework2" "static2;shared2;staticFramework2;sharedFramework2"
) )
endforeach() endforeach()
foreach(mainTarget IN ITEMS app3 shared4)
checkFlags(OTHER_LDFLAGS ${mainTarget}
"obj2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt;shared2;sharedFramework2"
"static2;staticFramework2"
)
endforeach()
foreach(mainTarget IN ITEMS static1 staticFramework1) foreach(mainTarget IN ITEMS static1 staticFramework1)
checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget} checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget}
"obj2" "obj2"

@ -4,13 +4,20 @@ include(${RunCMake_TEST_BINARY_DIR}/foundLibs.cmake)
# obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path # obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path
# ${libz} --> This is for imported2 # ${libz} --> This is for imported2
foreach(mainTarget IN ITEMS app1 shared1 module1 sharedFramework1) foreach(mainTarget IN ITEMS app1 app2 shared1 shared3 module1 sharedFramework1)
checkFlags(OTHER_LDFLAGS ${mainTarget} checkFlags(OTHER_LDFLAGS ${mainTarget}
"obj2" "obj2"
"static2;shared2;staticFramework2;sharedFramework2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt" "static2;shared2;staticFramework2;sharedFramework2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
) )
endforeach() endforeach()
foreach(mainTarget IN ITEMS app3 shared4)
checkFlags(OTHER_LDFLAGS ${mainTarget}
"obj2;shared2;sharedFramework2;sharedFrameworkExt"
"static2;staticFramework2;${libz};${libresolv};CoreFoundation;staticFrameworkExt"
)
endforeach()
foreach(mainTarget IN ITEMS static1 staticFramework1) foreach(mainTarget IN ITEMS static1 staticFramework1)
checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget} checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget}
"obj2" "obj2"

@ -4,7 +4,7 @@ include(${RunCMake_TEST_BINARY_DIR}/foundLibs.cmake)
# obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path # obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path
# ${libz} --> This is for imported2 # ${libz} --> This is for imported2
foreach(mainTarget IN ITEMS app1 shared1 module1 sharedFramework1) foreach(mainTarget IN ITEMS app1 app2 app3 shared1 shared3 shared4 module1 sharedFramework1)
checkFlags(OTHER_LDFLAGS ${mainTarget} checkFlags(OTHER_LDFLAGS ${mainTarget}
"static2;shared2;staticFramework2;sharedFramework2;obj2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt" "static2;shared2;staticFramework2;sharedFramework2;obj2;${libz};${libresolv};CoreFoundation;sharedFrameworkExt;staticFrameworkExt"
"" ""

@ -0,0 +1,8 @@
enable_language(C)
set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS})
try_compile(RESULT
${try_compile_bindir_or_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/out.bin"
)

@ -23,6 +23,7 @@ run_cmake(TryRunArgs)
run_cmake(BuildType) run_cmake(BuildType)
run_cmake(BuildTypeAsFlag) run_cmake(BuildTypeAsFlag)
run_cmake(OutputDirAsFlag) run_cmake(OutputDirAsFlag)
run_cmake(CopyFileConfig)
run_cmake(EnvConfig) run_cmake(EnvConfig)

Loading…
Cancel
Save