summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackDeb.cmake5
-rw-r--r--Modules/CPackRPM.cmake138
-rw-r--r--Modules/GenerateExportHeader.cmake103
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx5
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
5 files changed, 165 insertions, 88 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 0975c5b..26433bb 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -133,6 +133,11 @@ IF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
ENDIF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
+FIND_PROGRAM(FAKEROOT_EXECUTABLE fakeroot)
+IF(FAKEROOT_EXECUTABLE)
+ SET(CPACK_DEBIAN_FAKEROOT_EXECUTABLE ${FAKEROOT_EXECUTABLE})
+ENDIF(FAKEROOT_EXECUTABLE)
+
IF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# dpkg-shlibdeps is a Debian utility for generating dependency list
FIND_PROGRAM(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps)
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index fa4bb05..51c8eac 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -132,24 +132,32 @@
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
# Mandatory : NO
# Default : -
-# May be used to embbed a pre (un)installation script in the spec file.
+# May be used to embed a pre (un)installation script in the spec file.
# The refered script file(s) will be read and directly
# put after the %pre or %preun section
+# If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
+# each component can be overriden with
+# CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE and
+# CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE
# One may verify which scriptlet has been included with
# rpm -qp --scripts package.rpm
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE
# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
# Mandatory : NO
# Default : -
-# May be used to embbed a post (un)installation script in the spec file.
+# May be used to embed a post (un)installation script in the spec file.
# The refered script file(s) will be read and directly
# put after the %post or %postun section
+# If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
+# each component can be overriden with
+# CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE and
+# CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE
# One may verify which scriptlet has been included with
# rpm -qp --scripts package.rpm
# CPACK_RPM_CHANGELOG_FILE
# Mandatory : NO
# Default : -
-# May be used to embbed a changelog in the spec file.
+# May be used to embed a changelog in the spec file.
# The refered file will be read and directly put after the %changelog
# section.
@@ -237,6 +245,17 @@ IF(ALIEN_EXECUTABLE)
MESSAGE(STATUS "alien found, we may be on a Debian based distro.")
ENDIF(ALIEN_EXECUTABLE)
+# Are we packaging components ?
+IF(CPACK_RPM_PACKAGE_COMPONENT)
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
+ELSE(CPACK_RPM_PACKAGE_COMPONENT)
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
+ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
+
#
# Use user-defined RPM specific variables value
# or generate reasonable default value from
@@ -396,47 +415,77 @@ IF(CPACK_RPM_SPEC_INSTALL_POST)
SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_SPEC_INSTALL_POST)
-# CPACK_RPM_POST_INSTALL_SCRIPT_FILE
-# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
-# May be used to embbed a post (un)installation script in the spec file.
+# CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE)
+# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE)
+# May be used to embed a post (un)installation script in the spec file.
# The refered script file(s) will be read and directly
# put after the %post or %postun section
-if(CPACK_RPM_POST_INSTALL_SCRIPT_FILE)
- if(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
- file(READ ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTINSTALL)
- else(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
- message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}> does not exists - ignoring")
- endif(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
-endif(CPACK_RPM_POST_INSTALL_SCRIPT_FILE)
-
-if(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE)
- if(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
- file(READ ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTUNINSTALL)
- else(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
- message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring")
- endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
-endif(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE)
-
-# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
-# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
+if(CPACK_RPM_PACKAGE_COMPONENT)
+ if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE)
+ set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE})
+ else()
+ set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
+ endif()
+ if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
+ set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE})
+ else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
+ set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
+ endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
+else(CPACK_RPM_PACKAGE_COMPONENT)
+ set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
+ set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
+endif(CPACK_RPM_PACKAGE_COMPONENT)
+if(CPACK_RPM_POST_INSTALL_READ_FILE)
+ if(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
+ file(READ ${CPACK_RPM_POST_INSTALL_READ_FILE} CPACK_RPM_SPEC_POSTINSTALL)
+ else(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
+ message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_READ_FILE}> does not exists - ignoring")
+ endif(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
+endif(CPACK_RPM_POST_INSTALL_READ_FILE)
+
+if(CPACK_RPM_POST_UNINSTALL_READ_FILE)
+ if(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
+ file(READ ${CPACK_RPM_POST_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_POSTUNINSTALL)
+ else(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
+ message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_READ_FILE}> does not exists - ignoring")
+ endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
+endif(CPACK_RPM_POST_UNINSTALL_READ_FILE)
+
+# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE)
+# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE)
# May be used to embed a pre (un)installation script in the spec file.
# The refered script file(s) will be read and directly
# put after the %pre or %preun section
-if(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE)
- if(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
- file(READ ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREINSTALL)
- else(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
- message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}> does not exists - ignoring")
- endif(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
-endif(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE)
-
-if(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE)
- if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
- file(READ ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREUNINSTALL)
- else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
- message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring")
- endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
-endif(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE)
+if(CPACK_RPM_PACKAGE_COMPONENT)
+ if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
+ set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE})
+ else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
+ set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
+ endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
+ if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
+ set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE})
+ else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
+ set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
+ endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
+else(CPACK_RPM_PACKAGE_COMPONENT)
+ set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
+ set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
+endif(CPACK_RPM_PACKAGE_COMPONENT)
+if(CPACK_RPM_PRE_INSTALL_READ_FILE)
+ if(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
+ file(READ ${CPACK_RPM_PRE_INSTALL_READ_FILE} CPACK_RPM_SPEC_PREINSTALL)
+ else(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
+ message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_READ_FILE}> does not exists - ignoring")
+ endif(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
+endif(CPACK_RPM_PRE_INSTALL_READ_FILE)
+
+if(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
+ if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
+ file(READ ${CPACK_RPM_PRE_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_PREUNINSTALL)
+ else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
+ message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_READ_FILE}> does not exists - ignoring")
+ endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
+endif(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
# CPACK_RPM_CHANGELOG_FILE
# May be used to embed a changelog in the spec file.
@@ -478,17 +527,6 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
-
-# Are we packaging components ?
-IF(CPACK_RPM_PACKAGE_COMPONENT)
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
- SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
-ELSE(CPACK_RPM_PACKAGE_COMPONENT)
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
- SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
-ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
# Use files tree to construct files command (spec file)
# We should not forget to include symlinks (thus -o -type l)
# We should include directory as well (thus -type d)
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 4eb67b5..7df274e 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -21,11 +21,15 @@
# ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] )
#
# By default GENERATE_EXPORT_HEADER() generates macro names in a file name
-# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS macro
-# adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on Windows
-# which does not need extra compiler flags for exporting support.
+# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS function
+# adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on
+# Windows which does not need extra compiler flags for exporting support. You
+# may optionally pass a single argument to ADD_COMPILER_EXPORT_FLAGS that will
+# be populated with the required CXX_FLAGS required to enable visibility support
+# for the compiler/architecture in use.
#
-# This means that in the simplest case, users of these functions will be equivalent to:
+# This means that in the simplest case, users of these functions will be
+# equivalent to:
#
# add_compiler_export_flags()
# add_library(somelib someclass.cpp)
@@ -43,8 +47,8 @@
# ...
# };
#
-# The CMake fragment will generate a file in the ${CMAKE_CURRENT_BUILD_DIR} called
-# somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT,
+# The CMake fragment will generate a file in the ${CMAKE_CURRENT_BUILD_DIR}
+# called somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT,
# SOMELIB_DEPRECATED, SOMELIB_DEPRECATED_EXPORT and SOMELIB_DEPRECATED_NO_EXPORT.
# The resulting file should be installed with other headers in the library.
#
@@ -86,11 +90,14 @@
# add_library(shared_variant SHARED ${lib_SRCS})
# add_library(static_variant ${lib_SRCS})
# generate_export_header(shared_variant BASE_NAME libshared_and_static)
-# set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE)
+# set_target_properties(static_variant PROPERTIES
+# COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE)
#
-# This will cause the export macros to expand to nothing when building the static library.
+# This will cause the export macros to expand to nothing when building the
+# static library.
#
-# If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED will be defined
+# If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED
+# will be defined
# This macro can be used to remove deprecated code from preprocessor output.
#
# option(EXCLUDE_DEPRECATED "Exclude deprecated parts of the library" FALSE)
@@ -122,7 +129,6 @@
#
# Generates the macros VTK_SOMELIB_EXPORT etc.
-
#=============================================================================
# Copyright 2011 Stephen Kelly <steveire@gmail.com>
#
@@ -139,10 +145,10 @@
include(CMakeParseArguments)
include(CheckCXXCompilerFlag)
-
# TODO: Install this macro separately?
macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT)
- check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; } int main() { return somefunc();}" ${_RESULT}
+ check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
+ int main() { return somefunc();}" ${_RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
@@ -155,13 +161,16 @@ endmacro()
macro(_test_compiler_hidden_visibility)
- if (CMAKE_COMPILER_IS_GNUCXX)
- exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ exec_program(${CMAKE_C_COMPILER} ARGS --version
+ OUTPUT_VARIABLE _gcc_version_info)
+ string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
+ _gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here:
if(NOT _gcc_version)
- string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}")
+ string(REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
+ _gcc_version "${_gcc_version_info}")
endif()
if(${_gcc_version} VERSION_LESS "4.2")
@@ -171,8 +180,10 @@ macro(_test_compiler_hidden_visibility)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
- exec_program(${CMAKE_CXX_COMPILER} ARGS -V OUTPUT_VARIABLE _intel_version_info)
- string (REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1" _intel_version "${_intel_version_info}")
+ exec_program(${CMAKE_CXX_COMPILER} ARGS -V
+ OUTPUT_VARIABLE _intel_version_info)
+ string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1"
+ _intel_version "${_intel_version_info}")
if(${_intel_version} VERSION_LESS "12.0")
set(_INTEL_TOO_OLD TRUE)
@@ -184,7 +195,7 @@ macro(_test_compiler_hidden_visibility)
# Exclude XL here because it misinterprets -fvisibility=hidden even though
# the check_cxx_compiler_flag passes
# http://www.cdash.org/CDash/testDetails.php?test=109109951&build=1419259
- if (NOT GCC_TOO_OLD
+ if(NOT GCC_TOO_OLD
AND NOT _INTEL_TOO_OLD
AND NOT WIN32
AND NOT CYGWIN
@@ -192,8 +203,10 @@ macro(_test_compiler_hidden_visibility)
AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI
AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom)
check_cxx_compiler_flag(-fvisibility=hidden COMPILER_HAS_HIDDEN_VISIBILITY)
- check_cxx_compiler_flag(-fvisibility-inlines-hidden COMPILER_HAS_HIDDEN_INLINE_VISIBILITY)
- option(USE_COMPILER_HIDDEN_VISIBILITY "Use HIDDEN visibility support if available." ON)
+ check_cxx_compiler_flag(-fvisibility-inlines-hidden
+ COMPILER_HAS_HIDDEN_INLINE_VISIBILITY)
+ option(USE_COMPILER_HIDDEN_VISIBILITY
+ "Use HIDDEN visibility support if available." ON)
mark_as_advanced(USE_COMPILER_HIDDEN_VISIBILITY)
endif()
endmacro()
@@ -204,18 +217,23 @@ macro(_test_compiler_has_deprecated)
OR GCC_TOO_OLD
OR "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI
OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom)
- set(COMPILER_HAS_DEPRECATED "" CACHE INTERNAL "Compiler support for a deprecated attribute")
+ set(COMPILER_HAS_DEPRECATED "" CACHE INTERNAL
+ "Compiler support for a deprecated attribute")
else()
- _check_cxx_compiler_attribute("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED_ATTR)
+ _check_cxx_compiler_attribute("__attribute__((__deprecated__))"
+ COMPILER_HAS_DEPRECATED_ATTR)
if(COMPILER_HAS_DEPRECATED_ATTR)
- set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_ATTR}" CACHE INTERNAL "Compiler support for a deprecated attribute")
+ set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_ATTR}"
+ CACHE INTERNAL "Compiler support for a deprecated attribute")
else()
- _check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED)
+ _check_cxx_compiler_attribute("__declspec(deprecated)"
+ COMPILER_HAS_DEPRECATED)
endif()
endif()
endmacro()
-get_filename_component(_GENERATE_EXPORT_HEADER_MODULE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(_GENERATE_EXPORT_HEADER_MODULE_DIR
+ "${CMAKE_CURRENT_LIST_FILE}" PATH)
macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY)
set(DEFINE_DEPRECATED)
@@ -246,10 +264,13 @@ endmacro()
macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
# Option overrides
set(options DEFINE_NO_DEPRECATED)
- set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE NO_DEPRECATED_MACRO_NAME)
+ set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME
+ DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE
+ NO_DEPRECATED_MACRO_NAME)
set(multiValueArgs)
- cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}"
+ ${ARGN})
set(BASE_NAME "${TARGET_LIBRARY}")
@@ -266,7 +287,8 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME_LOWER}_export.h")
set(DEPRECATED_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_DEPRECATED")
set(STATIC_DEFINE "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_STATIC_DEFINE")
- set(NO_DEPRECATED_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_DEPRECATED")
+ set(NO_DEPRECATED_MACRO_NAME
+ "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_DEPRECATED")
if(_GEH_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to GENERATE_EXPORT_HEADER(): \"${_GEH_UNPARSED_ARGUMENTS}\"")
@@ -292,23 +314,25 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
set(STATIC_DEFINE ${_GEH_PREFIX_NAME}${_GEH_STATIC_DEFINE})
endif()
- if (_GEH_DEFINE_NO_DEPRECATED)
+ if(_GEH_DEFINE_NO_DEPRECATED)
set(DEFINE_NO_DEPRECATED TRUE)
endif()
- if (_GEH_NO_DEPRECATED_MACRO_NAME)
- set(NO_DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME})
+ if(_GEH_NO_DEPRECATED_MACRO_NAME)
+ set(NO_DEPRECATED_MACRO_NAME
+ ${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME})
endif()
set(INCLUDE_GUARD_NAME "${EXPORT_MACRO_NAME}_H")
get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL)
- if (NOT EXPORT_IMPORT_CONDITION)
+ if(NOT EXPORT_IMPORT_CONDITION)
set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS)
endif()
- configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in" "${EXPORT_FILE_NAME}" @ONLY)
+ configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in"
+ "${EXPORT_FILE_NAME}" @ONLY)
endmacro()
function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
@@ -333,7 +357,7 @@ function(add_compiler_export_flags)
_test_compiler_has_deprecated()
if(NOT (USE_COMPILER_HIDDEN_VISIBILITY AND COMPILER_HAS_HIDDEN_VISIBILITY))
- message(WARNING "Compiler doesn't have hidden visibility")
+ # Just return if there are no flags to add.
return()
endif()
@@ -342,5 +366,12 @@ function(add_compiler_export_flags)
if(COMPILER_HAS_HIDDEN_INLINE_VISIBILITY)
set (EXTRA_FLAGS "${EXTRA_FLAGS} -fvisibility-inlines-hidden")
endif()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE)
+
+ # Either return the extra flags needed in the supplied argument, or to the
+ # CMAKE_CXX_FLAGS if no argument is supplied.
+ if(ARGV0)
+ set(${ARGV0} "${EXTRA_FLAGS}" PARENT_SCOPE)
+ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE)
+ endif()
endfunction()
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 8c19bbd..b707e96 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -392,7 +392,10 @@ int cmCPackDebGenerator::createDeb()
}
std::string cmd;
- cmd = "\"";
+ if (NULL != this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE")) {
+ cmd += this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE");
+ }
+ cmd += " \"";
cmd += cmakeExecutable;
cmd += "\" -E tar cfz data.tar.gz ";
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index df6076f..fa561b5 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011)
SET(KWSYS_DATE_STAMP_MONTH 09)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 20)
+SET(KWSYS_DATE_STAMP_DAY 21)