summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCSharpCompiler.cmake1
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake12
-rw-r--r--Modules/CMakeParseImplicitIncludeInfo.cmake4
-rw-r--r--Modules/CheckCXXSymbolExists.cmake28
-rw-r--r--Modules/CheckSymbolExists.cmake11
-rw-r--r--Modules/Compiler/IAR-C.cmake2
-rw-r--r--Modules/FindBacktrace.cmake2
-rw-r--r--Modules/FindQt4.cmake2
-rw-r--r--Modules/Internal/CPack/CPack.DS_Store.in (renamed from Modules/CPack.DS_Store.in)bin12292 -> 12292 bytes
-rw-r--r--Modules/Internal/CPack/CPack.Description.plist.in (renamed from Modules/CPack.Description.plist.in)0
-rw-r--r--Modules/Internal/CPack/CPack.Info.plist.in (renamed from Modules/CPack.Info.plist.in)0
-rw-r--r--Modules/Internal/CPack/CPack.NuGet.nuspec.in (renamed from Modules/CPack.NuGet.nuspec.in)0
-rw-r--r--[-rwxr-xr-x]Modules/Internal/CPack/CPack.OSXScriptLauncher.in (renamed from Modules/CPack.OSXScriptLauncher.in)bin29592 -> 29592 bytes
-rw-r--r--Modules/Internal/CPack/CPack.OSXScriptLauncher.rsrc.in (renamed from Modules/CPack.OSXScriptLauncher.rsrc.in)bin362 -> 362 bytes
-rw-r--r--Modules/Internal/CPack/CPack.OSXX11.Info.plist.in (renamed from Modules/CPack.OSXX11.Info.plist.in)0
-rw-r--r--Modules/Internal/CPack/CPack.OSXX11.main.scpt.in (renamed from Modules/CPack.OSXX11.main.scpt.in)bin1870 -> 1870 bytes
-rwxr-xr-xModules/Internal/CPack/CPack.RuntimeScript.in (renamed from Modules/CPack.RuntimeScript.in)0
-rwxr-xr-xModules/Internal/CPack/CPack.STGZ_Header.sh.in (renamed from Modules/CPack.STGZ_Header.sh.in)5
-rw-r--r--Modules/Internal/CPack/CPack.VolumeIcon.icns.in (renamed from Modules/CPack.VolumeIcon.icns.in)bin45739 -> 45739 bytes
-rw-r--r--Modules/Internal/CPack/CPack.background.png.in (renamed from Modules/CPack.background.png.in)bin44108 -> 44108 bytes
-rw-r--r--Modules/Internal/CPack/CPack.distribution.dist.in (renamed from Modules/CPack.distribution.dist.in)0
-rw-r--r--Modules/Internal/CPack/CPackNuGet.cmake2
-rw-r--r--Modules/Internal/CPack/NSIS.InstallOptions.ini.in (renamed from Modules/NSIS.InstallOptions.ini.in)0
-rw-r--r--Modules/Internal/CPack/NSIS.template.in (renamed from Modules/NSIS.template.in)0
-rw-r--r--Modules/Internal/CPack/WIX.template.in (renamed from Modules/WIX.template.in)0
25 files changed, 47 insertions, 22 deletions
diff --git a/Modules/CMakeDetermineCSharpCompiler.cmake b/Modules/CMakeDetermineCSharpCompiler.cmake
index dab9414..da860a8 100644
--- a/Modules/CMakeDetermineCSharpCompiler.cmake
+++ b/Modules/CMakeDetermineCSharpCompiler.cmake
@@ -18,7 +18,6 @@ if(NOT CMAKE_CSharp_COMPILER_ID_RUN)
set(CMAKE_CSharp_COMPILER_ID_RUN 1)
# Try to identify the compiler.
- set(CMAKE_CSharp_COMPILER_ID_STRINGS_PARAMETERS ENCODING UTF-16LE)
set(CMAKE_CSharp_COMPILER_ID)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CSharp CSFLAGS CMakeCSharpCompilerId.cs)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 6083358..1914f52 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -640,10 +640,14 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(ARCHITECTURE_ID)
set(SIMULATE_ID)
set(SIMULATE_VERSION)
- file(STRINGS ${file}
- CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 38
- ${CMAKE_${lang}_COMPILER_ID_STRINGS_PARAMETERS}
- REGEX ".?I.?N.?F.?O.?:.?[A-Za-z0-9_]+\\[[^]]*\\]")
+ foreach(encoding "" "ENCODING;UTF-16LE" "ENCODING;UTF-16BE")
+ file(STRINGS "${file}" CMAKE_${lang}_COMPILER_ID_STRINGS
+ LIMIT_COUNT 38 ${encoding}
+ REGEX ".?I.?N.?F.?O.?:.?[A-Za-z0-9_]+\\[[^]]*\\]")
+ if(NOT CMAKE_${lang}_COMPILER_ID_STRINGS STREQUAL "")
+ break()
+ endif()
+ endforeach()
set(COMPILER_ID_TWICE)
# With the IAR Compiler, some strings are found twice, first time as incomplete
# list like "?<Constant "INFO:compiler[IAR]">". Remove the incomplete copies.
diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake
index 176b3ff..91d03cd 100644
--- a/Modules/CMakeParseImplicitIncludeInfo.cmake
+++ b/Modules/CMakeParseImplicitIncludeInfo.cmake
@@ -15,9 +15,9 @@ function(cmake_parse_implicit_include_line line lang id_var log_var state_var)
if("${CMAKE_${lang}_COMPILER_ID}" STREQUAL "Cray" AND
"${line}" MATCHES "^/" AND "${line}" MATCHES "/ccfe |/ftnfe " AND
"${line}" MATCHES " -isystem| -I")
- string(REGEX MATCHALL " (-I ?|-isystem )([^ ]*)" incs "${line}")
+ string(REGEX MATCHALL " (-I ?|-isystem )(\"[^\"]+\"|[^ \"]+)" incs "${line}")
foreach(inc IN LISTS incs)
- string(REGEX REPLACE " (-I ?|-isystem )([^ ]*)" "\\2" idir "${inc}")
+ string(REGEX REPLACE " (-I ?|-isystem )(\"[^\"]+\"|[^ \"]+)" "\\2" idir "${inc}")
list(APPEND rv "${idir}")
endforeach()
if(rv)
diff --git a/Modules/CheckCXXSymbolExists.cmake b/Modules/CheckCXXSymbolExists.cmake
index 2cccd09..b112094 100644
--- a/Modules/CheckCXXSymbolExists.cmake
+++ b/Modules/CheckCXXSymbolExists.cmake
@@ -5,26 +5,27 @@
CheckCXXSymbolExists
--------------------
-Check if a symbol exists as a function, variable, or macro in C++
+Check if a symbol exists as a function, variable, or macro in ``C++``.
-.. command:: CHECK_CXX_SYMBOL_EXISTS
+.. command:: check_cxx_symbol_exists
.. code-block:: cmake
- CHECK_CXX_SYMBOL_EXISTS(<symbol> <files> <variable>)
+ check_cxx_symbol_exists(<symbol> <files> <variable>)
Check that the ``<symbol>`` is available after including given header
``<files>`` and store the result in a ``<variable>``. Specify the list of
files in one argument as a semicolon-separated list.
- ``CHECK_CXX_SYMBOL_EXISTS()`` can be used to check in C++ files, as
- opposed to ``CHECK_SYMBOL_EXISTS()``, which works only for ``C``.
+ ``check_cxx_symbol_exists()`` can be used to check for symbols as seen by
+ the C++ compiler, as opposed to :command:`check_symbol_exists`, which always
+ uses the ``C`` compiler.
If the header files define the symbol as a macro it is considered
available and assumed to work. If the header files declare the symbol
as a function or variable then the symbol must also be available for
- linking. If the symbol is a type or enum value it will not be
- recognized (consider using :module:`CheckTypeSize`
- or :module:`CheckCXXSourceCompiles`).
+ linking. If the symbol is a type, enum value, or C++ template it will
+ not be recognized: consider using the :module:`CheckTypeSize`
+ or :module:`CheckCXXSourceCompiles` module instead.
The following variables may be set before calling this macro to modify
the way the check is run:
@@ -43,6 +44,17 @@ the way the check is run:
command. See policy :policy:`CMP0075`.
``CMAKE_REQUIRED_QUIET``
execute quietly without messages.
+
+For example:
+
+.. code-block:: cmake
+
+ include(CheckCXXSymbolExists)
+
+ # Check for macro SEEK_SET
+ check_cxx_symbol_exists(SEEK_SET "cstdio" HAVE_SEEK_SET)
+ # Check for function std::fopen
+ check_cxx_symbol_exists(std::fopen "cstdio" HAVE_STD_FOPEN)
#]=======================================================================]
include_guard(GLOBAL)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index b9ef808..c2f488a 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -45,6 +45,17 @@ the way the check is run:
command. See policy :policy:`CMP0075`.
``CMAKE_REQUIRED_QUIET``
execute quietly without messages.
+
+For example:
+
+.. code-block:: cmake
+
+ include(CheckSymbolExists)
+
+ # Check for macro SEEK_SET
+ check_symbol_exists(SEEK_SET "stdio.h" HAVE_SEEK_SET)
+ # Check for function fopen
+ check_symbol_exists(fopen "stdio.h" HAVE_FOPEN)
#]=======================================================================]
include_guard(GLOBAL)
diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake
index 18a4a75..e03ce3f 100644
--- a/Modules/Compiler/IAR-C.cmake
+++ b/Modules/Compiler/IAR-C.cmake
@@ -15,7 +15,7 @@ if(CMAKE_C_COMPILER_VERSION_INTERNAL VERSION_GREATER 7)
set(CMAKE_C90_EXTENSION_COMPILE_OPTION --c89 -e)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION -e)
-elseif()
+else()
set(CMAKE_C90_STANDARD_COMPILE_OPTION "")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION -e)
endif()
diff --git a/Modules/FindBacktrace.cmake b/Modules/FindBacktrace.cmake
index cf1632a..3d8ce88 100644
--- a/Modules/FindBacktrace.cmake
+++ b/Modules/FindBacktrace.cmake
@@ -74,7 +74,7 @@ else()
if(Backtrace_INCLUDE_DIR)
# OpenBSD has libbacktrace renamed to libexecinfo
find_library(Backtrace_LIBRARY "execinfo")
- elseif() # respect user wishes
+ else() # respect user wishes
set(_Backtrace_HEADER_TRY "backtrace.h")
find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
find_library(Backtrace_LIBRARY "backtrace")
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index a145b46..3993968 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -670,7 +670,7 @@ if (QT_QMAKE_EXECUTABLE AND
get_filename_component(qt_headers "${QT_QTCORE_INCLUDE_DIR}/../" ABSOLUTE)
set(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE)
endif()
- elseif()
+ else()
message("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_HEADERS as ${qt_headers}")
message("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly.")
endif()
diff --git a/Modules/CPack.DS_Store.in b/Modules/Internal/CPack/CPack.DS_Store.in
index 5be0eeb..5be0eeb 100644
--- a/Modules/CPack.DS_Store.in
+++ b/Modules/Internal/CPack/CPack.DS_Store.in
Binary files differ
diff --git a/Modules/CPack.Description.plist.in b/Modules/Internal/CPack/CPack.Description.plist.in
index 3d11476..3d11476 100644
--- a/Modules/CPack.Description.plist.in
+++ b/Modules/Internal/CPack/CPack.Description.plist.in
diff --git a/Modules/CPack.Info.plist.in b/Modules/Internal/CPack/CPack.Info.plist.in
index 6e32500..6e32500 100644
--- a/Modules/CPack.Info.plist.in
+++ b/Modules/Internal/CPack/CPack.Info.plist.in
diff --git a/Modules/CPack.NuGet.nuspec.in b/Modules/Internal/CPack/CPack.NuGet.nuspec.in
index b7beb5d..b7beb5d 100644
--- a/Modules/CPack.NuGet.nuspec.in
+++ b/Modules/Internal/CPack/CPack.NuGet.nuspec.in
diff --git a/Modules/CPack.OSXScriptLauncher.in b/Modules/Internal/CPack/CPack.OSXScriptLauncher.in
index c715860..c715860 100755..100644
--- a/Modules/CPack.OSXScriptLauncher.in
+++ b/Modules/Internal/CPack/CPack.OSXScriptLauncher.in
Binary files differ
diff --git a/Modules/CPack.OSXScriptLauncher.rsrc.in b/Modules/Internal/CPack/CPack.OSXScriptLauncher.rsrc.in
index 5f5f17a..5f5f17a 100644
--- a/Modules/CPack.OSXScriptLauncher.rsrc.in
+++ b/Modules/Internal/CPack/CPack.OSXScriptLauncher.rsrc.in
Binary files differ
diff --git a/Modules/CPack.OSXX11.Info.plist.in b/Modules/Internal/CPack/CPack.OSXX11.Info.plist.in
index 23a1483..23a1483 100644
--- a/Modules/CPack.OSXX11.Info.plist.in
+++ b/Modules/Internal/CPack/CPack.OSXX11.Info.plist.in
diff --git a/Modules/CPack.OSXX11.main.scpt.in b/Modules/Internal/CPack/CPack.OSXX11.main.scpt.in
index de30ea1..de30ea1 100644
--- a/Modules/CPack.OSXX11.main.scpt.in
+++ b/Modules/Internal/CPack/CPack.OSXX11.main.scpt.in
Binary files differ
diff --git a/Modules/CPack.RuntimeScript.in b/Modules/Internal/CPack/CPack.RuntimeScript.in
index f27444f..f27444f 100755
--- a/Modules/CPack.RuntimeScript.in
+++ b/Modules/Internal/CPack/CPack.RuntimeScript.in
diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/Internal/CPack/CPack.STGZ_Header.sh.in
index 70f63d2..003fcfe 100755
--- a/Modules/CPack.STGZ_Header.sh.in
+++ b/Modules/Internal/CPack/CPack.STGZ_Header.sh.in
@@ -43,10 +43,10 @@ for a in "$@CPACK_AT_SIGN@"; do
cpack_prefix_dir=`cpack_fix_slashes "${cpack_prefix_dir}"`
fi
if echo $a | grep "^--help" > /dev/null 2> /dev/null; then
- cpack_usage
+ cpack_usage
fi
if echo $a | grep "^--version" > /dev/null 2> /dev/null; then
- cpack_version
+ cpack_version
exit 2
fi
if echo $a | grep "^--include-subdir" > /dev/null 2> /dev/null; then
@@ -143,4 +143,3 @@ exit 0
#-----------------------------------------------------------
# Start of TAR.GZ file
#-----------------------------------------------------------;
-
diff --git a/Modules/CPack.VolumeIcon.icns.in b/Modules/Internal/CPack/CPack.VolumeIcon.icns.in
index c59217e..c59217e 100644
--- a/Modules/CPack.VolumeIcon.icns.in
+++ b/Modules/Internal/CPack/CPack.VolumeIcon.icns.in
Binary files differ
diff --git a/Modules/CPack.background.png.in b/Modules/Internal/CPack/CPack.background.png.in
index a32ab37..a32ab37 100644
--- a/Modules/CPack.background.png.in
+++ b/Modules/Internal/CPack/CPack.background.png.in
Binary files differ
diff --git a/Modules/CPack.distribution.dist.in b/Modules/Internal/CPack/CPack.distribution.dist.in
index f20e66c..f20e66c 100644
--- a/Modules/CPack.distribution.dist.in
+++ b/Modules/Internal/CPack/CPack.distribution.dist.in
diff --git a/Modules/Internal/CPack/CPackNuGet.cmake b/Modules/Internal/CPack/CPackNuGet.cmake
index 4b2ce92..82053b2 100644
--- a/Modules/Internal/CPack/CPackNuGet.cmake
+++ b/Modules/Internal/CPack/CPackNuGet.cmake
@@ -262,7 +262,7 @@ function(_cpack_nuget_render_spec)
# NuGet will name it properly.
_cpack_nuget_debug("Rendering `${CPACK_TEMPORARY_DIRECTORY}/CPack.NuGet.nuspec` file...")
configure_file(
- "${CMAKE_ROOT}/Modules/CPack.NuGet.nuspec.in"
+ "${CMAKE_ROOT}/Modules/Internal/CPack/CPack.NuGet.nuspec.in"
"${CPACK_TEMPORARY_DIRECTORY}/CPack.NuGet.nuspec"
@ONLY
)
diff --git a/Modules/NSIS.InstallOptions.ini.in b/Modules/Internal/CPack/NSIS.InstallOptions.ini.in
index d92d779..d92d779 100644
--- a/Modules/NSIS.InstallOptions.ini.in
+++ b/Modules/Internal/CPack/NSIS.InstallOptions.ini.in
diff --git a/Modules/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in
index f75ae78..f75ae78 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/Internal/CPack/NSIS.template.in
diff --git a/Modules/WIX.template.in b/Modules/Internal/CPack/WIX.template.in
index c4fc83a..c4fc83a 100644
--- a/Modules/WIX.template.in
+++ b/Modules/Internal/CPack/WIX.template.in