summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackDeb.cmake22
-rw-r--r--Modules/FindQt4.cmake68
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake16
-rw-r--r--Modules/Qt4Macros.cmake6
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx357
-rw-r--r--Source/CPack/cmCPackDebGenerator.h18
-rw-r--r--Source/CTest/cmCTestGIT.cxx45
-rw-r--r--Source/CTest/cmCTestGIT.h2
-rw-r--r--Source/cmUseMangledMesaCommand.h14
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
-rw-r--r--Tests/CMakeLists.txt6
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in4
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in4
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in4
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in4
15 files changed, 494 insertions, 78 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 6c3398e..469f08f 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -311,6 +311,28 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
+# Are we packaging components ?
+IF(CPACK_DEB_PACKAGE_COMPONENT)
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "/${CPACK_DEB_PACKAGE_COMPONENT}")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_DEB_PACKAGE_COMPONENT}")
+ELSE(CPACK_DEB_PACKAGE_COMPONENT)
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
+ SET(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
+ENDIF(CPACK_DEB_PACKAGE_COMPONENT)
+
+# 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}")
+ MESSAGE("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
+ MESSAGE("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
+ MESSAGE("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
+ MESSAGE("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
+ MESSAGE("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
+ MESSAGE("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ MESSAGE("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
+ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
# For debian source packages:
# debian/control
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index b2a89f7..0a11cfb 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -787,7 +787,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
PATHS
${QT_HEADERS_DIR}/${QT_MODULE}
${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
# phonon doesn't seem consistent, let's try phonondefs.h for some
# installations
@@ -796,7 +796,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
PATHS
${QT_HEADERS_DIR}/${QT_MODULE}
${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
ENDIF(${QT_MODULE} STREQUAL "phonon")
ENDFOREACH(QT_MODULE)
@@ -806,11 +806,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
# Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
ENDIF(Q_WS_WIN)
@@ -819,7 +819,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
PATHS
${QT_HEADERS_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
# Set QT_QTASSISTANT_INCLUDE_DIR
@@ -827,7 +827,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
# Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
@@ -835,7 +835,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
########################################
@@ -849,11 +849,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE
NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4
- PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG
NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4
- PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
ENDFOREACH(QT_MODULE)
@@ -863,26 +863,26 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
# Set QT_QTDESIGNERCOMPONENTS_LIBRARY
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTMAIN_LIBRARY
IF(Q_WS_WIN)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
ENDIF(Q_WS_WIN)
# Set QT_QTASSISTANTCLIENT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTASSISTANT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTHELP_LIBRARY
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
@@ -945,67 +945,67 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
FIND_PROGRAM(QT_MOC_EXECUTABLE
NAMES moc-qt4 moc
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_UIC_EXECUTABLE
NAMES uic-qt4 uic
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_UIC3_EXECUTABLE
NAMES uic3
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_RCC_EXECUTABLE
NAMES rcc
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
NAMES qdbuscpp2xml
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
NAMES qdbusxml2cpp
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
NAMES lupdate-qt4 lupdate
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
NAMES lrelease-qt4 lrelease
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
NAMES qcollectiongenerator-qt4 qcollectiongenerator
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
NAMES designer-qt4 designer
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
NAMES linguist-qt4 linguist
PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
IF (QT_MOC_EXECUTABLE)
@@ -1085,11 +1085,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
IF(QT_IS_STATIC)
FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_RELEASE
NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_DEBUG
NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
_QT4_ADJUST_LIB_VARS(${QT_PLUGIN})
ELSE(QT_IS_STATIC)
@@ -1098,11 +1098,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_MODULE_SUFFIX} ${CMAKE_SHARED_LIBRARY_SUFFIX})
FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_RELEASE
NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_DEBUG
NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
- PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
MARK_AS_ADVANCED(QT_${_upper_qt_plugin}_PLUGIN_RELEASE QT_${_upper_qt_plugin}_PLUGIN_DEBUG)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT})
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 2dfe8b1..59e5ec1 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -70,9 +70,11 @@ IF(MSVC)
IF(MSVC80)
# Find the runtime library redistribution directory.
+ GET_FILENAME_COMPONENT(msvc_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE)
FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
+ "${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
@@ -103,10 +105,14 @@ IF(MSVC)
IF(MSVC90)
# Find the runtime library redistribution directory.
+ GET_FILENAME_COMPONENT(msvc_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE)
+ GET_FILENAME_COMPONENT(msvc_express_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE)
FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist"
+ "${msvc_install_dir}/../../VC/redist"
+ "${msvc_express_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
MARK_AS_ADVANCED(MSVC90_REDIST_DIR)
@@ -137,9 +143,11 @@ IF(MSVC)
IF(MSVC10)
# Find the runtime library redistribution directory.
+ GET_FILENAME_COMPONENT(msvc_install_dir
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]" ABSOLUTE)
FIND_PATH(MSVC10_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT
PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
+ "${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
"$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/VC/redist"
"$ENV{ProgramFiles(x86)}/Microsoft Visual Studio 10.0/VC/redist"
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 86a7404..6d7a3ec 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -107,10 +107,8 @@ MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
ENDIF(_moc_outfile_dir)
SET (_moc_parameters_file ${outfile}_parameters)
SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
- FILE (REMOVE ${_moc_parameters_file})
- FOREACH(arg ${_moc_parameters})
- FILE (APPEND ${_moc_parameters_file} "${arg}\n")
- ENDFOREACH(arg)
+ STRING (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
+ FILE (WRITE ${_moc_parameters_file} "${_moc_parameters}")
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters
DEPENDS ${infile}
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 47a1ff6..d3320c0 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -51,14 +51,256 @@ int cmCPackDebGenerator::InitializeInternal()
}
//----------------------------------------------------------------------
+int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
+{
+ int retval = 1;
+ /* Reset package file name list it will be populated during the
+ * component packaging run*/
+ packageFileNames.clear();
+ std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
+
+ // The default behavior is to have one package by component group
+ // unless CPACK_COMPONENTS_IGNORE_GROUP is specified.
+ if (!ignoreGroup)
+ {
+ std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
+ for (compGIt=this->ComponentGroups.begin();
+ compGIt!=this->ComponentGroups.end(); ++compGIt)
+ {
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
+ << compGIt->first
+ << std::endl);
+ // Begin the archive for this group
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-"+compGIt->first + this->GetOutputExtension()
+ );
+
+ localToplevel += "/"+ compGIt->first;
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+ // Tell CPackDeb.cmake the name of the component GROUP.
+ this->SetOption("CPACK_DEB_PACKAGE_COMPONENT",compGIt->first.c_str());
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+
+ cmsys::Glob gl;
+ std::string findExpr(this->GetOption("WDIR"));
+ findExpr += "/*";
+ gl.RecurseOn();
+ if ( !gl.FindFiles(findExpr) )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find any files in the installed directory" << std::endl);
+ return 0;
+ }
+ packageFiles = gl.GetFiles();
+
+ int res = createDeb();
+ if (res != 1)
+ {
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ }
+ }
+ // CPACK_COMPONENTS_IGNORE_GROUPS is set
+ // We build 1 package per component
+ else
+ {
+ std::map<std::string, cmCPackComponent>::iterator compIt;
+ for (compIt=this->Components.begin();
+ compIt!=this->Components.end(); ++compIt )
+ {
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")
+ )
+ +"-"+compIt->first + this->GetOutputExtension());
+
+ localToplevel += "/"+ compIt->first;
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+
+ this->SetOption("CPACK_DEB_PACKAGE_COMPONENT",compIt->first.c_str());
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+
+ cmsys::Glob gl;
+ std::string findExpr(this->GetOption("WDIR"));
+ findExpr += "/*";
+ gl.RecurseOn();
+ if ( !gl.FindFiles(findExpr) )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find any files in the installed directory" << std::endl);
+ return 0;
+ }
+ packageFiles = gl.GetFiles();
+
+ int res = createDeb();
+ if (res != 1)
+ {
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ }
+ }
+ return retval;
+}
+
+//----------------------------------------------------------------------
+int cmCPackDebGenerator::PackageComponentsAllInOne(bool allComponent)
+{
+ int retval = 1;
+ std::string compInstDirName;
+ /* Reset package file name list it will be populated during the
+ * component packaging run*/
+ packageFileNames.clear();
+ std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
+
+ // all GROUP in one vs all COMPONENT in one
+ if (allComponent)
+ {
+ compInstDirName = "ALL_COMPONENTS_IN_ONE";
+ }
+ else
+ {
+ compInstDirName = "ALL_GROUPS_IN_ONE";
+ }
+
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Packaging all groups in one package..."
+ "(CPACK_COMPONENTS_ALL_[GROUPS_]IN_ONE_PACKAGE is set)"
+ << std::endl);
+
+ // The ALL GROUPS in ONE package case
+ std::string localToplevel(initialTopLevel);
+ std::string packageFileName(
+ cmSystemTools::GetParentDirectory(toplevel.c_str())
+ );
+ std::string outputFileName(
+ std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ + this->GetOutputExtension()
+ );
+ // all GROUP in one vs all COMPONENT in one
+ localToplevel += "/"+compInstDirName;
+
+ /* replace the TEMP DIRECTORY with the component one */
+ this->SetOption("CPACK_TEMPORARY_DIRECTORY",localToplevel.c_str());
+ packageFileName += "/"+ outputFileName;
+ /* replace proposed CPACK_OUTPUT_FILE_NAME */
+ this->SetOption("CPACK_OUTPUT_FILE_NAME",outputFileName.c_str());
+ /* replace the TEMPORARY package file name */
+ this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ packageFileName.c_str());
+ // Tell CPackDeb.cmake the name of the component GROUP.
+ this->SetOption("CPACK_DEB_PACKAGE_COMPONENT",compInstDirName.c_str());
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+
+ cmsys::Glob gl;
+ std::string findExpr(this->GetOption("WDIR"));
+ findExpr += "/*";
+ gl.RecurseOn();
+ if ( !gl.FindFiles(findExpr) )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find any files in the installed directory" << std::endl);
+ return 0;
+ }
+ packageFiles = gl.GetFiles();
+
+ int res = createDeb();
+ if (res != 1)
+ {
+ retval = 0;
+ }
+ // add the generated package to package file names list
+ packageFileNames.push_back(packageFileName);
+ return retval;
+}
+
+//----------------------------------------------------------------------
int cmCPackDebGenerator::PackageFiles()
{
- this->ReadListFile("CPackDeb.cmake");
+ int retval = -1;
+
+ /* Are we in the component packaging case */
+ if (SupportsComponentInstallation()) {
+ // CASE 1 : COMPONENT ALL-IN-ONE package
+ // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
+ // then the package file is unique and should be open here.
+ if (allComponentInOne ||
+ (allGroupInOne && (!this->ComponentGroups.empty()))
+ )
+ {
+ return PackageComponentsAllInOne(allComponentInOne);
+ }
+ // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one)
+ // There will be 1 package for each component group
+ // however one may require to ignore component group and
+ // in this case you'll get 1 package for each component.
+ else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup))
+ {
+ return PackageComponents(ignoreComponentGroup);
+ }
+ }
+ // CASE 3 : NON COMPONENT package.
+ else
+ {
+ if (!this->ReadListFile("CPackDeb.cmake"))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Error while execution CPackDeb.cmake" << std::endl);
+ retval = 0;
+ }
+ packageFiles = files;
+ return createDeb();
+ }
+ return retval;
+}
+
+int cmCPackDebGenerator::createDeb()
+{
const char* cmakeExecutable = this->GetOption("CMAKE_COMMAND");
// debian-binary file
std::string dbfilename;
- dbfilename = toplevel;
+ dbfilename += this->GetOption("WDIR");
dbfilename += "/debian-binary";
{ // the scope is needed for cmGeneratedFileStream
cmGeneratedFileStream out(dbfilename.c_str());
@@ -68,7 +310,7 @@ int cmCPackDebGenerator::PackageFiles()
// control file
std::string ctlfilename;
- ctlfilename = toplevel;
+ ctlfilename = this->GetOption("WDIR");
ctlfilename += "/control";
// debian policy enforce lower case for package name
@@ -158,8 +400,9 @@ int cmCPackDebGenerator::PackageFiles()
{
std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
dirName += '/';
- for (std::vector<std::string>::const_iterator fileIt = files.begin();
- fileIt != files.end(); ++ fileIt )
+ for (std::vector<std::string>::const_iterator fileIt =
+ packageFiles.begin();
+ fileIt != packageFiles.end(); ++ fileIt )
{
totalSize += cmSystemTools::FileLength(fileIt->c_str());
}
@@ -178,14 +421,22 @@ int cmCPackDebGenerator::PackageFiles()
// now add all directories which have to be compressed
// collect all top level install dirs for that
// e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would give /usr and /opt
- size_t topLevelLength = toplevel.length();
+ size_t topLevelLength = std::string(this->GetOption("WDIR")).length();
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "WDIR: \"" << this->GetOption("WDIR")
+ << "\", length = " << topLevelLength
+ << std::endl);
std::set<std::string> installDirs;
- for (std::vector<std::string>::const_iterator fileIt = files.begin();
- fileIt != files.end(); ++ fileIt )
+ for (std::vector<std::string>::const_iterator fileIt =
+ packageFiles.begin();
+ fileIt != packageFiles.end(); ++ fileIt )
{
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "FILEIT: \"" << *fileIt << "\""
+ << std::endl);
std::string::size_type slashPos = fileIt->find('/', topLevelLength+1);
- std::string relativeDir = fileIt->substr(topLevelLength,
+ std::string relativeDir = fileIt->substr(topLevelLength,
slashPos - topLevelLength);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "RELATIVEDIR: \"" << relativeDir
+ << "\"" << std::endl);
if (installDirs.find(relativeDir) == installDirs.end())
{
installDirs.insert(relativeDir);
@@ -195,11 +446,11 @@ int cmCPackDebGenerator::PackageFiles()
}
std::string output;
- int retVal = -1;
+ int retval = -1;
int res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
- &retVal, toplevel.c_str(), this->GeneratorVerbose, 0);
+ &retval, this->GetOption("WDIR"), this->GeneratorVerbose, 0);
- if ( !res || retVal )
+ if ( !res || retval )
{
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/Deb.log";
@@ -215,15 +466,18 @@ int cmCPackDebGenerator::PackageFiles()
}
std::string md5filename;
- md5filename = toplevel;
+ md5filename = this->GetOption("WDIR");
md5filename += "/md5sums";
{ // the scope is needed for cmGeneratedFileStream
cmGeneratedFileStream out(md5filename.c_str());
std::vector<std::string>::const_iterator fileIt;
- std::string topLevelWithTrailingSlash = toplevel;
+// std::string topLevelWithTrailingSlash = toplevel;
+ std::string topLevelWithTrailingSlash =
+ this->GetOption("CPACK_TEMPORARY_DIRECTORY");
topLevelWithTrailingSlash += '/';
- for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
+ for ( fileIt = packageFiles.begin();
+ fileIt != packageFiles.end(); ++ fileIt )
{
cmd = "\"";
cmd += cmakeExecutable;
@@ -233,32 +487,31 @@ int cmCPackDebGenerator::PackageFiles()
//std::string output;
//int retVal = -1;
res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
- &retVal, toplevel.c_str(), this->GeneratorVerbose, 0);
+ &retval, toplevel.c_str(), this->GeneratorVerbose, 0);
// debian md5sums entries are like this:
// 014f3604694729f3bf19263bac599765 usr/bin/ccmake
// thus strip the full path (with the trailing slash)
- cmSystemTools::ReplaceString(output,
+ cmSystemTools::ReplaceString(output,
topLevelWithTrailingSlash.c_str(), "");
out << output;
}
- // each line contains a eol.
+ // each line contains a eol.
// Do not end the md5sum file with yet another (invalid)
}
-
cmd = "\"";
cmd += cmakeExecutable;
cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums";
- const char* controlExtra =
+ const char* controlExtra =
this->GetOption("CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA");
if( controlExtra )
- {
+ {
std::vector<std::string> controlExtraList;
cmSystemTools::ExpandListArgument(controlExtra, controlExtraList);
- for(std::vector<std::string>::iterator i =
+ for(std::vector<std::string>::iterator i =
controlExtraList.begin(); i != controlExtraList.end(); ++i)
{
- std::string filenamename =
+ std::string filenamename =
cmsys::SystemTools::GetFilenameName(i->c_str());
std::string localcopy = toplevel;
localcopy += "/";
@@ -274,9 +527,9 @@ int cmCPackDebGenerator::PackageFiles()
}
}
res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
- &retVal, toplevel.c_str(), this->GeneratorVerbose, 0);
+ &retval, this->GetOption("WDIR"), this->GeneratorVerbose, 0);
- if ( !res || retVal )
+ if ( !res || retval )
{
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/Deb.log";
@@ -295,24 +548,70 @@ int cmCPackDebGenerator::PackageFiles()
// since debian packages require BSD ar (most Linux distros and even
// FreeBSD and NetBSD ship GNU ar) we use a copy of OpenBSD ar here.
std::vector<std::string> arFiles;
- std::string topLevelString = toplevel;
+ std::string topLevelString = this->GetOption("WDIR");
topLevelString += "/";
arFiles.push_back(topLevelString + "debian-binary");
arFiles.push_back(topLevelString + "control.tar.gz");
arFiles.push_back(topLevelString + "data.tar.gz");
- res = ar_append(packageFileNames[0].c_str(), arFiles);
+ std::string outputFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
+ outputFileName += "/";
+ outputFileName += this->GetOption("CPACK_OUTPUT_FILE_NAME");
+ res = ar_append(outputFileName.c_str(), arFiles);
if ( res!=0 )
{
- std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
+ std::string tmpFile = this->GetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME");
tmpFile += "/Deb.log";
cmGeneratedFileStream ofs(tmpFile.c_str());
ofs << "# Problem creating archive using: " << res << std::endl;
return 0;
}
-
return 1;
}
+bool cmCPackDebGenerator::SupportsComponentInstallation() const
+ {
+ if (IsOn("CPACK_DEB_COMPONENT_INSTALL"))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
+ const std::string& componentName)
+ {
+ if (ignoreComponentGroup) {
+ return componentName;
+ }
+
+ if (allComponentInOne) {
+ return std::string("ALL_COMPONENTS_IN_ONE");
+ }
+ // We have to find the name of the COMPONENT GROUP
+ // the current COMPONENT belongs to.
+ std::string groupVar = "CPACK_COMPONENT_" +
+ cmSystemTools::UpperCase(componentName) + "_GROUP";
+ if (NULL != GetOption(groupVar.c_str()))
+ {
+ if (allGroupInOne)
+ {
+ return std::string("ALL_GROUPS_IN_ONE");
+ }
+ else
+ {
+ return std::string(GetOption(groupVar.c_str()));
+ }
+ }
+ else
+ {
+ return componentName;
+ }
+ }
+
+
// The following code is taken from OpenBSD ar:
// http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ar/
// It has been slightly modified:
diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h
index 4a357d1..de1ea77 100644
--- a/Source/CPack/cmCPackDebGenerator.h
+++ b/Source/CPack/cmCPackDebGenerator.h
@@ -33,8 +33,26 @@ public:
protected:
virtual int InitializeInternal();
+ /**
+ * The method used to package files when component
+ * install is used. This will create one
+ * archive for each component group.
+ */
+ int PackageComponents(bool ignoreGroup);
+ /**
+ * Special case of component install where all
+ * components will be put in a single installer.
+ */
+ int PackageComponentsAllInOne(bool allComponent);
virtual int PackageFiles();
virtual const char* GetOutputExtension() { return ".deb"; }
+ virtual bool SupportsComponentInstallation() const;
+ virtual std::string GetComponentInstallDirNameSuffix(
+ const std::string& componentName);
+
+private:
+ int createDeb();
+ std::vector<std::string> packageFiles;
};
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index aa9e55b..2c1a0af 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -24,10 +24,19 @@
#include <ctype.h>
//----------------------------------------------------------------------------
+static unsigned int cmCTestGITVersion(unsigned int epic, unsigned int major,
+ unsigned int minor, unsigned int fix)
+{
+ // 1.6.5.0 maps to 10605000
+ return fix + minor*1000 + major*100000 + epic*10000000;
+}
+
+//----------------------------------------------------------------------------
cmCTestGIT::cmCTestGIT(cmCTest* ct, std::ostream& log):
cmCTestGlobalVC(ct, log)
{
this->PriorRev = this->Unknown;
+ this->CurrentGitVersion = 0;
}
//----------------------------------------------------------------------------
@@ -263,7 +272,20 @@ bool cmCTestGIT::UpdateImpl()
std::string top_dir = this->FindTopDir();
const char* git = this->CommandLineTool.c_str();
- char const* git_submodule[] = {git, "submodule", "update", 0};
+ const char* recursive = "--recursive";
+
+ // Git < 1.6.5.0 did not support --recursive
+ if(this->GetGitVersion() < cmCTestGITVersion(1,6,5,0))
+ {
+ recursive = 0;
+ // No need to require >= 1.6.5.0 if there are no submodules.
+ if(cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str()))
+ {
+ this->Log << "Git < 1.6.5.0 cannot update submodules recursively\n";
+ }
+ }
+
+ char const* git_submodule[] = {git, "submodule", "update", recursive, 0};
OutputLogger submodule_out(this->Log, "submodule-out> ");
OutputLogger submodule_err(this->Log, "submodule-err> ");
return this->RunChild(git_submodule, &submodule_out, &submodule_err,
@@ -271,6 +293,27 @@ bool cmCTestGIT::UpdateImpl()
}
//----------------------------------------------------------------------------
+unsigned int cmCTestGIT::GetGitVersion()
+{
+ if(!this->CurrentGitVersion)
+ {
+ const char* git = this->CommandLineTool.c_str();
+ char const* git_version[] = {git, "--version", 0};
+ std::string version;
+ OneLineParser version_out(this, "version-out> ", version);
+ OutputLogger version_err(this->Log, "version-err> ");
+ unsigned int v[4] = {0,0,0,0};
+ if(this->RunChild(git_version, &version_out, &version_err) &&
+ sscanf(version.c_str(), "git version %u.%u.%u.%u",
+ &v[0], &v[1], &v[2], &v[3]) >= 3)
+ {
+ this->CurrentGitVersion = cmCTestGITVersion(v[0], v[1], v[2], v[3]);
+ }
+ }
+ return this->CurrentGitVersion;
+}
+
+//----------------------------------------------------------------------------
/* Diff format:
:src-mode dst-mode src-sha1 dst-sha1 status\0
diff --git a/Source/CTest/cmCTestGIT.h b/Source/CTest/cmCTestGIT.h
index 1765340..f4fae8f 100644
--- a/Source/CTest/cmCTestGIT.h
+++ b/Source/CTest/cmCTestGIT.h
@@ -27,6 +27,8 @@ public:
virtual ~cmCTestGIT();
private:
+ unsigned int CurrentGitVersion;
+ unsigned int GetGitVersion();
std::string GetWorkingRevision();
virtual void NoteOldRevision();
virtual void NoteNewRevision();
diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h
index 141995d..fec2265 100644
--- a/Source/cmUseMangledMesaCommand.h
+++ b/Source/cmUseMangledMesaCommand.h
@@ -30,7 +30,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
- virtual cmCommand* Clone()
+ virtual cmCommand* Clone()
{
return new cmUseMangledMesaCommand;
}
@@ -41,7 +41,7 @@ public:
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
+
/**
* The name of the command as specified in CMakeList.txt.
*/
@@ -50,11 +50,11 @@ public:
/**
* Succinct documentation.
*/
- virtual const char* GetTerseDocumentation()
+ virtual const char* GetTerseDocumentation()
{
return "Copy mesa headers for use in combination with system GL.";
}
-
+
/**
* More documentation.
*/
@@ -68,6 +68,11 @@ public:
"being added to the include directory path earlier.";
}
+ /**
+ * This determines if the command is invoked when in script mode.
+ */
+ virtual bool IsScriptable() { return true; }
+
/** This command is kept for compatibility with older CMake versions. */
virtual bool IsDiscouraged()
{
@@ -80,5 +85,4 @@ protected:
};
-
#endif
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index a02cf6f..453d728 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 03)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 10)
+SET(KWSYS_DATE_STAMP_DAY 15)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7235e1d..6da06f6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -572,6 +572,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
if (RPMBUILD)
list(APPEND GENLST "RPM")
endif(RPMBUILD)
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+ find_program(DPKG NAMES dpkg)
+ if (DPKG)
+ list(APPEND GENLST "DEB")
+ endif(DPKG)
+ endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
# set up list of component packaging ways
list(APPEND CWAYLST "default")
list(APPEND CWAYLST "OnePackPerGroup")
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
index 3a7119e..85626be 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
index 9a40293..1d203c8 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
index 92a97a5..d82943f 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
index 4180891..7b665b6 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
@@ -9,6 +9,10 @@ if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "RPM")
+if(CPACK_GENERATOR MATCHES "DEB")
+ set(CPACK_DEB_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "DEB")
+
#
# Choose grouping way
#