summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackDeb.cmake18
-rw-r--r--Modules/CheckCCompilerFlag.cmake8
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake8
-rw-r--r--Modules/CheckFortranCompilerFlag.cmake8
-rw-r--r--Modules/CheckIncludeFile.cmake34
-rw-r--r--Modules/CheckIncludeFileCXX.cmake37
-rw-r--r--Modules/CheckIncludeFiles.cmake33
-rw-r--r--Modules/FindMatlab.cmake16
-rw-r--r--Modules/FindwxWidgets.cmake3
-rw-r--r--Modules/Platform/Windows-GNU.cmake2
10 files changed, 90 insertions, 77 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 226153c..09cddcd 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -352,10 +352,11 @@ function(cpack_deb_prepare_package_vars)
OUTPUT_VARIABLE _TMP_VERSION
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REGEX MATCH "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)"
- SHLIBDEPS_EXECUTABLE_VERSION
- "${_TMP_VERSION}")
- set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ if(_TMP_VERSION MATCHES "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)")
+ set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ else()
+ set(SHLIBDEPS_EXECUTABLE_VERSION "")
+ endif()
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message("CPackDeb Debug: dpkg-shlibdeps --version output is '${_TMP_VERSION}'")
@@ -398,9 +399,12 @@ function(cpack_deb_prepare_package_vars)
file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
- # only set ignore-missing-info flag for dpkg-shlibdeps that have --version option
- # (those are newer and also have --ignore-missing-info flag)
- if(SHLIBDEPS_EXECUTABLE_VERSION)
+ # Add --ignore-missing-info if the tool supports it
+ execute_process(COMMAND env LC_ALL=C ${SHLIBDEPS_EXECUTABLE} --help
+ OUTPUT_VARIABLE _TMP_HELP
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(_TMP_HELP MATCHES "--ignore-missing-info")
set(IGNORE_MISSING_INFO_FLAG "--ignore-missing-info")
endif()
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 750e4fb..53f3454 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -13,7 +13,7 @@
# Will be created as an internal cache variable.
#
# This internally calls the check_c_source_compiles macro and sets
-# CMAKE_REQUIRED_FLAGS to <flag>. See help for
+# CMAKE_REQUIRED_DEFINITIONS to <flag>. See help for
# CheckCSourceCompiles for a listing of variables that can otherwise
# modify the build. The result only tells that the compiler does not
# give an error message when it encounters the flag. If the flag has
@@ -38,8 +38,8 @@ include(CheckCSourceCompiles)
include(CMakeCheckCompilerFlagCommonPatterns)
macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
- set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
- set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
+ set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
+ set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
# Normalize locale during test compilation.
set(_CheckCCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
@@ -60,5 +60,5 @@ macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
unset(_CheckCCompilerFlag_LOCALE_VARS)
unset(_CheckCCompilerFlag_COMMON_PATTERNS)
- set (CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
+ set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro ()
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index 71b3fd2..fab3a05 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -12,7 +12,7 @@
# <var> - variable to store the result
#
# This internally calls the check_cxx_source_compiles macro and sets
-# CMAKE_REQUIRED_FLAGS to <flag>. See help for
+# CMAKE_REQUIRED_DEFINITIONS to <flag>. See help for
# CheckCXXSourceCompiles for a listing of variables that can otherwise
# modify the build. The result only tells that the compiler does not
# give an error message when it encounters the flag. If the flag has
@@ -37,8 +37,8 @@ include(CheckCXXSourceCompiles)
include(CMakeCheckCompilerFlagCommonPatterns)
macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
- set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
- set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
+ set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
+ set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
# Normalize locale during test compilation.
set(_CheckCXXCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
@@ -59,6 +59,6 @@ macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
unset(_CheckCXXCompilerFlag_LOCALE_VARS)
unset(_CheckCXXCompilerFlag_COMMON_PATTERNS)
- set (CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
+ set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro ()
diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake
index c476661..53fd8d6 100644
--- a/Modules/CheckFortranCompilerFlag.cmake
+++ b/Modules/CheckFortranCompilerFlag.cmake
@@ -13,7 +13,7 @@
# Will be created as an internal cache variable.
#
# This internally calls the check_fortran_source_compiles macro and
-# sets CMAKE_REQUIRED_FLAGS to <flag>. See help for
+# sets CMAKE_REQUIRED_DEFINITIONS to <flag>. See help for
# CheckFortranSourceCompiles for a listing of variables that can
# otherwise modify the build. The result only tells that the compiler
# does not give an error message when it encounters the flag. If the
@@ -40,8 +40,8 @@ include(CheckFortranSourceCompiles)
include(CMakeCheckCompilerFlagCommonPatterns)
macro (CHECK_Fortran_COMPILER_FLAG _FLAG _RESULT)
- set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
- set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
+ set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
+ set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
# Normalize locale during test compilation.
set(_CheckFortranCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
@@ -62,5 +62,5 @@ macro (CHECK_Fortran_COMPILER_FLAG _FLAG _RESULT)
unset(_CheckFortranCompilerFlag_LOCALE_VARS)
unset(_CheckFortranCompilerFlag_COMMON_PATTERNS)
- set (CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
+ set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro ()
diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake
index 402b37c..ef1e39d 100644
--- a/Modules/CheckIncludeFile.cmake
+++ b/Modules/CheckIncludeFile.cmake
@@ -2,30 +2,34 @@
# CheckIncludeFile
# ----------------
#
-# macro which checks the include file exists.
+# Provides a macro to check if a header file can be included in ``C``.
#
-# CHECK_INCLUDE_FILE(INCLUDE VARIABLE)
+# .. command:: CHECK_INCLUDE_FILE
#
-# ::
+# ::
#
-# INCLUDE - name of include file
-# VARIABLE - variable to return result
-# Will be created as an internal cache variable.
+# CHECK_INCLUDE_FILE(<include> <variable> [<flags>])
#
-#
-#
-# an optional third argument is the CFlags to add to the compile line or
-# you can use CMAKE_REQUIRED_FLAGS
+# Check if the given ``<include>`` file may be included in a ``C``
+# source file and store the result in an internal cache entry named
+# ``<variable>``. The optional third argument may be used to add
+# compilation flags to the check (or use ``CMAKE_REQUIRED_FLAGS`` below).
#
# The following variables may be set before calling this macro to modify
# the way the check is run:
#
-# ::
+# ``CMAKE_REQUIRED_FLAGS``
+# string of compile command line flags
+# ``CMAKE_REQUIRED_DEFINITIONS``
+# list of macros to define (-DFOO=bar)
+# ``CMAKE_REQUIRED_INCLUDES``
+# list of include directories
+# ``CMAKE_REQUIRED_QUIET``
+# execute quietly without messages
#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_QUIET = execute quietly without messages
+# See the :module:`CheckIncludeFiles` module to check for multiple headers
+# at once. See the :module:`CheckIncludeFileCXX` module to check for headers
+# using the ``CXX`` language.
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake
index eae1730..9a6df3b 100644
--- a/Modules/CheckIncludeFileCXX.cmake
+++ b/Modules/CheckIncludeFileCXX.cmake
@@ -2,34 +2,33 @@
# CheckIncludeFileCXX
# -------------------
#
-# Check if the include file exists.
+# Provides a macro to check if a header file can be included in ``CXX``.
#
-# ::
+# .. command:: CHECK_INCLUDE_FILE_CXX
#
-# CHECK_INCLUDE_FILE_CXX(INCLUDE VARIABLE)
+# ::
#
+# CHECK_INCLUDE_FILE_CXX(<include> <variable> [<flags>])
#
-#
-# ::
-#
-# INCLUDE - name of include file
-# VARIABLE - variable to return result
-# Will be created as an internal cache variable.
-#
-#
-#
-# An optional third argument is the CFlags to add to the compile line or
-# you can use CMAKE_REQUIRED_FLAGS.
+# Check if the given ``<include>`` file may be included in a ``CXX``
+# source file and store the result in an internal cache entry named
+# ``<variable>``. The optional third argument may be used to add
+# compilation flags to the check (or use ``CMAKE_REQUIRED_FLAGS`` below).
#
# The following variables may be set before calling this macro to modify
# the way the check is run:
#
-# ::
+# ``CMAKE_REQUIRED_FLAGS``
+# string of compile command line flags
+# ``CMAKE_REQUIRED_DEFINITIONS``
+# list of macros to define (-DFOO=bar)
+# ``CMAKE_REQUIRED_INCLUDES``
+# list of include directories
+# ``CMAKE_REQUIRED_QUIET``
+# execute quietly without messages
#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_QUIET = execute quietly without messages
+# See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFiles`
+# to check for one or more ``C`` headers.
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index 2494862..843cd35 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -2,29 +2,34 @@
# CheckIncludeFiles
# -----------------
#
-# Check if the files can be included
+# Provides a macro to check if a list of one or more header files can
+# be included together in ``C``.
#
+# .. command:: CHECK_INCLUDE_FILES
#
+# ::
#
-# CHECK_INCLUDE_FILES(INCLUDE VARIABLE)
-#
-# ::
-#
-# INCLUDE - list of files to include
-# VARIABLE - variable to return result
-# Will be created as an internal cache variable.
-#
+# CHECK_INCLUDE_FILES("<includes>" <variable>)
#
+# Check if the given ``<includes>`` list may be included together
+# in a ``C`` source file and store the result in an internal cache
+# entry named ``<variable>``. Specify the ``<includes>`` argument
+# as a :ref:`;-list <CMake Language Lists>` of header file names.
#
# The following variables may be set before calling this macro to modify
# the way the check is run:
#
-# ::
+# ``CMAKE_REQUIRED_FLAGS``
+# string of compile command line flags
+# ``CMAKE_REQUIRED_DEFINITIONS``
+# list of macros to define (-DFOO=bar)
+# ``CMAKE_REQUIRED_INCLUDES``
+# list of include directories
+# ``CMAKE_REQUIRED_QUIET``
+# execute quietly without messages
#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_QUIET = execute quietly without messages
+# See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFileCXX`
+# to check for a single header file in ``C`` or ``CXX`` languages.
#=============================================================================
# Copyright 2003-2012 Kitware, Inc.
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 028bf5a..a47a69c 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -55,7 +55,7 @@
# returning an exit code can be used as well (0 indicating a success).
#
# Module Input Variables
-# ----------------------
+# ^^^^^^^^^^^^^^^^^^^^^^
#
# Users or projects may set the following variables to configure the module
# behaviour:
@@ -69,10 +69,10 @@
# versions.
#
# Variables defined by the module
-# -------------------------------
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#
# Result variables
-# ^^^^^^^^^^^^^^^^
+# """"""""""""""""
#
# ``Matlab_FOUND``
# ``TRUE`` if the Matlab installation is found, ``FALSE``
@@ -100,7 +100,7 @@
# Available only if the component ``MEX_COMPILER`` is asked
#
# Cached variables
-# ^^^^^^^^^^^^^^^^
+# """"""""""""""""
#
# ``Matlab_MEX_EXTENSION``
# the extension of the mex files for the current platform (given by Matlab).
@@ -109,7 +109,7 @@
# is changed by the user, the result variables are recomputed.
#
# Provided macros
-# ---------------
+# ^^^^^^^^^^^^^^^
#
# :command:`matlab_get_version_from_release_name`
# returns the version from the release name
@@ -117,7 +117,7 @@
# returns the release name from the Matlab version
#
# Provided functions
-# ------------------
+# ^^^^^^^^^^^^^^^^^^
#
# :command:`matlab_add_mex`
# adds a target compiling a MEX file.
@@ -139,7 +139,7 @@
#
#
# Known issues
-# ------------
+# ^^^^^^^^^^^^
#
# **Symbol clash in a MEX target**
# By default, every symbols inside a MEX
@@ -166,7 +166,7 @@
#
#
# Reference
-# --------------
+# ^^^^^^^^^
#
# .. variable:: Matlab_ROOT_DIR
#
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index c16c011..9a70678 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -740,7 +740,8 @@ else()
# UNIX: Start actual work.
#-----------------------------------------------------------------
# Support cross-compiling, only search in the target platform.
- find_program(wxWidgets_CONFIG_EXECUTABLE wx-config wx-config-3.0
+ find_program(wxWidgets_CONFIG_EXECUTABLE
+ NAMES wx-config wx-config-3.0 wx-config-2.9 wx-config-2.8
DOC "Location of wxWidgets library configuration provider binary (wx-config)."
ONLY_CMAKE_FIND_ROOT_PATH
)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index b571b16..b97409c 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -35,7 +35,7 @@ endif()
if(MINGW)
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32")
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
endif()