summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCheckCompilerFlagCommonPatterns.cmake1
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake26
-rw-r--r--Modules/CMakePushCheckState.cmake7
-rw-r--r--Modules/CMakeVerifyManifest.cmake8
-rw-r--r--Modules/CPackRPM.cmake32
-rw-r--r--Modules/DartConfiguration.tcl.in1
-rw-r--r--Modules/ExternalProject.cmake79
-rw-r--r--Modules/FindBLAS.cmake11
-rw-r--r--Modules/FindCUDA.cmake4
-rw-r--r--Modules/FindGSL.cmake2
-rw-r--r--Modules/FindJava.cmake2
-rw-r--r--Modules/FindLAPACK.cmake21
-rw-r--r--Modules/FindMatlab.cmake2
-rw-r--r--Modules/FindOpenSSL.cmake10
-rw-r--r--Modules/FindPNG.cmake4
-rw-r--r--Modules/FindSDL_image.cmake4
-rw-r--r--Modules/FindSDL_mixer.cmake4
-rw-r--r--Modules/FindSDL_net.cmake4
-rw-r--r--Modules/FindSDL_ttf.cmake4
-rw-r--r--Modules/FindSubversion.cmake2
-rw-r--r--Modules/FindThreads.cmake2
-rw-r--r--Modules/Platform/GHS-MULTI-Initialize.cmake2
-rw-r--r--Modules/Platform/Windows-MSVC.cmake2
-rw-r--r--Modules/UseJava.cmake4
24 files changed, 162 insertions, 76 deletions
diff --git a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
index 07d8b1e..a350a84 100644
--- a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
+++ b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
@@ -24,6 +24,7 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR)
FAIL_REGEX "[Uu]nrecogni[sz]ed .*option" # GNU, NAG
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "optimization flag .* not supported" # Clang
+ FAIL_REGEX "unknown argument ignored" # Clang (cl)
FAIL_REGEX "ignoring unknown option" # MSVC, Intel
FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "option.*not supported" # Intel
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index ccafb07..4f2a70c 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -185,11 +185,10 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
# Fall back to old is-GNU test.
if(NOT CMAKE_Fortran_COMPILER_ID)
- exec_program(${CMAKE_Fortran_COMPILER}
- ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\""
- OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
+ execute_process(COMMAND ${CMAKE_Fortran_COMPILER} ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "${CMAKE_ROOT}/Modules/CMakeTestGNU.c"
+ OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RESULT_VARIABLE CMAKE_COMPILER_RETURN)
if(NOT CMAKE_COMPILER_RETURN)
- if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_GNU")
+ if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_GNU")
set(CMAKE_Fortran_COMPILER_ID "GNU")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU succeeded with "
@@ -200,16 +199,31 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
endif()
if(NOT CMAKE_Fortran_PLATFORM_ID)
- if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_MINGW")
+ if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_MINGW")
set(CMAKE_Fortran_PLATFORM_ID "MinGW")
endif()
- if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_CYGWIN")
+ if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_CYGWIN")
set(CMAKE_Fortran_PLATFORM_ID "Cygwin")
endif()
endif()
endif()
endif()
+ # Fall back for GNU MINGW, which is not always detected correctly
+ # (__MINGW32__ is defined for the C language, but perhaps not for Fortran!)
+ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_Fortran_PLATFORM_ID)
+ execute_process(COMMAND ${CMAKE_Fortran_COMPILER} ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "${CMAKE_ROOT}/Modules/CMakeTestGNU.c"
+ OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RESULT_VARIABLE CMAKE_COMPILER_RETURN)
+ if(NOT CMAKE_COMPILER_RETURN)
+ if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_MINGW")
+ set(CMAKE_Fortran_PLATFORM_ID "MinGW")
+ endif()
+ if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_CYGWIN")
+ set(CMAKE_Fortran_PLATFORM_ID "Cygwin")
+ endif()
+ endif()
+ endif()
+
# Set old compiler and platform id variables.
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUG77 1)
diff --git a/Modules/CMakePushCheckState.cmake b/Modules/CMakePushCheckState.cmake
index bf4ec0e..6958da1 100644
--- a/Modules/CMakePushCheckState.cmake
+++ b/Modules/CMakePushCheckState.cmake
@@ -8,8 +8,8 @@
# CMAKE_POP_CHECK_STATE() and CMAKE_RESET_CHECK_STATE() These macros can
# be used to save, restore and reset (i.e., clear contents) the state of
# the variables CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS,
-# CMAKE_REQUIRED_LIBRARIES and CMAKE_REQUIRED_INCLUDES used by the
-# various Check-files coming with CMake, like e.g.
+# CMAKE_REQUIRED_LIBRARIES, CMAKE_REQUIRED_INCLUDES and CMAKE_EXTRA_INCLUDE_FILES
+# used by the various Check-files coming with CMake, like e.g.
# check_function_exists() etc. The variable contents are pushed on a
# stack, pushing multiple times is supported. This is useful e.g. when
# executing such tests in a Find-module, where they have to be set, but
@@ -49,6 +49,7 @@
macro(CMAKE_RESET_CHECK_STATE)
+ set(CMAKE_EXTRA_INCLUDE_FILES)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_DEFINITIONS)
set(CMAKE_REQUIRED_LIBRARIES)
@@ -65,6 +66,7 @@ macro(CMAKE_PUSH_CHECK_STATE)
math(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}+1")
+ set(_CMAKE_EXTRA_INCLUDE_FILES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_EXTRA_INCLUDE_FILES})
set(_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_INCLUDES})
set(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
set(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
@@ -82,6 +84,7 @@ macro(CMAKE_POP_CHECK_STATE)
# don't pop more than we pushed
if("${_CMAKE_PUSH_CHECK_STATE_COUNTER}" GREATER "0")
+ set(CMAKE_EXTRA_INCLUDE_FILES ${_CMAKE_EXTRA_INCLUDE_FILES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
set(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
set(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
diff --git a/Modules/CMakeVerifyManifest.cmake b/Modules/CMakeVerifyManifest.cmake
index bff4e1e..a54b9d2 100644
--- a/Modules/CMakeVerifyManifest.cmake
+++ b/Modules/CMakeVerifyManifest.cmake
@@ -6,18 +6,18 @@
#
# CMakeVerifyManifest.cmake
#
-# This script is used to verify that embeded manifests and side by side
+# This script is used to verify that embedded manifests and side by side
# manifests for a project match. To run this script, cd to a directory
# and run the script with cmake -P. On the command line you can pass in
# versions that are OK even if not found in the .manifest files. For
# example, cmake -Dallow_versions=8.0.50608.0
-# -PCmakeVerifyManifest.cmake could be used to allow an embeded manifest
+# -PCmakeVerifyManifest.cmake could be used to allow an embedded manifest
# of 8.0.50608.0 to be used in a project even if that version was not
# found in the .manifest file.
# This script first recursively globs *.manifest files from
# the current directory. Then globs *.exe and *.dll. Each
-# .exe and .dll is scanned for embeded manifests and the versions
+# .exe and .dll is scanned for embedded manifests and the versions
# of CRT are compared to those found in the .manifest files
# from the first glob.
@@ -54,7 +54,7 @@ function(crt_version file list_var)
endif()
endforeach()
if(NOT DEFINED has_match)
- message("Information: no embeded manifest in: ${file}")
+ message("Information: no embedded manifest in: ${file}")
return()
endif()
list(APPEND version_list ${${list_var}})
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index ae51dc1..768d64f 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -23,7 +23,7 @@
#
# .. note::
#
-# `<COMPONENT>` part of variables is prefered to be in upper case (for e.g. if
+# `<COMPONENT>` part of variables is preferred to be in upper case (for e.g. if
# component is named `foo` then use `CPACK_RPM_FOO_XXXX` variable name format)
# as is with other `CPACK_<COMPONENT>_XXXX` variables.
# For the purposes of back compatibility (CMake/CPack version 3.5 and lower)
@@ -599,9 +599,10 @@
# while determining if symlink should be either created or present in a
# post install script - depending on relocation paths.
#
-# Currenty there are a few limitations though:
+# Symbolic links that point to locations outside packaging path produce a
+# warning and are treated as non relocatable permanent symbolic links.
#
-# * Only symbolic links with relative path can be packaged.
+# Currenty there are a few limitations though:
#
# * For component based packaging component interdependency is not checked
# when processing symbolic links. Symbolic links pointing to content of
@@ -1068,13 +1069,28 @@ function(cpack_rpm_prepare_install_files INSTALL_FILES_LIST WDIR PACKAGE_PREFIXE
get_filename_component(SYMLINK_POINT_ "${SYMLINK_LOCATION_}/${SYMLINK_POINT_}" ABSOLUTE)
endif()
- string(SUBSTRING "${SYMLINK_POINT_}" ${WDR_LEN_} -1 SYMLINK_POINT_WD_)
+ # recalculate path length after conversion to canonical form
+ string(LENGTH "${SYMLINK_POINT_}" SYMLINK_POINT_LENGTH_)
- cpack_rpm_symlink_get_relocation_prefixes("${F}" "${PACKAGE_PREFIXES}" "SYMLINK_RELOCATIONS")
- cpack_rpm_symlink_get_relocation_prefixes("${SYMLINK_POINT_WD_}" "${PACKAGE_PREFIXES}" "POINT_RELOCATIONS")
+ if(SYMLINK_POINT_ MATCHES "${WDIR}/.*")
+ # only symlinks that are pointing inside the packaging structure should be checked for relocation
+ string(SUBSTRING "${SYMLINK_POINT_}" ${WDR_LEN_} -1 SYMLINK_POINT_WD_)
+ cpack_rpm_symlink_get_relocation_prefixes("${F}" "${PACKAGE_PREFIXES}" "SYMLINK_RELOCATIONS")
+ cpack_rpm_symlink_get_relocation_prefixes("${SYMLINK_POINT_WD_}" "${PACKAGE_PREFIXES}" "POINT_RELOCATIONS")
- list(LENGTH SYMLINK_RELOCATIONS SYMLINK_RELOCATIONS_COUNT)
- list(LENGTH POINT_RELOCATIONS POINT_RELOCATIONS_COUNT)
+ list(LENGTH SYMLINK_RELOCATIONS SYMLINK_RELOCATIONS_COUNT)
+ list(LENGTH POINT_RELOCATIONS POINT_RELOCATIONS_COUNT)
+ else()
+ # location pointed to is ouside WDR so it should be treated as a permanent symlink
+ set(SYMLINK_POINT_WD_ "${SYMLINK_POINT_}")
+
+ unset(SYMLINK_RELOCATIONS)
+ unset(POINT_RELOCATIONS)
+ unset(SYMLINK_RELOCATIONS_COUNT)
+ unset(POINT_RELOCATIONS_COUNT)
+
+ message(AUTHOR_WARNING "CPackRPM:Warning: Symbolic link '${F}' points to location that is outside packaging path! Link will possibly not be relocatable.")
+ endif()
if(SYMLINK_RELOCATIONS_COUNT AND POINT_RELOCATIONS_COUNT)
# find matching
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 2da8354..0ff2eed 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -52,6 +52,7 @@ SVNUpdateOptions: @SVN_UPDATE_OPTIONS@
# Git options
GITCommand: @GITCOMMAND@
+GITInitSubmodules: @CTEST_GIT_INIT_SUBMODULES@
GITUpdateOptions: @GIT_UPDATE_OPTIONS@
GITUpdateCustom: @CTEST_GIT_UPDATE_CUSTOM@
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 249658d..1f3dc38 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -77,6 +77,9 @@ Create custom targets to build projects in external trees
Path to a certificate authority file
``TIMEOUT <seconds>``
Time allowed for file download operations
+ ``DOWNLOAD_NO_EXTRACT 1``
+ Just download the file and do not extract it; the full path to the
+ downloaded file is available as ``<DOWNLOADED_FILE>``.
Update/Patch step options are:
@@ -113,7 +116,7 @@ Create custom targets to build projects in external trees
``CMAKE_CACHE_ARGS <arg>...``
Initial cache arguments, of the form ``-Dvar:string=on``.
These arguments are written in a pre-load a script that populates
- CMake cache, see also :manual:`cmake -C <cmake(1)>`. This allows to
+ CMake cache, see also :manual:`cmake -C <cmake(1)>`. This allows one to
overcome command line length limits.
These arguments are :command:`set` using the ``FORCE`` argument,
and therefore cannot be changed by the user.
@@ -122,7 +125,7 @@ Create custom targets to build projects in external trees
``CMAKE_CACHE_DEFAULT_ARGS <arg>...``
Initial default cache arguments, of the form ``-Dvar:string=on``.
These arguments are written in a pre-load a script that populates
- CMake cache, see also :manual:`cmake -C <cmake(1)>`. This allows to
+ CMake cache, see also :manual:`cmake -C <cmake(1)>`. This allows one to
overcome command line length limits.
These arguments can be used as default value that will be set if no
previous value is found in the cache, and that the user can change
@@ -238,7 +241,7 @@ Create custom targets to build projects in external trees
If ``UPDATE_DISCONNECTED`` is set, the update step is not executed
automatically when building the main target. The update step can still
be added as a step target and called manually. This is useful if you
- want to allow to build the project when you are disconnected from the
+ want to allow one to build the project when you are disconnected from the
network (you might still need the network for the download step).
This is disabled by default.
The directory property ``EP_UPDATE_DISCONNECTED`` can be used to change
@@ -496,7 +499,7 @@ define_property(DIRECTORY PROPERTY "EP_UPDATE_DISCONNECTED" INHERITED
"ExternalProject module."
)
-function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules src_name work_dir gitclone_infofile gitclone_stampfile)
+function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules src_name work_dir gitclone_infofile gitclone_stampfile tls_verify)
file(WRITE ${script_filename}
"if(\"${git_tag}\" STREQUAL \"\")
message(FATAL_ERROR \"Tag for git checkout should not be empty.\")
@@ -521,12 +524,21 @@ if(error_code)
message(FATAL_ERROR \"Failed to remove directory: '${source_dir}'\")
endif()
+set(git_options)
+
+# disable cert checking if explicitly told not to do it
+set(tls_verify \"${tls_verify}\")
+if(NOT \"x${tls_verify}\" STREQUAL \"x\" AND NOT tls_verify)
+ list(APPEND git_options
+ -c http.sslVerify=false)
+endif()
+
# try the clone 3 times incase there is an odd git clone issue
set(error_code 1)
set(number_of_tries 0)
while(error_code AND number_of_tries LESS 3)
execute_process(
- COMMAND \"${git_EXECUTABLE}\" clone --origin \"${git_remote_name}\" \"${git_repository}\" \"${src_name}\"
+ COMMAND \"${git_EXECUTABLE}\" \${git_options} clone --origin \"${git_remote_name}\" \"${git_repository}\" \"${src_name}\"
WORKING_DIRECTORY \"${work_dir}\"
RESULT_VARIABLE error_code
)
@@ -541,7 +553,7 @@ if(error_code)
endif()
execute_process(
- COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
+ COMMAND \"${git_EXECUTABLE}\" \${git_options} checkout ${git_tag}
WORKING_DIRECTORY \"${work_dir}/${src_name}\"
RESULT_VARIABLE error_code
)
@@ -550,7 +562,7 @@ if(error_code)
endif()
execute_process(
- COMMAND \"${git_EXECUTABLE}\" submodule init ${git_submodules}
+ COMMAND \"${git_EXECUTABLE}\" \${git_options} submodule init ${git_submodules}
WORKING_DIRECTORY \"${work_dir}/${src_name}\"
RESULT_VARIABLE error_code
)
@@ -559,7 +571,7 @@ if(error_code)
endif()
execute_process(
- COMMAND \"${git_EXECUTABLE}\" submodule update --recursive ${git_submodules}
+ COMMAND \"${git_EXECUTABLE}\" \${git_options} submodule update --recursive ${git_submodules}
WORKING_DIRECTORY \"${work_dir}/${src_name}\"
RESULT_VARIABLE error_code
)
@@ -847,12 +859,15 @@ function(_ep_write_downloadfile_script script_filename remote local timeout no_p
set(hash_check "")
endif()
+ set(tls_verify_code "")
+ set(tls_cainfo_code "")
+
# check for curl globals in the project
if(DEFINED CMAKE_TLS_VERIFY)
- set(tls_verify "set(CMAKE_TLS_VERIFY ${CMAKE_TLS_VERIFY})")
+ set(tls_verify_code "set(CMAKE_TLS_VERIFY ${CMAKE_TLS_VERIFY})")
endif()
if(DEFINED CMAKE_TLS_CAINFO)
- set(tls_cainfo "set(CMAKE_TLS_CAINFO \"${CMAKE_TLS_CAINFO}\")")
+ set(tls_cainfo_code "set(CMAKE_TLS_CAINFO \"${CMAKE_TLS_CAINFO}\")")
endif()
# now check for curl locals so that the local values
@@ -861,12 +876,12 @@ function(_ep_write_downloadfile_script script_filename remote local timeout no_p
# check for tls_verify argument
string(LENGTH "${tls_verify}" tls_verify_len)
if(tls_verify_len GREATER 0)
- set(tls_verify "set(CMAKE_TLS_VERIFY ${tls_verify})")
+ set(tls_verify_code "set(CMAKE_TLS_VERIFY ${tls_verify})")
endif()
# check for tls_cainfo argument
string(LENGTH "${tls_cainfo}" tls_cainfo_len)
if(tls_cainfo_len GREATER 0)
- set(tls_cainfo "set(CMAKE_TLS_CAINFO \"${tls_cainfo}\")")
+ set(tls_cainfo_code "set(CMAKE_TLS_CAINFO \"${tls_cainfo}\")")
endif()
file(WRITE ${script_filename}
@@ -875,8 +890,8 @@ function(_ep_write_downloadfile_script script_filename remote local timeout no_p
dst='${local}'
timeout='${timeout_msg}'\")
-${tls_verify}
-${tls_cainfo}
+${tls_verify_code}
+${tls_cainfo_code}
file(DOWNLOAD
\"${remote}\"
@@ -1107,7 +1122,7 @@ macro(_ep_replace_location_tags target_name)
set(vars ${ARGN})
foreach(var ${vars})
if(${var})
- foreach(dir SOURCE_DIR BINARY_DIR INSTALL_DIR TMP_DIR)
+ foreach(dir SOURCE_DIR BINARY_DIR INSTALL_DIR TMP_DIR DOWNLOADED_FILE)
get_property(val TARGET ${target_name} PROPERTY _EP_${dir})
string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}")
endforeach()
@@ -1774,6 +1789,11 @@ function(_ep_add_download_command name)
set(git_remote_name "origin")
endif()
+ get_property(tls_verify TARGET ${name} PROPERTY _EP_TLS_VERIFY)
+ if("x${tls_verify}" STREQUAL "x" AND DEFINED CMAKE_TLS_VERIFY)
+ set(tls_verify "${CMAKE_TLS_VERIFY}")
+ endif()
+
# For the download step, and the git clone operation, only the repository
# should be recorded in a configured RepositoryInfo file. If the repo
# changes, the clone script should be run again. But if only the tag
@@ -1798,7 +1818,7 @@ function(_ep_add_download_command name)
#
_ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir}
${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${git_remote_name} "${git_submodules}" ${src_name} ${work_dir}
- ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt
+ ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt "${tls_verify}"
)
set(comment "Performing download step (git clone) for '${name}'")
set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
@@ -1875,6 +1895,7 @@ function(_ep_add_download_command name)
set(cmd ${CMAKE_COMMAND} -E remove_directory ${source_dir}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${abs_dir} ${source_dir})
else()
+ get_property(no_extract TARGET "${name}" PROPERTY _EP_DOWNLOAD_NO_EXTRACT SET)
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
if("x${fname}" STREQUAL "x")
@@ -1884,7 +1905,9 @@ function(_ep_add_download_command name)
string(REGEX MATCH "([^/\\?]+(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip))/.*$" match_result "${url}")
set(fname "${CMAKE_MATCH_1}")
endif()
- if(NOT "${fname}" MATCHES "(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
+ if (no_extract)
+ get_filename_component(fname "${url}" NAME)
+ elseif(NOT "${fname}" MATCHES "(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
endif()
string(REPLACE ";" "-" fname "${fname}")
@@ -1898,16 +1921,30 @@ function(_ep_add_download_command name)
set(cmd ${CMAKE_COMMAND} -P "${download_script}"
COMMAND)
set(retries 3)
- set(comment "Performing download step (download, verify and extract) for '${name}'")
+ if (no_extract)
+ set(steps "download and verify")
+ else ()
+ set(steps "download, verify and extract")
+ endif ()
+ set(comment "Performing download step (${steps}) for '${name}'")
else()
set(file "${url}")
- set(comment "Performing download step (verify and extract) for '${name}'")
+ if (no_extract)
+ set(steps "verify")
+ else ()
+ set(steps "verify and extract")
+ endif ()
+ set(comment "Performing download step (${steps}) for '${name}'")
endif()
_ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${hash}" "${retries}" "${download_script}")
list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake
COMMAND)
- _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${name}" "${file}" "${source_dir}")
- list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)
+ if (NOT no_extract)
+ _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${name}" "${file}" "${source_dir}")
+ list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)
+ else ()
+ set_property(TARGET ${name} PROPERTY _EP_DOWNLOADED_FILE ${file})
+ endif ()
endif()
else()
_ep_is_dir_empty("${source_dir}" empty)
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 546ada1..728494c 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -59,12 +59,7 @@ set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY})
set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
# Check the language being used
-get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES )
-if( _LANGUAGES_ MATCHES Fortran )
- set( _CHECK_FORTRAN TRUE )
-elseif( (_LANGUAGES_ MATCHES C) OR (_LANGUAGES_ MATCHES CXX) )
- set( _CHECK_FORTRAN FALSE )
-else()
+if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) )
if(BLAS_FIND_REQUIRED)
message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.")
else()
@@ -132,7 +127,7 @@ if(_libraries_work)
# Test this combination of libraries.
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread})
# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
- if (_CHECK_FORTRAN)
+ if (CMAKE_Fortran_COMPILER_LOADED)
check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
else()
check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
@@ -483,7 +478,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
if (NOT WIN32)
set(LM "-lm")
endif ()
- if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
+ if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED)
if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
find_package(Threads)
else()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index fe8b18e..4f52d25 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -81,7 +81,7 @@
# --compiler-bindir is already present in the CUDA_NVCC_FLAGS or
# CUDA_NVCC_FLAGS_<CONFIG> variables. For Visual Studio targets
# $(VCInstallDir)/bin is a special value that expands out to the path when
-# the command is run from withing VS.
+# the command is run from within VS.
#
# CUDA_NVCC_FLAGS
# CUDA_NVCC_FLAGS_<CONFIG>
@@ -215,7 +215,7 @@
# The arguments passed in after OPTIONS are extra command line options to
# give to nvcc. You can also specify per configuration options by
# specifying the name of the configuration followed by the options. General
-# options must preceed configuration specific options. Not all
+# options must precede configuration specific options. Not all
# configurations need to be specified, only the ones provided will be used.
#
# OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
diff --git a/Modules/FindGSL.cmake b/Modules/FindGSL.cmake
index ef125c0..9318a7d 100644
--- a/Modules/FindGSL.cmake
+++ b/Modules/FindGSL.cmake
@@ -45,7 +45,7 @@
# of GSL installation discovered. These variables may optionally be set to
# help this module find the correct files::
#
-# GSL_CLBAS_LIBRARY - Location of the GSL CBLAS library.
+# GSL_CBLAS_LIBRARY - Location of the GSL CBLAS library.
# GSL_CBLAS_LIBRARY_DEBUG - Location of the debug GSL CBLAS library (if any).
# GSL_CONFIG_EXECUTABLE - Location of the ``gsl-config`` script (if any).
# GSL_LIBRARY - Location of the GSL library.
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index cc67df6..c643d9b 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -26,7 +26,7 @@
# Java_JAVA_EXECUTABLE = the full path to the Java runtime
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler
# Java_JAVAH_EXECUTABLE = the full path to the Java header generator
-# Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
+# Java_JAVADOC_EXECUTABLE = the full path to the Java documentation generator
# Java_IDLJ_EXECUTABLE = the full path to the Java idl compiler
# Java_JAR_EXECUTABLE = the full path to the Java archiver
# Java_JARSIGNER_EXECUTABLE = the full path to the Java jar signer
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 2708de0..a6bf89f 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -48,11 +48,20 @@
set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
-if (NOT _LANGUAGES_ MATCHES Fortran)
-include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
-else ()
+# Check the language being used
+if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) )
+ if(LAPACK_FIND_REQUIRED)
+ message(FATAL_ERROR "FindLAPACK requires Fortran, C, or C++ to be enabled.")
+ else()
+ message(STATUS "Looking for LAPACK... - NOT found (Unsupported languages)")
+ return()
+ endif()
+endif()
+
+if (CMAKE_Fortran_COMPILER_LOADED)
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
+else ()
+include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
endif ()
include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
@@ -125,7 +134,7 @@ if(_libraries_work)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads})
endif()
# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
- if (NOT _LANGUAGES_ MATCHES Fortran)
+ if (NOT CMAKE_Fortran_COMPILER_LOADED)
check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
else ()
check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
@@ -250,7 +259,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
if (NOT WIN32)
set(LM "-lm")
endif ()
- if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
+ if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED)
if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
find_PACKAGE(Threads)
else()
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 7a36719..8aa0c11 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -132,7 +132,7 @@
# useful for the searching all possible Matlab installation.
# :command:`matlab_get_mex_suffix`
# returns the suffix to be used for the mex files
-# (platform/architecture dependant)
+# (platform/architecture dependent)
# :command:`matlab_get_version_from_matlab_run`
# returns the version of Matlab, given the full directory of the Matlab
# program.
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 8b4b988..8dbaf11 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -151,6 +151,7 @@ if(WIN32 AND NOT CYGWIN)
NAMES
libeay32${_OPENSSL_MSVC_RT_MODE}d
libeay32d
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
${_OPENSSL_PATH_SUFFIXES}
@@ -160,6 +161,7 @@ if(WIN32 AND NOT CYGWIN)
NAMES
libeay32${_OPENSSL_MSVC_RT_MODE}
libeay32
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
${_OPENSSL_PATH_SUFFIXES}
@@ -169,6 +171,7 @@ if(WIN32 AND NOT CYGWIN)
NAMES
ssleay32${_OPENSSL_MSVC_RT_MODE}d
ssleay32d
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
${_OPENSSL_PATH_SUFFIXES}
@@ -179,6 +182,7 @@ if(WIN32 AND NOT CYGWIN)
ssleay32${_OPENSSL_MSVC_RT_MODE}
ssleay32
ssl
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
${_OPENSSL_PATH_SUFFIXES}
@@ -205,6 +209,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(LIB_EAY
NAMES
${LIB_EAY_NAMES}
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@@ -214,6 +219,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(SSL_EAY
NAMES
${SSL_EAY_NAMES}
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@@ -231,6 +237,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(LIB_EAY
NAMES
libeay32
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
@@ -241,6 +248,7 @@ if(WIN32 AND NOT CYGWIN)
find_library(SSL_EAY
NAMES
ssleay32
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
@@ -260,6 +268,7 @@ else()
ssl
ssleay32
ssleay32MD
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
@@ -270,6 +279,7 @@ else()
find_library(OPENSSL_CRYPTO_LIBRARY
NAMES
crypto
+ NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index cae41ac..5050d91 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -85,7 +85,7 @@ if(ZLIB_FOUND)
list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d)
endforeach()
unset(_PNG_VERSION_SUFFIXES)
- # For compatiblity with versions prior to this multi-config search, honor
+ # For compatibility with versions prior to this multi-config search, honor
# any PNG_LIBRARY that is already specified and skip the search.
if(NOT PNG_LIBRARY)
find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
@@ -104,7 +104,7 @@ if(ZLIB_FOUND)
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
# png.h includes zlib.h. Sigh.
set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
- set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity
+ set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatibility
set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
if (CYGWIN)
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index 49b5e40..e7517c5 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -16,7 +16,7 @@
#
#
#
-# For backward compatiblity the following variables are also set:
+# For backward compatibility the following variables are also set:
#
# ::
#
@@ -103,7 +103,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL_image
REQUIRED_VARS SDL_IMAGE_LIBRARIES SDL_IMAGE_INCLUDE_DIRS
VERSION_VAR SDL_IMAGE_VERSION_STRING)
-# for backward compatiblity
+# for backward compatibility
set(SDLIMAGE_LIBRARY ${SDL_IMAGE_LIBRARIES})
set(SDLIMAGE_INCLUDE_DIR ${SDL_IMAGE_INCLUDE_DIRS})
set(SDLIMAGE_FOUND ${SDL_IMAGE_FOUND})
diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake
index 9e11796..72ec654 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -16,7 +16,7 @@
#
#
#
-# For backward compatiblity the following variables are also set:
+# For backward compatibility the following variables are also set:
#
# ::
#
@@ -103,7 +103,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL_mixer
REQUIRED_VARS SDL_MIXER_LIBRARIES SDL_MIXER_INCLUDE_DIRS
VERSION_VAR SDL_MIXER_VERSION_STRING)
-# for backward compatiblity
+# for backward compatibility
set(SDLMIXER_LIBRARY ${SDL_MIXER_LIBRARIES})
set(SDLMIXER_INCLUDE_DIR ${SDL_MIXER_INCLUDE_DIRS})
set(SDLMIXER_FOUND ${SDL_MIXER_FOUND})
diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake
index ef23573..11c250c 100644
--- a/Modules/FindSDL_net.cmake
+++ b/Modules/FindSDL_net.cmake
@@ -15,7 +15,7 @@
#
#
#
-# For backward compatiblity the following variables are also set:
+# For backward compatibility the following variables are also set:
#
# ::
#
@@ -102,7 +102,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL_net
REQUIRED_VARS SDL_NET_LIBRARIES SDL_NET_INCLUDE_DIRS
VERSION_VAR SDL_NET_VERSION_STRING)
-# for backward compatiblity
+# for backward compatibility
set(SDLNET_LIBRARY ${SDL_NET_LIBRARIES})
set(SDLNET_INCLUDE_DIR ${SDL_NET_INCLUDE_DIRS})
set(SDLNET_FOUND ${SDL_NET_FOUND})
diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake
index 4b527fa..38f6e1d 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -15,7 +15,7 @@
#
#
#
-# For backward compatiblity the following variables are also set:
+# For backward compatibility the following variables are also set:
#
# ::
#
@@ -102,7 +102,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL_ttf
REQUIRED_VARS SDL_TTF_LIBRARIES SDL_TTF_INCLUDE_DIRS
VERSION_VAR SDL_TTF_VERSION_STRING)
-# for backward compatiblity
+# for backward compatibility
set(SDLTTF_LIBRARY ${SDL_TTF_LIBRARIES})
set(SDLTTF_INCLUDE_DIR ${SDL_TTF_INCLUDE_DIRS})
set(SDLTTF_FOUND ${SDL_TTF_FOUND})
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index 0d13318..804f44c 100644
--- a/Modules/FindSubversion.cmake
+++ b/Modules/FindSubversion.cmake
@@ -11,7 +11,7 @@
# Subversion_SVN_EXECUTABLE - path to svn command line client
# Subversion_VERSION_SVN - version of svn command line client
# Subversion_FOUND - true if the command line client was found
-# SUBVERSION_FOUND - same as Subversion_FOUND, set for compatiblity reasons
+# SUBVERSION_FOUND - same as Subversion_FOUND, set for compatibility reasons
#
#
#
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index c607923..719dace 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -26,7 +26,7 @@
#
# CMAKE_THREAD_PREFER_PTHREAD
#
-# If the use of the -pthread compiler and linker flag is prefered then the
+# If the use of the -pthread compiler and linker flag is preferred then the
# caller can set
#
# ::
diff --git a/Modules/Platform/GHS-MULTI-Initialize.cmake b/Modules/Platform/GHS-MULTI-Initialize.cmake
index 9eb7a8a..6e6b4ff 100644
--- a/Modules/Platform/GHS-MULTI-Initialize.cmake
+++ b/Modules/Platform/GHS-MULTI-Initialize.cmake
@@ -15,7 +15,7 @@
#Setup Greenhills MULTI specific compilation information
if (NOT GHS_INT_DIRECTORY)
- #Assume the C:/ghs/int#### directory that is latest is prefered
+ #Assume the C:/ghs/int#### directory that is latest is preferred
set(GHS_EXPECTED_ROOT "C:/ghs")
if (EXISTS ${GHS_EXPECTED_ROOT})
FILE(GLOB GHS_CANDIDATE_INT_DIRS RELATIVE
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 26bf11c..deaa88e 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -299,7 +299,7 @@ macro(__windows_compiler_msvc lang)
"${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
- # note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow to compile many projects
+ # note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects
# that include MS's own headers. CMake itself is affected project too.
set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}")
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 475ad5e..b59fe34 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -324,7 +324,7 @@
# that allow your Java and C code to interact.
#
# There are two main signatures for create_javah. The first signature
-# returns generated files throught variable specified by GENERATED_FILES option:
+# returns generated files through variable specified by GENERATED_FILES option:
#
# ::
#
@@ -389,7 +389,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
function (__java_copy_file src dest comment)
add_custom_command(
OUTPUT ${dest}
- COMMAND cmake -E copy_if_different
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
ARGS ${src}
${dest}
DEPENDS ${src}