summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPack.cmake2
-rw-r--r--Modules/CPackDeb.cmake414
-rw-r--r--Modules/CPackIFW.cmake115
-rw-r--r--Modules/CPackRPM.cmake9
-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.cmake19
-rw-r--r--Modules/FindBoost.cmake2
-rw-r--r--Modules/FindFLTK.cmake15
-rw-r--r--Modules/FindFLTK2.cmake13
-rw-r--r--Modules/FindGTest.cmake4
-rw-r--r--Modules/FindHDF5.cmake25
-rw-r--r--Modules/FindJava.cmake2
-rw-r--r--Modules/FindMatlab.cmake7
-rw-r--r--Modules/FindPkgConfig.cmake2
-rw-r--r--Modules/FindPostgreSQL.cmake44
-rw-r--r--Modules/FortranCInterface.cmake3
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake12
-rw-r--r--Modules/MatlabTestsRedirect.cmake1
-rw-r--r--Modules/Platform/CYGWIN-GNU.cmake4
-rw-r--r--Modules/Platform/HP-UX-GNU-ASM.cmake2
-rw-r--r--Modules/Platform/Windows-GNU.cmake4
-rw-r--r--Modules/Platform/Windows-Intel-Fortran.cmake2
-rw-r--r--Modules/Platform/Windows-MSVC.cmake3
-rwxr-xr-xModules/Squish4RunTestCase.sh4
-rw-r--r--Modules/UseSWIG.cmake3
-rw-r--r--Modules/WriteCompilerDetectionHeader.cmake4
28 files changed, 518 insertions, 217 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 532596d..e223286 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -228,7 +228,7 @@
#
# List of four values that specify what project to install. The four values
# are: Build directory, Project Name, Project Component, Directory. If
-# omitted, CPack will build an installer that installers everything.
+# omitted, CPack will build an installer that installs everything.
#
# .. variable:: CPACK_SYSTEM_NAME
#
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index f248a67..09cddcd 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -15,52 +15,88 @@
# the build system.
#
# CPackDeb has specific features which are controlled by the specifics
-# CPACK_DEBIAN_XXX variables.You'll find a detailed usage on the wiki:
-# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
+# :code:`CPACK_DEBIAN_XXX` variables.
#
+# :code:`CPACK_DEBIAN_<COMPONENT>_XXXX` variables may be used in order to have
+# **component** specific values. Note however that <COMPONENT> refers to the
+# **grouping name** written in upper case. It may be either a component name or
+# a component GROUP name.
+#
+# You'll find a detailed usage on the wiki:
+# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29 .
# However as a handy reminder here comes the list of specific variables:
#
# .. variable:: CPACK_DEBIAN_PACKAGE_NAME
#
+# The Debian package summary
+#
# * Mandatory : YES
-# * Default : CPACK_PACKAGE_NAME (lower case)
+# * Default : :variable:`CPACK_PACKAGE_NAME` (lower case)
#
-# The debian package summary
#
# .. variable:: CPACK_DEBIAN_PACKAGE_VERSION
#
+# The Debian package version
+#
# * Mandatory : YES
-# * Default : CPACK_PACKAGE_VERSION
+# * Default : :variable:`CPACK_PACKAGE_VERSION`
#
-# The debian package version
#
# .. variable:: CPACK_DEBIAN_PACKAGE_ARCHITECTURE
#
+# The Debian package architecture
+#
# * Mandatory : YES
-# * Default : Output of dpkg --print-architecture (or i386 if dpkg is not found)
+# * Default : Output of :code:`dpkg --print-architecture` (or :code:`i386`
+# if :code:`dpkg` is not found)
#
-# The debian package architecture
#
# .. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS
+#
+# Sets the Debian dependencies of this package.
#
# * Mandatory : NO
-# * Default : -
+# * Default :
+#
+# - An empty string for non-component based installations
+# - :variable:`CPACK_DEBIAN_PACKAGE_DEPENDS` for component-based
+# installations.
#
-# May be used to set deb dependencies.
+# .. note::
+#
+# If :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` or
+# more specifically :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS`
+# is set for this component, the discovered dependencies will be appended
+# to :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` instead of
+# :variable:`CPACK_DEBIAN_PACKAGE_DEPENDS`. If
+# :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` is an empty string,
+# only the automatically discovered dependencies will be set for this
+# component.
+#
+# Example::
+#
+# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)")
#
# .. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER
#
+# The Debian package maintainer
+#
# * Mandatory : YES
-# * Default : CPACK_PACKAGE_CONTACT
+# * Default : :code:`CPACK_PACKAGE_CONTACT`
#
-# The debian package maintainer
#
# .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
+# CPACK_COMPONENT_<COMPONENT>_DESCRIPTION
+#
+# The Debian package description
#
# * Mandatory : YES
-# * Default : CPACK_PACKAGE_DESCRIPTION_SUMMARY
+# * Default :
+#
+# - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or
+# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
#
-# The debian package description
#
# .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
#
@@ -69,127 +105,181 @@
#
# .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
#
+# The compression used for creating the Debian package.
+# Possible values are: lzma, xz, bzip2 and gzip.
+#
# * Mandatory : YES
# * Default : 'gzip'
#
-# Possible values are: lzma, xz, bzip2 and gzip.
#
# .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY
#
+# The Debian package priority
+#
# * Mandatory : YES
# * Default : 'optional'
#
-# The debian package priority
#
# .. variable:: CPACK_DEBIAN_PACKAGE_HOMEPAGE
#
-# * Mandatory : NO
-# * Default : -
-#
# The URL of the web site for this package, preferably (when applicable) the
# site from which the original source can be obtained and any additional
# upstream documentation or information may be found.
-# The content of this field is a simple URL without any surrounding
-# characters such as <>.
+#
+# * Mandatory : NO
+# * Default : -
+#
+# .. note::
+#
+# The content of this field is a simple URL without any surrounding
+# characters such as <>.
+#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_SHLIBDEPS
+# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS
+#
+# May be set to ON in order to use :code:`dpkg-shlibdeps` to generate
+# better package dependency list.
#
# * Mandatory : NO
-# * Default : OFF
+# * Default :
#
-# May be set to ON in order to use dpkg-shlibdeps to generate
-# better package dependency list.
-# You may need set CMAKE_INSTALL_RPATH toi appropriate value
-# if you use this feature, because if you don't dpkg-shlibdeps
-# may fail to find your own shared libs.
-# See http://www.cmake.org/Wiki/CMake_RPATH_handling.
+# - :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` if set or
+# - OFF
#
-# .. variable:: CPACK_DEBIAN_PACKAGE_DEBUG
+# .. note::
#
-# * Mandatory : NO
-# * Default : -
+# You may need set :variable:`CMAKE_INSTALL_RPATH` to an appropriate value
+# if you use this feature, because if you don't :code:`dpkg-shlibdeps`
+# may fail to find your own shared libs.
+# See http://www.cmake.org/Wiki/CMake_RPATH_handling.
+#
+#
+# .. variable:: CPACK_DEBIAN_PACKAGE_DEBUG
#
# May be set when invoking cpack in order to trace debug information
# during CPackDeb run.
#
+# * Mandatory : NO
+# * Default : -
+#
# .. variable:: CPACK_DEBIAN_PACKAGE_PREDEPENDS
#
+# Sets the `Pre-Depends` field of the Debian package.
+# Like :variable:`Depends <CPACK_DEBIAN_PACKAGE_DEPENDS>`, except that it
+# also forces :code:`dpkg` to complete installation of the packages named
+# before even starting the installation of the package which declares the
+# pre-dependency.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# This field is like Depends, except that it also forces dpkg to complete installation of
-# the packages named before even starting the installation of the package which declares
-# the pre-dependency.
+# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
#
# .. variable:: CPACK_DEBIAN_PACKAGE_ENHANCES
#
+# Sets the `Enhances` field of the Debian package.
+# Similar to :variable:`Suggests <CPACK_DEBIAN_PACKAGE_SUGGESTS>` but works
+# in the opposite direction: declares that a package can enhance the
+# functionality of another package.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# This field is similar to Suggests but works in the opposite direction.
-# It is used to declare that a package can enhance the functionality of another package.
+# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
#
# .. variable:: CPACK_DEBIAN_PACKAGE_BREAKS
#
+# Sets the `Breaks` field of the Debian package.
+# When a binary package (P) declares that it breaks other packages (B),
+# :code:`dpkg` will not allow the package (P) which declares `Breaks` be
+# **unpacked** unless the packages that will be broken (B) are deconfigured
+# first.
+# As long as the package (P) is configured, the previously deconfigured
+# packages (B) cannot be reconfigured again.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# When one binary package declares that it breaks another, dpkg will refuse to allow the
-# package which declares Breaks be installed unless the broken package is deconfigured first,
-# and it will refuse to allow the broken package to be reconfigured.
+# See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
+#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_CONFLICTS
#
+# Sets the `Conflicts` field of the Debian package.
+# When one binary package declares a conflict with another using a `Conflicts`
+# field, :code:`dpkg` will not allow them to be unpacked on the system at
+# the same time.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# When one binary package declares a conflict with another using a Conflicts field,
-# dpkg will refuse to allow them to be installed on the system at the same time.
+# See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts
+#
+# .. note::
+#
+# This is a stronger restriction than
+# :variable:`Breaks <CPACK_DEBIAN_PACKAGE_BREAKS>`, which prevents the
+# broken package from being configured while the breaking package is in
+# the "Unpacked" state but allows both packages to be unpacked at the same
+# time.
#
# .. variable:: CPACK_DEBIAN_PACKAGE_PROVIDES
#
+# Sets the `Provides` field of the Debian package.
+# A virtual package is one which appears in the `Provides` control field of
+# another package.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# A virtual package is one which appears in the Provides control field of another package.
+# See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual
+#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_REPLACES
#
+# Sets the `Replaces` field of the Debian package.
+# Packages can declare in their control file that they should overwrite
+# files in certain other packages, or completely replace other packages.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# Packages can declare in their control file that they should overwrite
-# files in certain other packages, or completely replace other packages.
+# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_RECOMMENDS
#
+# Sets the `Recommends` field of the Debian package.
+# Allows packages to declare a strong, but not absolute, dependency on other
+# packages.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# Allows packages to declare a strong, but not absolute, dependency on other packages.
+# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_SUGGESTS
#
+# Sets the `Suggests` field of the Debian package.
+# Allows packages to declare a suggested package install grouping.
+#
# * Mandatory : NO
# * Default : -
#
-# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
-# Allows packages to declare a suggested package install grouping.
+# See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#
#
# .. variable:: CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
#
+# This variable allow advanced user to add custom script to the
+# control.tar.gz.
+# Typical usage is for conffiles, postinst, postrm, prerm.
+#
# * Mandatory : NO
# * Default : -
#
-# This variable allow advanced user to add custom script to the
-# control.tar.gz Typical usage is for conffiles, postinst, postrm, prerm.
# Usage::
#
# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
@@ -235,94 +325,132 @@ function(cpack_deb_prepare_package_vars)
set(CPACK_DEBIAN_FAKEROOT_EXECUTABLE ${FAKEROOT_EXECUTABLE})
endif()
+ set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_PATH}")
+
+ # per component automatic discover: some of the component might not have
+ # binaries.
+ if(CPACK_DEB_PACKAGE_COMPONENT)
+ string(TOUPPER "${CPACK_DEB_PACKAGE_COMPONENT}" _local_component_name)
+ set(_component_shlibdeps_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_SHLIBDEPS")
+
+ # if set, overrides the global configuration
+ if(DEFINED ${_component_shlibdeps_var})
+ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "${${_component_shlibdeps_var}}")
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message("CPackDeb Debug: component '${CPACK_DEB_PACKAGE_COMPONENT}' dpkg-shlibdeps set to ${CPACK_DEBIAN_PACKAGE_SHLIBDEPS}")
+ endif()
+ endif()
+ endif()
+
if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# dpkg-shlibdeps is a Debian utility for generating dependency list
find_program(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps)
- # Check version of the dpkg-shlibdeps tool using CPackRPM method
if(SHLIBDEPS_EXECUTABLE)
+ # Check version of the dpkg-shlibdeps tool using CPackRPM method
execute_process(COMMAND env LC_ALL=C ${SHLIBDEPS_EXECUTABLE} --version
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 is <${SHLIBDEPS_EXECUTABLE_VERSION}>")
+ message("CPackDeb Debug: dpkg-shlibdeps --version output is '${_TMP_VERSION}'")
+ message("CPackDeb Debug: dpkg-shlibdeps version is <${SHLIBDEPS_EXECUTABLE_VERSION}>")
endif()
# Generating binary list - Get type of all install files
- execute_process(COMMAND find -type f
- COMMAND xargs file
- WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
- OUTPUT_VARIABLE CPACK_DEB_INSTALL_FILES)
-
- # Convert to CMake list
- string(REPLACE "\n" ";" CPACK_DEB_INSTALL_FILES ${CPACK_DEB_INSTALL_FILES})
+ cmake_policy(PUSH)
+ # Tell file(GLOB_RECURSE) not to follow directory symlinks
+ # even if the project does not set this policy to NEW.
+ cmake_policy(SET CMP0009 NEW)
+ file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" "${WDIR}/*")
+ cmake_policy(POP)
+
+ # get file info so that we can determine if file is executable or not
+ unset(CPACK_DEB_INSTALL_FILES)
+ foreach(FILE_ IN LISTS FILE_PATHS_)
+ execute_process(COMMAND file "./${FILE_}"
+ WORKING_DIRECTORY "${WDIR}"
+ OUTPUT_VARIABLE INSTALL_FILE_)
+ list(APPEND CPACK_DEB_INSTALL_FILES "${INSTALL_FILE_}")
+ endforeach()
# Only dynamically linked ELF files are included
# Extract only file name infront of ":"
- foreach ( _FILE ${CPACK_DEB_INSTALL_FILES})
- if ( ${_FILE} MATCHES "ELF.*dynamically linked")
- string(REGEX MATCH "(^.*):" _FILE_NAME ${_FILE})
- list(APPEND CPACK_DEB_BINARY_FILES ${CMAKE_MATCH_1})
+ foreach(_FILE ${CPACK_DEB_INSTALL_FILES})
+ if( ${_FILE} MATCHES "ELF.*dynamically linked")
+ string(REGEX MATCH "(^.*):" _FILE_NAME "${_FILE}")
+ list(APPEND CPACK_DEB_BINARY_FILES "${CMAKE_MATCH_1}")
+ set(CONTAINS_EXECUTABLE_FILES_ TRUE)
endif()
endforeach()
- message( "CPackDeb: - Generating dependency list")
-
- # Create blank control file for running dpkg-shlibdeps
- # There might be some other way to invoke dpkg-shlibdeps without creating this file
- # but standard debian package should not have anything that can collide with this file or directory
- file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
- file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
-
- # Execute dpkg-shlibdeps
- # --ignore-missing-info : allow dpkg-shlibdeps to run even if some libs do not belong to a package
- # -O : print to STDOUT
- execute_process(COMMAND ${SHLIBDEPS_EXECUTABLE} --ignore-missing-info -O ${CPACK_DEB_BINARY_FILES}
- WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
- OUTPUT_VARIABLE SHLIBDEPS_OUTPUT
- RESULT_VARIABLE SHLIBDEPS_RESULT
- ERROR_VARIABLE SHLIBDEPS_ERROR
- OUTPUT_STRIP_TRAILING_WHITESPACE )
- if(CPACK_DEBIAN_PACKAGE_DEBUG)
- # dpkg-shlibdeps will throw some warnings if some input files are not binary
- message( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")
- endif()
- if (NOT SHLIBDEPS_RESULT EQUAL 0)
- message (FATAL_ERROR "CPackDeb: dpkg-shlibdeps: ${SHLIBDEPS_ERROR}")
- endif ()
-
- #Get rid of prefix generated by dpkg-shlibdeps
- string (REGEX REPLACE "^.*Depends=" "" CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS ${SHLIBDEPS_OUTPUT})
+ if(CONTAINS_EXECUTABLE_FILES_)
+ message("CPackDeb: - Generating dependency list")
+
+ # Create blank control file for running dpkg-shlibdeps
+ # There might be some other way to invoke dpkg-shlibdeps without creating this file
+ # but standard debian package should not have anything that can collide with this file or directory
+ file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
+ file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
+
+ # 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()
- if(CPACK_DEBIAN_PACKAGE_DEBUG)
- message( "CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
- endif()
+ # Execute dpkg-shlibdeps
+ # --ignore-missing-info : allow dpkg-shlibdeps to run even if some libs do not belong to a package
+ # -O : print to STDOUT
+ execute_process(COMMAND ${SHLIBDEPS_EXECUTABLE} ${IGNORE_MISSING_INFO_FLAG} -O ${CPACK_DEB_BINARY_FILES}
+ WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
+ OUTPUT_VARIABLE SHLIBDEPS_OUTPUT
+ RESULT_VARIABLE SHLIBDEPS_RESULT
+ ERROR_VARIABLE SHLIBDEPS_ERROR
+ OUTPUT_STRIP_TRAILING_WHITESPACE )
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ # dpkg-shlibdeps will throw some warnings if some input files are not binary
+ message( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")
+ endif()
+ if(NOT SHLIBDEPS_RESULT EQUAL 0)
+ message (FATAL_ERROR "CPackDeb: dpkg-shlibdeps: '${SHLIBDEPS_ERROR}';\n"
+ "executed command: '${SHLIBDEPS_EXECUTABLE} ${IGNORE_MISSING_INFO_FLAG} -O ${CPACK_DEB_BINARY_FILES}';\n"
+ "found files: '${INSTALL_FILE_}';\n"
+ "files info: '${CPACK_DEB_INSTALL_FILES}';\n"
+ "binary files: '${CPACK_DEB_BINARY_FILES}'")
+ endif()
- # Remove blank control file
- # Might not be safe if package actual contain file or directory named debian
- file(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian")
+ #Get rid of prefix generated by dpkg-shlibdeps
+ string(REGEX REPLACE "^.*Depends=" "" CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS "${SHLIBDEPS_OUTPUT}")
- # Append user depend if set
- if (CPACK_DEBIAN_PACKAGE_DEPENDS)
- set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
- else ()
- set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
- endif ()
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message("CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS} from output ${SHLIBDEPS_OUTPUT}")
+ endif()
- else ()
- if(CPACK_DEBIAN_PACKAGE_DEBUG)
- message( "CPackDeb Debug: Using only user-provided depends because dpkg-shlibdeps is not found.")
+ # Remove blank control file
+ # Might not be safe if package actual contain file or directory named debian
+ file(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian")
+ else()
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message(AUTHOR_WARNING "CPackDeb Debug: Using only user-provided depends because package does not contain executable files that link to shared libraries.")
+ endif()
endif()
+ else()
+ message("CPackDeb: Using only user-provided dependencies because dpkg-shlibdeps is not found.")
endif()
- else ()
+ else()
if(CPACK_DEBIAN_PACKAGE_DEBUG)
- message( "CPackDeb Debug: Using only user-provided depends")
+ message("CPackDeb Debug: Using only user-provided dependencies")
endif()
endif()
@@ -366,6 +494,33 @@ function(cpack_deb_prepare_package_vars)
# Depends:
# You should set: DEBIAN_PACKAGE_DEPENDS
# TODO: automate 'objdump -p | grep NEEDED'
+
+ # if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_DEPENDS
+ # automatic dependency discovery will be performed afterwards.
+ if(CPACK_DEB_PACKAGE_COMPONENT)
+ string(TOUPPER "${CPACK_DEB_PACKAGE_COMPONENT}" _local_component_name)
+ set(_component_depends_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_DEPENDS")
+
+ # if set, overrides the global dependency
+ if(DEFINED ${_component_depends_var})
+ set(CPACK_DEBIAN_PACKAGE_DEPENDS "${${_component_depends_var}}")
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message("CPackDeb Debug: component '${_local_component_name}' dependencies set to '${CPACK_DEBIAN_PACKAGE_DEPENDS}'")
+ endif()
+ endif()
+ endif()
+
+ # at this point, the CPACK_DEBIAN_PACKAGE_DEPENDS is properly set
+ # to the minimal dependency of the package
+ # Append automatically discovered dependencies .
+ if(NOT "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}" STREQUAL "")
+ if (CPACK_DEBIAN_PACKAGE_DEPENDS)
+ set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
+ else ()
+ set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
+ endif ()
+ endif()
+
if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
message(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.")
endif()
@@ -379,11 +534,26 @@ function(cpack_deb_prepare_package_vars)
endif()
# Description: (mandatory)
- if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
- if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
- message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
+ if(NOT CPACK_DEB_PACKAGE_COMPONENT)
+ if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+ if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
+ endif()
+ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+ endif()
+ else()
+ string(TOUPPER ${CPACK_DEB_PACKAGE_COMPONENT} _local_component_name)
+ set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
+
+ # component description overrides package description
+ if(${component_description_var})
+ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}})
+ elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+ if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_description_var}")
+ endif()
+ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
endif()
- set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
endif()
# Section: (recommended)
@@ -427,8 +597,6 @@ function(cpack_deb_prepare_package_vars)
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
endif()
- set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_PATH}")
-
# Print out some debug information if we were asked for that
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index e5b7601..6649933 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -2,7 +2,7 @@
# CPackIFW
# --------
#
-# .. _QtIFW: http://qt-project.org/doc/qtinstallerframework/index.html
+# .. _QtIFW: http://doc.qt.io/qtinstallerframework/index.html
#
# This module looks for the location of the command line utilities supplied with
# the Qt Installer Framework (QtIFW_).
@@ -33,18 +33,26 @@
#
# You can use the following variables to change behavior of CPack ``IFW`` generator.
#
+# Debug
+# """"""
+#
+# .. variable:: CPACK_IFW_VERBOSE
+#
+# Set to ``ON`` to enable addition debug output.
+# By default is ``OFF``.
+#
# Package
# """""""
#
# .. variable:: CPACK_IFW_PACKAGE_TITLE
#
# Name of the installer as displayed on the title bar.
-# By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
+# By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`.
#
# .. variable:: CPACK_IFW_PACKAGE_PUBLISHER
#
# Publisher of the software (as shown in the Windows Control Panel).
-# By default used :variable:`CPACK_PACKAGE_VENDOR`
+# By default used :variable:`CPACK_PACKAGE_VENDOR`.
#
# .. variable:: CPACK_IFW_PRODUCT_URL
#
@@ -63,6 +71,12 @@
#
# Filename for a logo is used as QWizard::LogoPixmap.
#
+# .. variable:: CPACK_IFW_PACKAGE_START_MENU_DIRECTORY
+#
+# Name of the default program group for the product in the Windows Start menu.
+#
+# By default used :variable:`CPACK_IFW_PACKAGE_NAME`.
+#
# .. variable:: CPACK_IFW_TARGET_DIRECTORY
#
# Default target directory for installation.
@@ -85,6 +99,35 @@
# The root package name, which will be used if configuration group is not
# specified
#
+# .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME
+#
+# Filename of the generated maintenance tool.
+# The platform-specific executable file extension is appended.
+#
+# By default used QtIFW_ defaults (``maintenancetool``).
+#
+# .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE
+#
+# Filename for the configuration of the generated maintenance tool.
+#
+# By default used QtIFW_ defaults (``maintenancetool.ini``).
+#
+# .. variable:: CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS
+#
+# Set to ``ON`` if the installation path can contain non-ASCII characters.
+#
+# Is ``ON`` for QtIFW_ less 2.0 tools.
+#
+# .. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
+#
+# Set to ``OFF`` if the installation path cannot contain space characters.
+#
+# Is ``ON`` for QtIFW_ less 2.0 tools.
+#
+# .. variable:: CPACK_IFW_PACKAGE_CONTROL_SCRIPT
+#
+# Filename for a custom installer control script.
+#
# .. variable:: CPACK_IFW_REPOSITORIES_ALL
#
# The list of remote repositories.
@@ -113,6 +156,10 @@
# Tools
# """"""""
#
+# .. variable:: CPACK_IFW_FRAMEWORK_VERSION
+#
+# The version of used QtIFW_ tools.
+#
# .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE
#
# The path to "binarycreator" command line client.
@@ -276,16 +323,16 @@
# Qt Installer Framework Manual:
#
# Index page
-# http://qt-project.org/doc/qtinstallerframework/index.html
+# http://doc.qt.io/qtinstallerframework/index.html
#
# Component Scripting
-# http://qt-project.org/doc/qtinstallerframework/scripting.html
+# http://doc.qt.io/qtinstallerframework/scripting.html
#
# Predefined Variables
-# http://qt-project.org/doc/qtinstallerframework/scripting.html#predefined-variables
+# http://doc.qt.io/qtinstallerframework/scripting.html#predefined-variables
#
-# Download Qt Installer Framework for you platform from Qt Project site:
-# http://download.qt-project.org/official_releases/qt-installer-framework/
+# Download Qt Installer Framework for you platform from Qt site:
+# http://download.qt.io/official_releases/qt-installer-framework
#
#=============================================================================
@@ -324,8 +371,14 @@ else()
endif()
set(_CPACK_IFW_SUFFIXES
+# Common
"bin"
- "QtIFW-1.7.0/bin"
+# Second branch
+ "QtIFW2.3.0/bin"
+ "QtIFW2.2.0/bin"
+ "QtIFW2.1.0/bin"
+ "QtIFW2.0.0/bin"
+# First branch
"QtIFW-1.6.0/bin"
"QtIFW-1.5.0/bin"
"QtIFW-1.4.0/bin"
@@ -351,6 +404,26 @@ find_program(CPACK_IFW_REPOGEN_EXECUTABLE
)
mark_as_advanced(CPACK_IFW_REPOGEN_EXECUTABLE)
+# Look for 'installerbase'
+
+find_program(CPACK_IFW_INSTALLERBASE_EXECUTABLE
+ NAMES installerbase
+ PATHS ${_CPACK_IFW_PATHS}
+ PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
+ DOC "QtIFW installer executable base"
+ )
+mark_as_advanced(CPACK_IFW_INSTALLERBASE_EXECUTABLE)
+
+# Look for 'devtool' (appeared in the second branch)
+
+find_program(CPACK_IFW_DEVTOOL_EXECUTABLE
+ NAMES devtool
+ PATHS ${_CPACK_IFW_PATHS}
+ PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
+ DOC "QtIFW devtool command line client"
+ )
+mark_as_advanced(CPACK_IFW_DEVTOOL_EXECUTABLE)
+
#
## Next code is included only once
#
@@ -359,6 +432,27 @@ if(NOT CPackIFW_CMake_INCLUDED)
set(CPackIFW_CMake_INCLUDED 1)
#=============================================================================
+# Framework version
+#=============================================================================
+
+if(CPACK_IFW_INSTALLERBASE_EXECUTABLE AND CPACK_IFW_DEVTOOL_EXECUTABLE)
+ execute_process(COMMAND
+ "${CPACK_IFW_INSTALLERBASE_EXECUTABLE}" --framework-version
+ OUTPUT_VARIABLE CPACK_IFW_FRAMEWORK_VERSION)
+ if(CPACK_IFW_FRAMEWORK_VERSION)
+ string(REPLACE " " ""
+ CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_FRAMEWORK_VERSION}")
+ string(REPLACE "\t" ""
+ CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_FRAMEWORK_VERSION}")
+ string(REPLACE "\n" ""
+ CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_FRAMEWORK_VERSION}")
+ if(CPACK_IFW_VERBOSE)
+ message(STATUS "Found QtIFW ${CPACK_IFW_FRAMEWORK_VERSION} version")
+ endif()
+ endif()
+endif()
+
+#=============================================================================
# Macro definition
#=============================================================================
@@ -514,4 +608,7 @@ macro(cpack_ifw_add_repository reponame)
endmacro()
+# Resolve package control script
+_cpack_ifw_resolve_script(CPACK_IFW_PACKAGE_CONTROL_SCRIPT)
+
endif() # NOT CPackIFW_CMake_INCLUDED
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index fdba90e..cb77fb8 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -1197,18 +1197,17 @@ function(cpack_rpm_generate_package)
set(CPACK_RPM_COMPRESSION_TYPE_TMP "")
endif()
- if(CPACK_PACKAGE_RELOCATABLE)
- set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
- endif()
- if(CPACK_RPM_PACKAGE_RELOCATABLE)
+ if(CPACK_PACKAGE_RELOCATABLE OR CPACK_RPM_PACKAGE_RELOCATABLE)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Trying to build a relocatable package")
endif()
if(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
message("CPackRPM:Warning: CPACK_SET_DESTDIR is set (=${CPACK_SET_DESTDIR}) while requesting a relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is not supported, the package won't be relocatable.")
+ set(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
else()
set(CPACK_RPM_PACKAGE_PREFIX ${CPACK_PACKAGING_INSTALL_PREFIX}) # kept for back compatibility (provided external RPM spec files)
cpack_rpm_prepare_relocation_paths()
+ set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
endif()
endif()
@@ -1686,7 +1685,7 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
message("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
- message("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
+ message("CPackRPM:Debug: *** ${RPMBUILDOUT} ***")
endif()
else()
if(ALIEN_EXECUTABLE)
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 97bebc0..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()
@@ -1866,7 +1868,18 @@ function(_ep_add_download_command name)
else()
_ep_is_dir_empty("${source_dir}" empty)
if(${empty})
- message(SEND_ERROR "error: no download info for '${name}' -- please specify existing/non-empty SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY, GIT_REPOSITORY, HG_REPOSITORY or DOWNLOAD_COMMAND")
+ message(SEND_ERROR
+ "No download info given for '${name}' and its source directory:\n"
+ " ${source_dir}\n"
+ "is not an existing non-empty directory. Please specify one of:\n"
+ " * SOURCE_DIR with an existing non-empty directory\n"
+ " * URL\n"
+ " * GIT_REPOSITORY\n"
+ " * HG_REPOSITORY\n"
+ " * CVS_REPOSITORY and CVS_MODULE\n"
+ " * SVN_REVISION\n"
+ " * DOWNLOAD_COMMAND"
+ )
endif()
endif()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index c844aed..05b552a 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -882,8 +882,10 @@ endif()
# Begin finding boost libraries
# ------------------------------------------------------------------------
+set(_Boost_VARS_LIB "")
foreach(c DEBUG RELEASE)
set(_Boost_VARS_LIB_${c} BOOST_LIBRARYDIR Boost_LIBRARY_DIR_${c})
+ list(APPEND _Boost_VARS_LIB ${_Boost_VARS_LIB_${c}})
_Boost_CHANGE_DETECT(_Boost_CHANGE_LIBDIR_${c} ${_Boost_VARS_DIR} ${_Boost_VARS_LIB_${c}} Boost_INCLUDE_DIR)
# Clear Boost_LIBRARY_DIR_${c} if it did not change but other input affecting the
# location did. We will find a new one based on the new inputs.
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index 76f702e..ad0bf98 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -131,21 +131,6 @@ if(NOT FLTK_DIR)
/usr/local/fltk
/usr/X11R6/include
- # Read from the CMakeSetup registry entries. It is likely that
- # FLTK will have been recently built.
- # TODO: Is this really a good idea? I can already hear the user screaming, "But
- # it worked when I configured the build LAST week!"
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
# Help the user find it if we cannot.
DOC "The ${FLTK_DIR_STRING}"
)
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index 930acca..154729f 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -96,19 +96,6 @@ if(NOT FLTK2_DIR)
/usr/local/fltk2
/usr/X11R6/include
- # Read from the CMakeSetup registry entries. It is likely that
- # FLTK2 will have been recently built.
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
# Help the user find it if we cannot.
DOC "The ${FLTK2_DIR_STRING}"
)
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index e6b5b0a..fccf877 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -115,11 +115,11 @@ function(GTEST_ADD_TESTS executable extra_args)
# obtain sources used for building that executable
get_property(ARGN TARGET ${executable} PROPERTY SOURCES)
endif()
- set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*")
+ set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*")
set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)")
foreach(source ${ARGN})
file(READ "${source}" contents)
- string(REGEX MATCHALL "${gtest_test_type_regex}\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
+ string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
foreach(hit ${found_tests})
string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 0d58e13..3bd6f1e 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -51,6 +51,7 @@
# bindings.
# HDF5_LIBRARIES - Required libraries for all requested bindings
# HDF5_FOUND - true if HDF5 was found on the system
+# HDF5_VERSION - HDF5 version in format Major.Minor.Release
# HDF5_LIBRARY_DIRS - the full set of library directories
# HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support
# HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler
@@ -59,6 +60,7 @@
# HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool
#=============================================================================
+# Copyright 2015 Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf
# Copyright 2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -335,15 +337,28 @@ if( NOT HDF5_FOUND )
# If the HDF5 include directory was found, open H5pubconf.h to determine if
# HDF5 was compiled with parallel IO support
set( HDF5_IS_PARALLEL FALSE )
+ set( HDF5_VERSION "" )
foreach( _dir IN LISTS HDF5_INCLUDE_DIRS )
- if( EXISTS "${_dir}/H5pubconf.h" )
- file( STRINGS "${_dir}/H5pubconf.h"
+ foreach(_hdr "${_dir}/H5pubconf.h" "${_dir}/H5pubconf-64.h" "${_dir}/H5pubconf-32.h")
+ if( EXISTS "${_hdr}" )
+ file( STRINGS "${_hdr}"
HDF5_HAVE_PARALLEL_DEFINE
REGEX "HAVE_PARALLEL 1" )
if( HDF5_HAVE_PARALLEL_DEFINE )
set( HDF5_IS_PARALLEL TRUE )
endif()
+ unset(HDF5_HAVE_PARALLEL_DEFINE)
+
+ file( STRINGS "${_hdr}"
+ HDF5_VERSION_DEFINE
+ REGEX "^[ \t]*#[ \t]*define[ \t]+H5_VERSION[ \t]+" )
+ if( "${HDF5_VERSION_DEFINE}" MATCHES
+ "H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+).*\"" )
+ set( HDF5_VERSION "${CMAKE_MATCH_1}" )
+ endif()
+ unset(HDF5_VERSION_DEFINE)
endif()
+ endforeach()
endforeach()
set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
"HDF5 library compiled with parallel IO support" )
@@ -357,8 +372,8 @@ if( NOT HDF5_FOUND )
endif()
-find_package_handle_standard_args( HDF5 DEFAULT_MSG
- HDF5_LIBRARIES
- HDF5_INCLUDE_DIRS
+find_package_handle_standard_args( HDF5
+ REQUIRED_VARS HDF5_LIBRARIES HDF5_INCLUDE_DIRS
+ VERSION_VAR HDF5_VERSION
)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index bb73853..9e43174 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -137,7 +137,7 @@ if(Java_JAVA_EXECUTABLE)
elseif(var MATCHES "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+)\"")
# Kaffe style
set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
- elseif(var MATCHES "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+)\"")
+ elseif(var MATCHES "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+.*)\"")
# OpenJDK ver 1.7.x on OpenBSD
set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
else()
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index b4beec3..028bf5a 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -134,7 +134,8 @@
# returns the suffix to be used for the mex files
# (platform/architecture dependant)
# :command:`matlab_get_version_from_matlab_run`
-# returns the version of Matlab, given the full directory of the Matlab program.
+# returns the version of Matlab, given the full directory of the Matlab
+# program.
#
#
# Known issues
@@ -918,7 +919,7 @@ function(matlab_add_mex )
PROPERTIES
CXX_VISIBILITY_PRESET "hidden"
C_VISIBILITY_PRESET "hidden"
- VISIBILITY_INLINES_HIDDEN "hidden"
+ VISIBILITY_INLINES_HIDDEN ON
)
# get_target_property(
@@ -1064,7 +1065,7 @@ if(Matlab_ROOT_DIR)
endif()
else()
# NOTFOUND indicates the code below to search for the version automatically
- if(NOT DEFINED Matlab_VERSION_STRING_INTERNAL)
+ if("${Matlab_VERSION_STRING_INTERNAL}" STREQUAL "")
list(APPEND _matlab_possible_roots "NOTFOUND" ${Matlab_ROOT_DIR}) # empty version
else()
list(APPEND _matlab_possible_roots ${Matlab_VERSION_STRING_INTERNAL} ${Matlab_ROOT_DIR}) # cached version
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 64ccde5..53c17f1 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -149,7 +149,7 @@ function(_pkgconfig_add_extra_path _extra_paths_var _var)
endif()
if(NOT _is_env)
if(NOT "${${_var}}" STREQUAL "")
- list(APPEND ${_extra_paths_var} ${CMAKE_PREFIX_PATH})
+ list(APPEND ${_extra_paths_var} ${${_var}})
endif()
else()
if(NOT "$ENV{${_var}}" STREQUAL "")
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 97666c8..3ce2c73 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -4,15 +4,13 @@
#
# Find the PostgreSQL installation.
#
-# In Windows, we make the assumption that, if the PostgreSQL files are
-# installed, the default directory will be C:\Program Files\PostgreSQL.
-#
# This module defines
#
# ::
#
# PostgreSQL_LIBRARIES - the PostgreSQL libraries needed for linking
# PostgreSQL_INCLUDE_DIRS - the directories of the PostgreSQL headers
+# PostgreSQL_LIBRARY_DIRS - the link directories for PostgreSQL libraries
# PostgreSQL_VERSION_STRING - the version of PostgreSQL found (since CMake 2.8.8)
#=============================================================================
@@ -39,7 +37,7 @@
# In Windows the default installation of PostgreSQL uses that as part of the path.
# E.g C:\Program Files\PostgreSQL\8.4.
# Currently, the following version numbers are known to this module:
-# "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
+# "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
#
# To use this variable just do something like this:
# set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4")
@@ -83,19 +81,27 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher
set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
- "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
+ "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
# Define additional search paths for root directories.
-if ( WIN32 )
- foreach (suffix ${PostgreSQL_KNOWN_VERSIONS} )
- set(PostgreSQL_ADDITIONAL_SEARCH_PATHS ${PostgreSQL_ADDITIONAL_SEARCH_PATHS} "C:/Program Files/PostgreSQL/${suffix}" )
- endforeach()
-endif()
set( PostgreSQL_ROOT_DIRECTORIES
ENV PostgreSQL_ROOT
${PostgreSQL_ROOT}
- ${PostgreSQL_ADDITIONAL_SEARCH_PATHS}
)
+foreach(suffix ${PostgreSQL_KNOWN_VERSIONS})
+ if(WIN32)
+ list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
+ "PostgreSQL/${suffix}/lib")
+ list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
+ "PostgreSQL/${suffix}/include")
+ list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
+ "PostgreSQL/${suffix}/include/server")
+ endif()
+ if(UNIX)
+ list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
+ "postgresql/${suffix}/server")
+ endif()
+endforeach()
#
# Look for an installation.
@@ -109,6 +115,7 @@ find_path(PostgreSQL_INCLUDE_DIR
pgsql
postgresql
include
+ ${PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES}
# Help the user find it if we cannot.
DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
)
@@ -123,6 +130,7 @@ find_path(PostgreSQL_TYPE_INCLUDE_DIR
pgsql/server
postgresql/server
include/server
+ ${PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES}
# Help the user find it if we cannot.
DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
)
@@ -133,15 +141,18 @@ set (PostgreSQL_LIBRARY_TO_FIND pq)
set (PostgreSQL_LIB_PREFIX "")
if ( WIN32 )
set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib")
- set ( PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
+ set (PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
endif()
-find_library( PostgreSQL_LIBRARY
+find_library(PostgreSQL_LIBRARY
NAMES ${PostgreSQL_LIBRARY_TO_FIND}
PATHS
${PostgreSQL_ROOT_DIRECTORIES}
PATH_SUFFIXES
lib
+ ${PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES}
+ # Help the user find it if we cannot.
+ DOC "The ${PostgreSQL_LIBRARY_DIR_MESSAGE}"
)
get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
@@ -169,18 +180,13 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(PostgreSQL
REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR
VERSION_VAR PostgreSQL_VERSION_STRING)
-set( PostgreSQL_FOUND ${POSTGRESQL_FOUND})
+set(PostgreSQL_FOUND ${POSTGRESQL_FOUND})
# Now try to get the include and library path.
if(PostgreSQL_FOUND)
-
set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} )
set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
-
- #message("Final PostgreSQL include dir: ${PostgreSQL_INCLUDE_DIRS}")
- #message("Final PostgreSQL library dir: ${PostgreSQL_LIBRARY_DIRS}")
- #message("Final PostgreSQL libraries: ${PostgreSQL_LIBRARIES}")
endif()
mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY )
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.
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 5509b28..2ff9aed 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -185,8 +185,12 @@ if(MSVC)
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs
"${MSVC${v}_CRT_DIR}/msvcp${v}0.dll"
- "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll"
)
+ if(NOT v VERSION_LESS 14)
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll")
+ else()
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll")
+ endif()
else()
set(__install__libs)
endif()
@@ -196,8 +200,12 @@ if(MSVC)
"${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT")
set(__install__libs ${__install__libs}
"${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll"
- "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll"
)
+ if(NOT v VERSION_LESS 14)
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll")
+ else()
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll")
+ endif()
endif()
endmacro()
diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake
index ebccbf6..77b7afe 100644
--- a/Modules/MatlabTestsRedirect.cmake
+++ b/Modules/MatlabTestsRedirect.cmake
@@ -17,7 +17,6 @@
# Usage: cmake
# -Dtest_timeout=180
-# -Dworking_directory="."
# -Doutput_directory=
# -Dadditional_paths=""
# -Dno_unittest_framework=""
diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake
index 3144ac4..1a46c10 100644
--- a/Modules/Platform/CYGWIN-GNU.cmake
+++ b/Modules/Platform/CYGWIN-GNU.cmake
@@ -53,5 +53,9 @@ macro(__cygwin_compiler_gnu lang)
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,--enable-auto-import")
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS}")
+ if(NOT CMAKE_RC_COMPILER_INIT)
+ set(CMAKE_RC_COMPILER_INIT windres)
+ endif()
+
enable_language(RC)
endmacro()
diff --git a/Modules/Platform/HP-UX-GNU-ASM.cmake b/Modules/Platform/HP-UX-GNU-ASM.cmake
new file mode 100644
index 0000000..613b859
--- /dev/null
+++ b/Modules/Platform/HP-UX-GNU-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/HP-UX-GNU)
+__hpux_compiler_gnu(ASM)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index c827c32..b571b16 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -138,6 +138,10 @@ macro(__windows_compiler_gnu lang)
endforeach()
endif()
+ if(NOT CMAKE_RC_COMPILER_INIT AND NOT CMAKE_GENERATOR_RC)
+ set(CMAKE_RC_COMPILER_INIT windres)
+ endif()
+
enable_language(RC)
endmacro()
diff --git a/Modules/Platform/Windows-Intel-Fortran.cmake b/Modules/Platform/Windows-Intel-Fortran.cmake
index 40523ff..0f9a10a 100644
--- a/Modules/Platform/Windows-Intel-Fortran.cmake
+++ b/Modules/Platform/Windows-Intel-Fortran.cmake
@@ -5,7 +5,7 @@ set(CMAKE_Fortran_MODDIR_FLAG "-module:")
set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
__windows_compiler_intel(Fortran)
set (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads")
-set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full /dbglibs")
+set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/Od /debug:full /dbglibs")
set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O1 /D NDEBUG")
set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O2 /D NDEBUG")
set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full /D NDEBUG")
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 2905cee..13fe8bc 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -298,6 +298,9 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
+ if(NOT CMAKE_RC_COMPILER_INIT)
+ set(CMAKE_RC_COMPILER_INIT rc)
+ endif()
if(NOT CMAKE_RC_FLAGS_INIT)
set(CMAKE_RC_FLAGS_INIT "${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}")
endif()
diff --git a/Modules/Squish4RunTestCase.sh b/Modules/Squish4RunTestCase.sh
index abd5deb..39a3907 100755
--- a/Modules/Squish4RunTestCase.sh
+++ b/Modules/Squish4RunTestCase.sh
@@ -11,11 +11,11 @@ SETTINGSGROUP=$7
$SQUISHSERVER --stop > /dev/null 2>&1
echo "Adding AUT... $SQUISHSERVER --settingsGroup $SETTINGSGROUP --config addAUT $AUT $AUTDIR"
-$SQUISHSERVER --settingsGroup "$SETTINGSGROUP" --config addAUT "$AUT" "$AUTDIR" || exit -1
+$SQUISHSERVER --settingsGroup "$SETTINGSGROUP" --config addAUT "$AUT" "$AUTDIR" || exit 255
# sleep 1
echo "Starting the squish server... $SQUISHSERVER --daemon"
-$SQUISHSERVER --daemon || exit -1
+$SQUISHSERVER --daemon || exit 255
# sleep 2
echo "Running the test case...$SQUISHRUNNER --settingsGroup $SETTINGSGROUP --testsuite $TESTSUITE --testcase $TESTCASE"
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 1862876..96b0b35 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -204,7 +204,8 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
${swig_include_dirs}
-o "${swig_generated_file_fullname}"
"${swig_source_file_fullname}"
- DEPENDS "${swig_source_file_fullname}" ${SWIG_MODULE_${name}_EXTRA_DEPS}
+ MAIN_DEPENDENCY "${swig_source_file_fullname}"
+ DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
COMMENT "Swig source")
set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files}
PROPERTIES GENERATED 1)
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index f4dcb21..a3b73bb 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -246,10 +246,10 @@ function(write_compiler_detection_header
file_keyword file_arg
prefix_keyword prefix_arg
)
- if (NOT file_keyword STREQUAL FILE)
+ if (NOT "x${file_keyword}" STREQUAL "xFILE")
message(FATAL_ERROR "write_compiler_detection_header: FILE parameter missing.")
endif()
- if (NOT prefix_keyword STREQUAL PREFIX)
+ if (NOT "x${prefix_keyword}" STREQUAL "xPREFIX")
message(FATAL_ERROR "write_compiler_detection_header: PREFIX parameter missing.")
endif()
set(options)