summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckTypeSize.cmake10
-rw-r--r--Modules/ExternalData.cmake9
-rw-r--r--Modules/ExternalData_config.cmake.in1
-rw-r--r--Modules/ExternalProject.cmake6
-rw-r--r--Modules/FortranCInterface.cmake3
5 files changed, 19 insertions, 10 deletions
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 73ad86e..5938d6c 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -82,7 +82,7 @@ include(CheckIncludeFile)
include(CheckIncludeFileCXX)
cmake_policy(PUSH)
-cmake_policy(VERSION 3.0)
+cmake_policy(SET CMP0054 NEW)
get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
@@ -112,9 +112,9 @@ function(__check_type_size_impl type var map builtin language)
# Perform the check.
- if("${language}" STREQUAL "C")
+ if(language STREQUAL "C")
set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
- elseif("${language}" STREQUAL "CXX")
+ elseif(language STREQUAL "CXX")
set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.cpp)
else()
message(FATAL_ERROR "Unknown language:\n ${language}\nSupported languages: C, CXX.\n")
@@ -229,11 +229,11 @@ macro(CHECK_TYPE_SIZE TYPE VARIABLE)
set(_builtin 0)
else()
set(_builtin 1)
- if("${_language}" STREQUAL "C")
+ if(_language STREQUAL "C")
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stddef.h HAVE_STDDEF_H)
- elseif("${_language}" STREQUAL "CXX")
+ elseif(_language STREQUAL "CXX")
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
check_include_file_cxx(stdint.h HAVE_STDINT_H)
check_include_file_cxx(stddef.h HAVE_STDDEF_H)
diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake
index 883ab69..a3f460d 100644
--- a/Modules/ExternalData.cmake
+++ b/Modules/ExternalData.cmake
@@ -117,6 +117,13 @@ calling any of the functions provided by this module.
data fetch rule created for the content link will use the staged
object if it cannot be found using any URL template.
+.. variable:: ExternalData_NO_SYMLINKS
+
+ The real data files named by expanded ``DATA{}`` references may be made
+ available under ``ExternalData_BINARY_ROOT`` using symbolic links on
+ some platforms. The ``ExternalData_NO_SYMLINKS`` variable may be set
+ to disable use of symbolic links and enable use of copies instead.
+
.. variable:: ExternalData_OBJECT_STORES
The ``ExternalData_OBJECT_STORES`` variable may be set to a list of local
@@ -842,7 +849,7 @@ function(_ExternalData_link_or_copy src dst)
file(MAKE_DIRECTORY "${dst_dir}")
_ExternalData_random(random)
set(tmp "${dst}.tmp${random}")
- if(UNIX)
+ if(UNIX AND NOT ExternalData_NO_SYMLINKS)
# Create a symbolic link.
set(tgt "${src}")
if(relative_top)
diff --git a/Modules/ExternalData_config.cmake.in b/Modules/ExternalData_config.cmake.in
index 4434e4b..18be6b3 100644
--- a/Modules/ExternalData_config.cmake.in
+++ b/Modules/ExternalData_config.cmake.in
@@ -2,4 +2,5 @@ set(ExternalData_OBJECT_STORES "@ExternalData_OBJECT_STORES@")
set(ExternalData_URL_TEMPLATES "@ExternalData_URL_TEMPLATES@")
set(ExternalData_TIMEOUT_INACTIVITY "@ExternalData_TIMEOUT_INACTIVITY@")
set(ExternalData_TIMEOUT_ABSOLUTE "@ExternalData_TIMEOUT_ABSOLUTE@")
+set(ExternalData_NO_SYMLINKS "@ExternalData_NO_SYMLINKS@")
@_ExternalData_CONFIG_CODE@
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 7cf9d79..11a24b8 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1282,7 +1282,7 @@ endif()
# Wrap multiple 'COMMAND' lines up into a second-level wrapper
# script so all output can be sent to one log file.
- if(command MATCHES ";COMMAND;")
+ if(command MATCHES "(^|;)COMMAND;")
set(code_execute_process "
${code_cygpath_make}
execute_process(COMMAND \${command} RESULT_VARIABLE result)
@@ -1299,7 +1299,9 @@ endif()
set(sep "")
foreach(arg IN LISTS command)
if("x${arg}" STREQUAL "xCOMMAND")
- set(code "${code}set(command \"${cmd}\")${code_execute_process}")
+ if(NOT "x${cmd}" STREQUAL "x")
+ set(code "${code}set(command \"${cmd}\")${code_execute_process}")
+ endif()
set(cmd "")
set(sep "")
else()
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 27f8a82..70c3fd7 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -144,9 +144,8 @@ if(FortranCInterface_SOURCE_DIR)
return()
endif()
-# Use CMake 2.8.0 behavior for this module regardless of including context.
cmake_policy(PUSH)
-cmake_policy(VERSION 2.8.0)
+cmake_policy(SET CMP0007 NEW)
#-----------------------------------------------------------------------------
# Verify that C and Fortran are available.