summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCUDAInformation.cmake2
-rw-r--r--Modules/CMakePrintSystemInformation.cmake2
-rw-r--r--Modules/Compiler/Clang-CXX.cmake119
-rw-r--r--Modules/Compiler/Clang-OBJCXX.cmake69
-rw-r--r--Modules/Compiler/Clang.cmake120
-rw-r--r--Modules/Compiler/GNU.cmake3
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake1
-rw-r--r--Modules/FindBLAS.cmake34
-rw-r--r--Modules/FindCUDAToolkit.cmake26
-rw-r--r--Modules/FindLAPACK.cmake34
-rw-r--r--Modules/FindMPI.cmake6
-rw-r--r--Modules/FindOpenAL.cmake4
-rw-r--r--Modules/FindPython.cmake25
-rw-r--r--Modules/FindPython/Support.cmake18
-rw-r--r--Modules/FindPython2.cmake17
-rw-r--r--Modules/FindPython3.cmake25
-rw-r--r--Modules/GoogleTestAddTests.cmake1
-rw-r--r--Modules/UseJava.cmake12
18 files changed, 284 insertions, 234 deletions
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake
index f7eb4a7..ab562c6 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/Modules/CMakeCUDAInformation.cmake
@@ -138,7 +138,7 @@ endif()
#Specify how to compile when ptx has been requested
if(NOT CMAKE_CUDA_COMPILE_PTX_COMPILATION)
set(CMAKE_CUDA_COMPILE_PTX_COMPILATION
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -ptx <SOURCE> -o <OBJECT>")
+ "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} ${_CMAKE_CUDA_PTX_FLAG} <SOURCE> -o <OBJECT>")
endif()
#Specify how to compile when separable compilation has been requested
diff --git a/Modules/CMakePrintSystemInformation.cmake b/Modules/CMakePrintSystemInformation.cmake
index 8d5cf5c..d44e933 100644
--- a/Modules/CMakePrintSystemInformation.cmake
+++ b/Modules/CMakePrintSystemInformation.cmake
@@ -11,7 +11,7 @@ This module serves diagnostic purposes. Just include it in a
project to see various internal CMake variables.
#]=======================================================================]
-message("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
+message("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
message("CMAKE_SYSTEM file is ${CMAKE_SYSTEM_INFO_FILE}")
message("CMAKE_C_COMPILER is ${CMAKE_C_COMPILER}")
message("CMAKE_CXX_COMPILER is ${CMAKE_CXX_COMPILER}")
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index cb240f9..789e991 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -1,5 +1,6 @@
include(Compiler/Clang)
__compiler_clang(CXX)
+__compiler_clang_cxx_standards(CXX)
if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
@@ -13,121 +14,3 @@ endif()
if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
set(CMAKE_CXX_CLANG_TIDY_DRIVER_MODE "cl")
endif()
-
-if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
- if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1)
- set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
- set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
- endif()
-
- if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
- set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
- set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1)
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
- endif()
-
- if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
- set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
- set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y")
- set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
- set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
- endif()
-
- set(_clang_version_std17 5.0)
- if(CMAKE_SYSTEM_NAME STREQUAL "Android")
- set(_clang_version_std17 6.0)
- endif()
-
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${_clang_version_std17}")
- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
- set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
- elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++1z")
- set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
- endif()
-
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${_clang_version_std17}")
- set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++2a")
- set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
- endif()
-
- unset(_clang_version_std17)
-
- if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
- # The MSVC standard library requires C++14, and MSVC itself has no
- # notion of operating in a mode not aware of at least that standard.
- set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++14")
- set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++14")
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++14")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++14")
-
- # This clang++ is missing some features because of MSVC compatibility.
- unset(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT)
- unset(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT)
- unset(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT)
- unset(CMAKE_CXX20_STANDARD__HAS_FULL_SUPPORT)
- endif()
-
- __compiler_check_default_language_standard(CXX 2.1 98)
-elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.9
- AND CMAKE_CXX_SIMULATE_VERSION VERSION_GREATER_EQUAL 19.0)
- # This version of clang-cl and the MSVC version it simulates have
- # support for -std: flags.
- set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std:c++14")
- set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std:c++14")
- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)
- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++17")
- set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++17")
- set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std:c++latest")
- set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std:c++latest")
- else()
- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++latest")
- set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++latest")
- endif()
-
- __compiler_check_default_language_standard(CXX 3.9 14)
-else()
- # This version of clang-cl, or the MSVC version it simulates, does not have
- # language standards. Set these options as empty strings so the feature
- # test infrastructure can at least check to see if they are defined.
- set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "")
-
- # There is no meaningful default for this
- set(CMAKE_CXX_STANDARD_DEFAULT "")
-
- # There are no compiler modes so we only need to test features once.
- # Override the default macro for this special case. Pretend that
- # all language standards are available so that at least compilation
- # can be attempted.
- macro(cmake_record_cxx_compile_features)
- list(APPEND CMAKE_CXX_COMPILE_FEATURES
- cxx_std_98
- cxx_std_11
- cxx_std_14
- cxx_std_17
- cxx_std_20
- )
- _record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES)
- endmacro()
-endif()
diff --git a/Modules/Compiler/Clang-OBJCXX.cmake b/Modules/Compiler/Clang-OBJCXX.cmake
index b01ce64..453b5fd 100644
--- a/Modules/Compiler/Clang-OBJCXX.cmake
+++ b/Modules/Compiler/Clang-OBJCXX.cmake
@@ -1,70 +1,3 @@
include(Compiler/Clang)
__compiler_clang(OBJCXX)
-
-if("x${CMAKE_OBJCXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
- if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 2.1)
- set(CMAKE_OBJCXX98_STANDARD_COMPILE_OPTION "-std=c++98")
- set(CMAKE_OBJCXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
- endif()
-
- if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 3.1)
- set(CMAKE_OBJCXX98_STANDARD__HAS_FULL_SUPPORT ON)
- set(CMAKE_OBJCXX11_STANDARD_COMPILE_OPTION "-std=c++11")
- set(CMAKE_OBJCXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
- set(CMAKE_OBJCXX11_STANDARD__HAS_FULL_SUPPORT ON)
- elseif(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 2.1)
- set(CMAKE_OBJCXX11_STANDARD_COMPILE_OPTION "-std=c++0x")
- set(CMAKE_OBJCXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
- endif()
-
- if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 3.5)
- set(CMAKE_OBJCXX14_STANDARD_COMPILE_OPTION "-std=c++14")
- set(CMAKE_OBJCXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
- set(CMAKE_OBJCXX14_STANDARD__HAS_FULL_SUPPORT ON)
- elseif(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 3.4)
- set(CMAKE_OBJCXX14_STANDARD_COMPILE_OPTION "-std=c++1y")
- set(CMAKE_OBJCXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
- set(CMAKE_OBJCXX14_STANDARD__HAS_FULL_SUPPORT ON)
- endif()
-
- set(_clang_version_std17 5.0)
-
- if (NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS "${_clang_version_std17}")
- set(CMAKE_OBJCXX17_STANDARD_COMPILE_OPTION "-std=c++17")
- set(CMAKE_OBJCXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
- elseif (NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 3.5)
- set(CMAKE_OBJCXX17_STANDARD_COMPILE_OPTION "-std=c++1z")
- set(CMAKE_OBJCXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
- endif()
-
- if (NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS "${_clang_version_std17}")
- set(CMAKE_OBJCXX20_STANDARD_COMPILE_OPTION "-std=c++2a")
- set(CMAKE_OBJCXX20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
- endif()
-
- unset(_clang_version_std17)
-
- __compiler_check_default_language_standard(OBJCXX 2.1 98)
-elseif(CMAKE_OBJCXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.9
- AND CMAKE_OBJCXX_SIMULATE_VERSION VERSION_GREATER_EQUAL 19.0)
- # This version of clang-cl and the MSVC version it simulates have
- # support for -std: flags.
- set(CMAKE_OBJCXX98_STANDARD_COMPILE_OPTION "")
- set(CMAKE_OBJCXX98_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_OBJCXX98_STANDARD__HAS_FULL_SUPPORT ON)
- set(CMAKE_OBJCXX11_STANDARD_COMPILE_OPTION "")
- set(CMAKE_OBJCXX11_EXTENSION_COMPILE_OPTION "")
- set(CMAKE_OBJCXX14_STANDARD_COMPILE_OPTION "-std:c++14")
- set(CMAKE_OBJCXX14_EXTENSION_COMPILE_OPTION "-std:c++14")
- if (CMAKE_OBJCXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)
- set(CMAKE_OBJCXX17_STANDARD_COMPILE_OPTION "-std:c++17")
- set(CMAKE_OBJCXX17_EXTENSION_COMPILE_OPTION "-std:c++17")
- set(CMAKE_OBJCXX20_STANDARD_COMPILE_OPTION "-std:c++latest")
- set(CMAKE_OBJCXX20_EXTENSION_COMPILE_OPTION "-std:c++latest")
- else()
- set(CMAKE_OBJCXX17_STANDARD_COMPILE_OPTION "-std:c++latest")
- set(CMAKE_OBJCXX17_EXTENSION_COMPILE_OPTION "-std:c++latest")
- endif()
-
- __compiler_check_default_language_standard(OBJCXX 3.9 14)
-endif()
+__compiler_clang_cxx_standards(OBJCXX)
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index f65916f..cd47aa6 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -105,3 +105,123 @@ else()
set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Xclang -emit-pch -Xclang -include -Xclang <PCH_HEADER>)
endmacro()
endif()
+
+macro(__compiler_clang_cxx_standards lang)
+ if("x${CMAKE_${lang}_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
+ if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 2.1)
+ set(CMAKE_${lang}98_STANDARD_COMPILE_OPTION "-std=c++98")
+ set(CMAKE_${lang}98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
+ endif()
+
+ if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.1)
+ set(CMAKE_${lang}98_STANDARD__HAS_FULL_SUPPORT ON)
+ set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "-std=c++11")
+ set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
+ set(CMAKE_${lang}11_STANDARD__HAS_FULL_SUPPORT ON)
+ elseif(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 2.1)
+ set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "-std=c++0x")
+ set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
+ endif()
+
+ if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.5)
+ set(CMAKE_${lang}14_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_${lang}14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+ set(CMAKE_${lang}14_STANDARD__HAS_FULL_SUPPORT ON)
+ elseif(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
+ set(CMAKE_${lang}14_STANDARD_COMPILE_OPTION "-std=c++1y")
+ set(CMAKE_${lang}14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
+ set(CMAKE_${lang}14_STANDARD__HAS_FULL_SUPPORT ON)
+ endif()
+
+ set(_clang_version_std17 5.0)
+ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ set(_clang_version_std17 6.0)
+ endif()
+
+ if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS "${_clang_version_std17}")
+ set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std=c++17")
+ set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
+ elseif (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.5)
+ set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std=c++1z")
+ set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
+ endif()
+
+ if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS "${_clang_version_std17}")
+ set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std=c++2a")
+ set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
+ endif()
+
+ unset(_clang_version_std17)
+
+ if("x${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "xMSVC")
+ # The MSVC standard library requires C++14, and MSVC itself has no
+ # notion of operating in a mode not aware of at least that standard.
+ set(CMAKE_${lang}98_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_${lang}98_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+ set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+
+ # This clang++ is missing some features because of MSVC compatibility.
+ unset(CMAKE_${lang}11_STANDARD__HAS_FULL_SUPPORT)
+ unset(CMAKE_${lang}14_STANDARD__HAS_FULL_SUPPORT)
+ unset(CMAKE_${lang}17_STANDARD__HAS_FULL_SUPPORT)
+ unset(CMAKE_${lang}20_STANDARD__HAS_FULL_SUPPORT)
+ endif()
+
+ __compiler_check_default_language_standard(${lang} 2.1 98)
+ elseif(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 3.9
+ AND CMAKE_${lang}_SIMULATE_VERSION VERSION_GREATER_EQUAL 19.0)
+ # This version of clang-cl and the MSVC version it simulates have
+ # support for -std: flags.
+ set(CMAKE_${lang}98_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_${lang}98_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_${lang}98_STANDARD__HAS_FULL_SUPPORT ON)
+ set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_${lang}14_STANDARD_COMPILE_OPTION "-std:c++14")
+ set(CMAKE_${lang}14_EXTENSION_COMPILE_OPTION "-std:c++14")
+ if (CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)
+ set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std:c++17")
+ set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std:c++17")
+ set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std:c++latest")
+ set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std:c++latest")
+ else()
+ set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std:c++latest")
+ set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std:c++latest")
+ endif()
+
+ __compiler_check_default_language_standard(${lang} 3.9 14)
+ else()
+ # This version of clang-cl, or the MSVC version it simulates, does not have
+ # language standards. Set these options as empty strings so the feature
+ # test infrastructure can at least check to see if they are defined.
+ set(CMAKE_${lang}98_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_${lang}98_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_${lang}11_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_${lang}14_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_${lang}14_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "")
+
+ # There is no meaningful default for this
+ set(CMAKE_${lang}_STANDARD_DEFAULT "")
+
+ # There are no compiler modes so we only need to test features once.
+ # Override the default macro for this special case. Pretend that
+ # all language standards are available so that at least compilation
+ # can be attempted.
+ macro(cmake_record_${lang}_compile_features)
+ list(APPEND CMAKE_${lang}_COMPILE_FEATURES
+ ${lang}_std_98
+ ${lang}_std_11
+ ${lang}_std_14
+ ${lang}_std_17
+ ${lang}_std_20
+ )
+ _record_compiler_features(${lang} "" CMAKE_${lang}_COMPILE_FEATURES)
+ endmacro()
+ endif()
+endmacro()
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 3357a86..df6d6b8 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -44,7 +44,8 @@ macro(__compiler_gnu lang)
# tests to always succeed. Work around this by disabling dependency tracking
# in try_compile mode.
get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
- if(NOT _IN_TC OR CMAKE_FORCE_DEPFILES)
+ if(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" AND _IN_TC AND NOT CMAKE_FORCE_DEPFILES)
+ else()
# distcc does not transform -o to -MT when invoking the preprocessor
# internally, as it ought to. Work around this bug by setting -MT here
# even though it isn't strictly necessary.
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index 2a2564e..e24738d 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -5,6 +5,7 @@ set(CMAKE_CUDA_VERBOSE_FLAG "-v")
set(CMAKE_CUDA_VERBOSE_COMPILE_FLAG "-Xcompiler=-v")
set(_CMAKE_COMPILE_AS_CUDA_FLAG "-x cu")
+set(_CMAKE_CUDA_PTX_FLAG "-ptx")
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89)
# The -forward-unknown-to-host-compiler flag was only
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 9b6d09c..caed7ef 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -48,6 +48,10 @@ The following variables may be set to influence this module's behavior:
* ``ACML_GPU``
* ``Apple``
* ``NAS``
+ * ``Arm``
+ * ``Arm_mp``
+ * ``Arm_ilp64``
+ * ``Arm_ilp64_mp``
* ``Generic``
``BLA_F95``
@@ -550,6 +554,36 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
endif()
endif()
+# ArmPL blas library? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries)
+if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All")
+
+ # Check for 64bit Integer support
+ if(BLA_VENDOR MATCHES "_ilp64")
+ set(BLAS_armpl_LIB "armpl_ilp64")
+ else()
+ set(BLAS_armpl_LIB "armpl_lp64")
+ endif()
+
+ # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp
+ if(BLA_VENDOR MATCHES "_mp")
+ set(BLAS_armpl_LIB "${BLAS_armpl_LIB}_mp")
+ endif()
+
+ if(NOT BLAS_LIBRARIES)
+ check_blas_libraries(
+ BLAS_LIBRARIES
+ BLAS
+ sgemm
+ ""
+ "${BLAS_armpl_LIB}"
+ ""
+ ""
+ ""
+ )
+ endif()
+
+endif()
+
# FLAME's blis library? (https://github.com/flame/blis)
if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index 4b14ddc..8d20ff9 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -473,9 +473,9 @@ Result variables
#
###############################################################################
-if(CMAKE_CUDA_COMPILER_LOADED AND NOT CUDAToolkit_BIN_DIR)
+# For NVCC we can easily deduce the SDK binary directory from the compiler path.
+if(CMAKE_CUDA_COMPILER_LOADED AND NOT CUDAToolkit_BIN_DIR AND CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
get_filename_component(cuda_dir "${CMAKE_CUDA_COMPILER}" DIRECTORY)
- # use the already detected cuda compiler
set(CUDAToolkit_BIN_DIR "${cuda_dir}" CACHE PATH "")
mark_as_advanced(CUDAToolkit_BIN_DIR)
unset(cuda_dir)
@@ -711,8 +711,15 @@ find_path(CUDAToolkit_INCLUDE_DIR
# And find the CUDA Runtime Library libcudart
find_library(CUDA_CUDART
NAMES cudart
- PATH_SUFFIXES lib64 lib64/stubs lib/x64
+ PATH_SUFFIXES lib64 lib/x64
)
+if (NOT CUDA_CUDART)
+ find_library(CUDA_CUDART
+ NAMES cudart
+ PATH_SUFFIXES lib64/stubs lib/x64/stubs
+ )
+endif()
+
if (NOT CUDA_CUDART AND NOT CUDAToolkit_FIND_QUIETLY)
message(STATUS "Unable to find cudart library.")
endif()
@@ -759,9 +766,20 @@ if(CUDAToolkit_FOUND)
NAMES ${search_names}
HINTS ${CUDAToolkit_LIBRARY_DIR}
ENV CUDA_PATH
- PATH_SUFFIXES nvidia/current lib64 lib64/stubs lib/x64 lib lib/stubs
+ PATH_SUFFIXES nvidia/current lib64 lib/x64 lib
${arg_EXTRA_PATH_SUFFIXES}
)
+ # Don't try any stub directories intil we have exhausted all other
+ # search locations.
+ if(NOT CUDA_${lib_name}_LIBRARY)
+ find_library(CUDA_${lib_name}_LIBRARY
+ NAMES ${search_names}
+ HINTS ${CUDAToolkit_LIBRARY_DIR}
+ ENV CUDA_PATH
+ PATH_SUFFIXES lib64/stubs lib/x64/stubs lib/stubs stubs
+ )
+ endif()
+
mark_as_advanced(CUDA_${lib_name}_LIBRARY)
if (NOT TARGET CUDA::${lib_name} AND CUDA_${lib_name}_LIBRARY)
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index c962976..e5bd58d 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -38,6 +38,10 @@ The following variables may be set to influence this module's behavior:
* ``ACML``
* ``Apple``
* ``NAS``
+ * ``Arm``
+ * ``Arm_mp``
+ * ``Arm_ilp64``
+ * ``Arm_ilp64_mp``
* ``Generic``
``BLA_F95``
@@ -359,6 +363,36 @@ if(BLAS_FOUND)
endif()
endif()
+ # ArmPL? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries)
+ if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All")
+
+ # Check for 64bit Integer support
+ if(BLA_VENDOR MATCHES "_ilp64")
+ set(LAPACK_armpl_LIB "armpl_ilp64")
+ else()
+ set(LAPACK_armpl_LIB "armpl_lp64")
+ endif()
+
+ # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp
+ if(BLA_VENDOR MATCHES "_mp")
+ set(LAPACK_armpl_LIB "${LAPACK_armpl_LIB}_mp")
+ endif()
+
+ if(NOT LAPACK_LIBRARIES)
+ check_lapack_libraries(
+ LAPACK_LIBRARIES
+ LAPACK
+ cheev
+ ""
+ "${LAPACK_armpl_LIB}"
+ ""
+ ""
+ ""
+ "${BLAS_LIBRARIES}"
+ )
+ endif()
+ endif()
+
# FLAME's blis library? (https://github.com/flame/blis)
if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All")
if(NOT LAPACK_LIBRARIES)
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 41e1d08..cdbb927 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -298,9 +298,9 @@ else()
endif()
# PGI compiler names
-set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc)
-set(_MPI_PGI_CXX_COMPILER_NAMES mpipgCC mppgCC)
-set(_MPI_PGI_Fortran_COMPILER_NAMES mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77)
+set(_MPI_PGI_C_COMPILER_NAMES mpipgicc mpipgcc mppgcc)
+set(_MPI_PGI_CXX_COMPILER_NAMES mpipgic++ mpipgCC mppgCC)
+set(_MPI_PGI_Fortran_COMPILER_NAMES mpipgifort mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77)
# XLC MPI Compiler names
set(_MPI_XL_C_COMPILER_NAMES mpxlc mpxlc_r mpixlc mpixlc_r)
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake
index c9c0903..b5b92c5 100644
--- a/Modules/FindOpenAL.cmake
+++ b/Modules/FindOpenAL.cmake
@@ -7,8 +7,8 @@ FindOpenAL
Finds Open Audio Library (OpenAL).
-Projects using this module should use ``#include <al.h>`` to include the OpenAL
-header file, **not** ``#include <AL.al.h>``. The reason for this is that the
+Projects using this module should use ``#include "al.h"`` to include the OpenAL
+header file, **not** ``#include <AL/al.h>``. The reason for this is that the
latter is not entirely portable. Windows/Creative Labs does not by default put
their headers in ``AL/`` and macOS uses the convention ``<OpenAL/al.h>``.
diff --git a/Modules/FindPython.cmake b/Modules/FindPython.cmake
index 018956b..95426ba 100644
--- a/Modules/FindPython.cmake
+++ b/Modules/FindPython.cmake
@@ -77,29 +77,35 @@ This module will set the following variables in your project
Standard platform independent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``
+ or else ``sysconfig.get_path('stdlib')``.
``Python_STDARCH``
Standard platform dependent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``
+ or else ``sysconfig.get_path('platstdlib')``.
``Python_SITELIB``
Third-party platform independent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``
+ or else ``sysconfig.get_path('purelib')``.
``Python_SITEARCH``
Third-party platform dependent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``
+ or else ``sysconfig.get_path('platlib')``.
``Python_SOABI``
Extension suffix for modules.
Information returned by
- ``distutils.sysconfig.get_config_flag('SOABI')`` or computed from
- ``distutils.sysconfig.get_config_flag('EXT_SUFFIX')`` or
- ``python-config --extension-suffix``.
+ ``distutils.sysconfig.get_config_var('SOABI')`` or computed from
+ ``distutils.sysconfig.get_config_var('EXT_SUFFIX')`` or
+ ``python-config --extension-suffix``. If package ``distutils.sysconfig`` is
+ not available, ``sysconfig.get_config_var('SOABI')`` or
+ ``sysconfig.get_config_var('EXT_SUFFIX')`` are used.
``Python_Compiler_FOUND``
System has the Python compiler.
``Python_COMPILER``
@@ -237,8 +243,9 @@ Hints
* ``ONLY``: Only the virtual environment is used to look-up for the
interpreter.
* ``STANDARD``: The virtual environment is not used to look-up for the
- interpreter. In this case, variable ``Python_FIND_REGISTRY`` (Windows)
- or ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or
+ interpreter but environment variable ``PATH`` is always considered.
+ In this case, variable ``Python_FIND_REGISTRY`` (Windows) or
+ ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or
``NEVER`` to select preferably the interpreter from the virtual
environment.
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 5467b77..a990f0d 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -450,7 +450,7 @@ function (_PYTHON_GET_VERSION)
set (${_PGV_PREFIX}VERSION_PATCH ${version_patch} PARENT_SCOPE)
# compute ABI flags
- if (version_major VERSION_GREATER 2)
+ if (version_major VERSION_GREATER "2")
file (STRINGS "${_${_PYTHON_PREFIX}_INCLUDE_DIR}/pyconfig.h" config REGEX "(Py_DEBUG|WITH_PYMALLOC|Py_UNICODE_SIZE|MS_WIN32)")
set (abi)
if (config MATCHES "#[ ]*define[ ]+MS_WIN32")
@@ -823,7 +823,7 @@ endif()
# Set ABIs to search
## default: search any ABI
-if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_LESS 3)
+if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_LESS "3")
# ABI not supported
unset (_${_PYTHON_PREFIX}_FIND_ABI)
set (_${_PYTHON_PREFIX}_ABIFLAGS "")
@@ -1409,7 +1409,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
unset (${_PYTHON_PREFIX}_SITEARCH)
endif()
- if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL 3)
+ if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL "3")
_python_get_config_var (${_PYTHON_PREFIX}_SOABI SOABI)
endif()
@@ -1601,7 +1601,7 @@ if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
if (_${_PYTHON_PREFIX}_COMPILER AND _${_PYTHON_PREFIX}_COMPILER_USABLE)
if (${_PYTHON_PREFIX}_Interpreter_FOUND)
# Compiler must be compatible with interpreter
- if (${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR} VERSION_EQUAL ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR})
+ if ("${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}" VERSION_EQUAL "${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}")
set (${_PYTHON_PREFIX}_Compiler_FOUND TRUE)
endif()
elseif (${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
@@ -2242,7 +2242,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
_python_get_version (INCLUDE PREFIX _${_PYTHON_PREFIX}_INC_)
# update versioning
- if (_${_PYTHON_PREFIX}_INC_VERSION VERSION_EQUAL ${_${_PYTHON_PREFIX}_VERSION})
+ if (_${_PYTHON_PREFIX}_INC_VERSION VERSION_EQUAL _${_PYTHON_PREFIX}_VERSION)
set (_${_PYTHON_PREFIX}_VERSION_PATCH ${_${_PYTHON_PREFIX}_INC_VERSION_PATCH})
endif()
endif()
@@ -2284,12 +2284,12 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
if (_${_PYTHON_PREFIX}_LIBRARY_RELEASE AND _${_PYTHON_PREFIX}_INCLUDE_DIR)
if (${_PYTHON_PREFIX}_Interpreter_FOUND OR ${_PYTHON_PREFIX}_Compiler_FOUND)
# development environment must be compatible with interpreter/compiler
- if (${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR} VERSION_EQUAL ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}
- AND ${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR} VERSION_EQUAL ${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR})
+ if ("${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}" VERSION_EQUAL "${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}"
+ AND "${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR}" VERSION_EQUAL "${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}")
set (${_PYTHON_PREFIX}_Development_FOUND TRUE)
endif()
elseif (${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR
- AND ${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR} VERSION_EQUAL ${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR})
+ AND "${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR}" VERSION_EQUAL "${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}")
set (${_PYTHON_PREFIX}_Development_FOUND TRUE)
endif()
if (DEFINED _${_PYTHON_PREFIX}_FIND_ABI AND
@@ -2299,7 +2299,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
endif()
endif()
- if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL 3
+ if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL "3"
AND NOT DEFINED ${_PYTHON_PREFIX}_SOABI)
_python_get_config_var (${_PYTHON_PREFIX}_SOABI SOABI)
endif()
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake
index 15e1ce1..3d9ceb4 100644
--- a/Modules/FindPython2.cmake
+++ b/Modules/FindPython2.cmake
@@ -78,22 +78,26 @@ This module will set the following variables in your project
Standard platform independent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``
+ or else ``sysconfig.get_path('stdlib')``.
``Python2_STDARCH``
Standard platform dependent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``
+ or else ``sysconfig.get_path('platstdlib')``.
``Python2_SITELIB``
Third-party platform independent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``
+ or else ``sysconfig.get_path('purelib')``.
``Python2_SITEARCH``
Third-party platform dependent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``
+ or else ``sysconfig.get_path('platlib')``.
``Python2_Compiler_FOUND``
System has the Python 2 compiler.
``Python2_COMPILER``
@@ -186,8 +190,9 @@ Hints
* ``ONLY``: Only the virtual environment is used to look-up for the
interpreter.
* ``STANDARD``: The virtual environment is not used to look-up for the
- interpreter. In this case, variable ``Python2_FIND_REGISTRY`` (Windows)
- or ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or
+ interpreter but environment variable ``PATH`` is always considered.
+ In this case, variable ``Python2_FIND_REGISTRY`` (Windows) or
+ ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or
``NEVER`` to select preferably the interpreter from the virtual
environment.
diff --git a/Modules/FindPython3.cmake b/Modules/FindPython3.cmake
index 8135a1d..122316b 100644
--- a/Modules/FindPython3.cmake
+++ b/Modules/FindPython3.cmake
@@ -78,29 +78,35 @@ This module will set the following variables in your project
Standard platform independent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``
+ or else ``sysconfig.get_path('stdlib')``.
``Python3_STDARCH``
Standard platform dependent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``
+ or else ``sysconfig.get_path('platstdlib')``.
``Python3_SITELIB``
Third-party platform independent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``
+ or else ``sysconfig.get_path('purelib')``.
``Python3_SITEARCH``
Third-party platform dependent installation directory.
Information returned by
- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``.
+ ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``
+ or else ``sysconfig.get_path('platlib')``.
``Python3_SOABI``
Extension suffix for modules.
Information returned by
- ``distutils.sysconfig.get_config_flag('SOABI')`` or computed from
- ``distutils.sysconfig.get_config_flag('EXT_SUFFIX')`` or
- ``python3-config --extension-suffix``.
+ ``distutils.sysconfig.get_config_var('SOABI')`` or computed from
+ ``distutils.sysconfig.get_config_var('EXT_SUFFIX')`` or
+ ``python3-config --extension-suffix``. If package ``distutils.sysconfig`` is
+ not available, ``sysconfig.get_config_var('SOABI')`` or
+ ``sysconfig.get_config_var('EXT_SUFFIX')`` are used.
``Python3_Compiler_FOUND``
System has the Python 3 compiler.
``Python3_COMPILER``
@@ -234,8 +240,9 @@ Hints
* ``ONLY``: Only the virtual environment is used to look-up for the
interpreter.
* ``STANDARD``: The virtual environment is not used to look-up for the
- interpreter. In this case, variable ``Python3_FIND_REGISTRY`` (Windows)
- or ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or
+ interpreter but environment variable ``PATH`` is always considered.
+ In this case, variable ``Python3_FIND_REGISTRY`` (Windows) or
+ ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or
``NEVER`` to select preferably the interpreter from the virtual
environment.
diff --git a/Modules/GoogleTestAddTests.cmake b/Modules/GoogleTestAddTests.cmake
index 65af4c2..499332f 100644
--- a/Modules/GoogleTestAddTests.cmake
+++ b/Modules/GoogleTestAddTests.cmake
@@ -134,6 +134,7 @@ function(gtest_discover_tests_impl)
"${prefix}${pretty_suite}.${pretty_test}${suffix}"
PROPERTIES
WORKING_DIRECTORY "${_TEST_WORKING_DIR}"
+ SKIP_REGULAR_EXPRESSION "\\\\[ SKIPPED \\\\]"
${properties}
)
list(APPEND tests_buffer "${prefix}${pretty_suite}.${pretty_test}${suffix}")
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 9177d16..db3fb95 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -377,7 +377,9 @@ function (__java_copy_file src dest comment)
ARGS ${src}
${dest}
DEPENDS ${src}
- COMMENT ${comment})
+ COMMENT ${comment}
+ VERBATIM
+ )
endfunction ()
function(__java_lcat VAR)
@@ -615,7 +617,7 @@ function(add_jar _TARGET_NAME)
OUTPUT ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
COMMAND ${CMAKE_COMMAND}
-DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH}
- -DCMAKE_JAR_CLASSES_PREFIX="${CMAKE_JAR_CLASSES_PREFIX}"
+ -DCMAKE_JAR_CLASSES_PREFIX=${CMAKE_JAR_CLASSES_PREFIX}
-P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/UseJava/ClearClassFiles.cmake
COMMAND ${Java_JAVAC_EXECUTABLE}
${CMAKE_JAVA_COMPILE_FLAGS}
@@ -627,15 +629,17 @@ function(add_jar _TARGET_NAME)
DEPENDS ${_JAVA_COMPILE_FILES} ${_JAVA_COMPILE_FILELISTS} ${_JAVA_COMPILE_DEPENDS} ${_JAVA_SOURCES_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Building Java objects for ${_TARGET_NAME}.jar"
+ VERBATIM
)
add_custom_command(
OUTPUT ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist
COMMAND ${CMAKE_COMMAND}
-DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH}
- -DCMAKE_JAR_CLASSES_PREFIX="${CMAKE_JAR_CLASSES_PREFIX}"
+ -DCMAKE_JAR_CLASSES_PREFIX=${CMAKE_JAR_CLASSES_PREFIX}
-P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/UseJavaClassFilelist.cmake
DEPENDS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ VERBATIM
)
else ()
# create an empty java_class_filelist
@@ -666,6 +670,7 @@ function(add_jar _TARGET_NAME)
DEPENDS ${_JAVA_RESOURCE_FILES} ${_JAVA_DEPENDS} ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist
WORKING_DIRECTORY ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
COMMENT "Creating Java archive ${_JAVA_TARGET_OUTPUT_NAME}"
+ VERBATIM
)
else ()
add_custom_command(
@@ -681,6 +686,7 @@ function(add_jar _TARGET_NAME)
WORKING_DIRECTORY ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
DEPENDS ${_JAVA_RESOURCE_FILES} ${_JAVA_DEPENDS} ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist
COMMENT "Creating Java archive ${_JAVA_TARGET_OUTPUT_NAME}"
+ VERBATIM
)
endif ()