summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake4
-rw-r--r--Modules/CheckCompilerFlag.cmake2
-rw-r--r--Modules/CheckFortranSourceCompiles.cmake4
-rw-r--r--Modules/CheckFortranSourceRuns.cmake4
-rw-r--r--Modules/CheckLinkerFlag.cmake15
-rw-r--r--Modules/CheckSourceCompiles.cmake9
-rw-r--r--Modules/CheckSourceRuns.cmake11
-rw-r--r--Modules/Compiler/IAR.cmake1
-rw-r--r--Modules/FindBoost.cmake13
-rw-r--r--Modules/FindPython/Support.cmake2
10 files changed, 42 insertions, 23 deletions
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 50d7605..1a7f9cf 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -161,8 +161,8 @@ macro.
.. note:: ``COMPATIBILITY_MODE`` ``AnyNewerVersion`` handles the version range
if any is specified (see :command:`find_package` command for the details).
- All other modes are incompatible with version range and will display an
- author warning if a one is specified.
+ All other modes are incompatible with version ranges and will display an
+ author warning if one is specified.
If ``ARCH_INDEPENDENT`` is given, the installed package version will be
considered compatible even if it was built for a different architecture than
diff --git a/Modules/CheckCompilerFlag.cmake b/Modules/CheckCompilerFlag.cmake
index 3ce1b9b..d7789df 100644
--- a/Modules/CheckCompilerFlag.cmake
+++ b/Modules/CheckCompilerFlag.cmake
@@ -19,7 +19,7 @@ Check that the ``<flag>`` is accepted by the compiler without a diagnostic.
Stores the result in an internal cache entry named ``<var>``.
This command temporarily sets the ``CMAKE_REQUIRED_DEFINITIONS`` variable
-and calls the ``check_source_compiles(<LANG>`` function from the
+and calls the ``check_source_compiles(<LANG>)`` function from the
:module:`CheckSourceCompiles` module. See documentation of that
module for a listing of variables that can otherwise modify the build.
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index 2bcc343..169b829 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -90,5 +90,7 @@ include_guard(GLOBAL)
include(CheckSourceCompiles)
macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
- check_source_compiles(Fortran "${SOURCE}" ${VAR} ${ARGN})
+ # Pass the SRC_EXT we used by default historically.
+ # A user-provided SRC_EXT argument in ARGN will override ours.
+ check_source_compiles(Fortran "${SOURCE}" ${VAR} SRC_EXT "F" ${ARGN})
endmacro()
diff --git a/Modules/CheckFortranSourceRuns.cmake b/Modules/CheckFortranSourceRuns.cmake
index 29f4a98..5276709 100644
--- a/Modules/CheckFortranSourceRuns.cmake
+++ b/Modules/CheckFortranSourceRuns.cmake
@@ -86,5 +86,7 @@ include_guard(GLOBAL)
include(CheckSourceRuns)
macro(CHECK_Fortran_SOURCE_RUNS SOURCE VAR)
- check_source_runs(Fortran "${SOURCE}" ${VAR} ${ARGN})
+ # Pass the SRC_EXT we used by default historically.
+ # A user-provided SRC_EXT argument in ARGN will override ours.
+ check_source_runs(Fortran "${SOURCE}" ${VAR} SRC_EXT "F90" ${ARGN})
endmacro()
diff --git a/Modules/CheckLinkerFlag.cmake b/Modules/CheckLinkerFlag.cmake
index f56d365..3c7a828 100644
--- a/Modules/CheckLinkerFlag.cmake
+++ b/Modules/CheckLinkerFlag.cmake
@@ -19,15 +19,12 @@ Check that the link ``<flag>`` is accepted by the ``<lang>`` compiler without
a diagnostic. Stores the result in an internal cache entry named ``<var>``.
This command temporarily sets the ``CMAKE_REQUIRED_LINK_OPTIONS`` variable
-and calls the ``check_<lang>_source_compiles`` macro from the
-``Check<lang>SourceCompiles`` module (:module:`CheckCSourceCompiles`,
-:module:`CheckCSourceCompiles`, :module:`CheckCXXSourceCompiles`,
-:module:`CheckOBJCSourceCompiles`, :module:`CheckOBJCXXSourceCompiles` or
-:module:`CheckFortranSourceCompiles`). See documentation of these
-modules for a listing of variables that can otherwise modify the build.
-
-The underlying implementation rely on :prop_tgt:`LINK_OPTIONS` property to
-check the specified flag. The ``LINKER:`` prefix, as described in
+and calls the :command:`check_source_compiles` command from the
+:module:`CheckSourceCompiles` module. See that module's documentation
+for a listing of variables that can otherwise modify the build.
+
+The underlying implementation relies on the :prop_tgt:`LINK_OPTIONS` property
+to check the specified flag. The ``LINKER:`` prefix, as described in the
:command:`target_link_options` command, can be used as well.
A positive result from this check indicates only that the compiler did not
diff --git a/Modules/CheckSourceCompiles.cmake b/Modules/CheckSourceCompiles.cmake
index 08fc153..4ed9a5c 100644
--- a/Modules/CheckSourceCompiles.cmake
+++ b/Modules/CheckSourceCompiles.cmake
@@ -94,7 +94,7 @@ function(CHECK_SOURCE_COMPILES _lang _source _var)
set(_lang_ext "cu")
elseif(_lang STREQUAL Fortran)
set(_lang_textual "Fortran")
- set(_lang_ext "F")
+ set(_lang_ext "F90")
elseif(_lang STREQUAL ISPC)
set(_lang_textual "ISPC")
set(_lang_ext "ispc")
@@ -121,8 +121,11 @@ function(CHECK_SOURCE_COMPILES _lang _source _var)
foreach(arg ${ARGN})
if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
set(_key "${arg}")
- elseif(_key)
- list(APPEND _${_key} "${arg}")
+ elseif(_key STREQUAL "FAIL_REGEX")
+ list(APPEND _FAIL_REGEX "${arg}")
+ elseif(_key STREQUAL "SRC_EXT")
+ set(_SRC_EXT "${arg}")
+ set(_key "")
else()
message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
endif()
diff --git a/Modules/CheckSourceRuns.cmake b/Modules/CheckSourceRuns.cmake
index 20f3e1e..033793d 100644
--- a/Modules/CheckSourceRuns.cmake
+++ b/Modules/CheckSourceRuns.cmake
@@ -92,7 +92,7 @@ function(CHECK_SOURCE_RUNS _lang _source _var)
set(_lang_ext "cu")
elseif(_lang STREQUAL Fortran)
set(_lang_textual "Fortran")
- set(_lang_ext "F")
+ set(_lang_ext "F90")
elseif(_lang STREQUAL OBJC)
set(_lang_textual "Objective-C")
set(_lang_ext "m")
@@ -114,10 +114,13 @@ function(CHECK_SOURCE_RUNS _lang _source _var)
set(_SRC_EXT)
set(_key)
foreach(arg ${ARGN})
- if("${arg}" MATCHES "^(SRC_EXT)$")
+ if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
set(_key "${arg}")
- elseif(_key)
- list(APPEND _${_key} "${arg}")
+ elseif(_key STREQUAL "FAIL_REGEX")
+ list(APPEND _FAIL_REGEX "${arg}")
+ elseif(_key STREQUAL "SRC_EXT")
+ set(_SRC_EXT "${arg}")
+ set(_key "")
else()
message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
endif()
diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake
index 296e2fd..f3938a9 100644
--- a/Modules/Compiler/IAR.cmake
+++ b/Modules/Compiler/IAR.cmake
@@ -42,6 +42,7 @@ include_guard()
macro(__compiler_iar_ilink lang)
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
+ set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
if (${lang} STREQUAL "C" OR ${lang} STREQUAL "CXX")
set(CMAKE_${lang}_COMPILE_OBJECT "<CMAKE_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> --preprocess=cnl <PREPROCESSED_SOURCE>")
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 6154dd6..77868f4 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -442,10 +442,21 @@ if (NOT Boost_NO_BOOST_CMAKE)
endif()
endif()
+ set(_boost_FIND_PACKAGE_ARGS "")
+ if(Boost_NO_SYSTEM_PATHS)
+ list(APPEND _boost_FIND_PACKAGE_ARGS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+ endif()
+
# Do the same find_package call but look specifically for the CMake version.
# Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
# need to delegate them to this find_package call.
- find_package(Boost QUIET NO_MODULE)
+ cmake_policy(PUSH)
+ if(BOOST_ROOT AND NOT Boost_ROOT)
+ cmake_policy(SET CMP0074 NEW)
+ set(Boost_ROOT "${BOOST_ROOT}")
+ endif()
+ find_package(Boost QUIET NO_MODULE ${_boost_FIND_PACKAGE_ARGS})
+ cmake_policy(POP)
if (DEFINED Boost_DIR)
mark_as_advanced(Boost_DIR)
endif ()
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 7de2d29..2b911ae 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -22,7 +22,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "3")
- set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "2")
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
else()