[Cmake-commits] CMake branch, next, updated. v2.8.3-1346-g2eadd03
David Cole
david.cole at kitware.com
Thu Jan 13 18:22:21 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 2eadd03758ac7369c8bc50427c7e539ca373c5c9 (commit)
via 96cd16380af5f2633cf6283481eb414c626436d3 (commit)
via fa4a3b04d0904a2e93242c0c3dd02a357d337f77 (commit)
from 5826e537692e9c80dc6d7792b70b7e427249bcec (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2eadd03758ac7369c8bc50427c7e539ca373c5c9
commit 2eadd03758ac7369c8bc50427c7e539ca373c5c9
Merge: 5826e53 96cd163
Author: David Cole <david.cole at kitware.com>
AuthorDate: Thu Jan 13 18:22:15 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 13 18:22:15 2011 -0500
Merge topic 'fix-install-req-sys-libs' into next
96cd163 Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
fa4a3b0 Add CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS variable
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96cd16380af5f2633cf6283481eb414c626436d3
commit 96cd16380af5f2633cf6283481eb414c626436d3
Author: David Cole <david.cole at kitware.com>
AuthorDate: Thu Jan 13 15:36:45 2011 -0500
Commit: David Cole <david.cole at kitware.com>
CommitDate: Thu Jan 13 16:57:50 2011 -0500
Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
Problem with CMake 2.8.4-rc1: when you launch the NSIS exe installer
on Windows, the default install path shown to the end user is, at first,
"\CMake 2.8".
This problem started occurring when configuring CMake itself with an
older CMake, after adding CPACK_NSIS_INSTALL_ROOT to fix issue 9148.
So... it's a regression from 2.8.3.
I forgot (again) that when you add a new CPack variable, you must
add it to CMake's CMakeCPack.cmake file or else it is empty when
configured with an older CMake. And on Windows, without a bootstrap
build available, the releases are always configured with an older
version of CMake. This may be the last time this has bitten me,
though, because it is now burned into my brain that problems with
CMake's installer itself are inevitably associated with adding new
CPack variables.
In addition to adding a definition for CPACK_NSIS_INSTALL_ROOT,
I've gone ahead and made it differ for the 32- and 64-bit builds
of CMake to give the end user the expected default value for the
Program Files folder for each one.
And, since I was adding a new 32/64 differentiator anyhow, I made
the "NSIS package name" and "installer registry key base" different
for 64-bit builds, too, by appending " (Win64)" to each one.
These address the concerns mentioned in 9148's related issue:
http://public.kitware.com/Bug/view.php?id=9094 (at least as far
as CMake's installer is concerned). 9094 could still use a good
general fix for all projects, though, and remains open for now.
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index aa993cf..c3c25f5 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -24,11 +24,7 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
INCLUDE(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
- # Set the options file that needs to be included inside CMakeCPackOptions.cmake
- SET(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
- CONFIGURE_FILE("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
- "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
- SET(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
+
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
SET(CPACK_PACKAGE_VENDOR "Kitware")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
@@ -36,6 +32,25 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
SET(CPACK_PACKAGE_VERSION "${CMake_VERSION}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}")
+
+ # Make this explicit here, rather than accepting the CPack default value,
+ # so we can refer to it:
+ SET(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
+
+ # Installers for 32- vs. 64-bit CMake:
+ # - Root install directory (displayed to end user at installer-run time)
+ # - "NSIS package/display name" (text used in the installer GUI)
+ # - Registry key used to store info about the installation
+ IF(CMAKE_CL_64)
+ SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+ SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (Win64)")
+ SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)")
+ ELSE()
+ SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
+ SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
+ ENDIF()
+
IF(NOT DEFINED CPACK_SYSTEM_NAME)
# make sure package is not Cygwin-unknown, for Cygwin just
# cygwin is good for the system name
@@ -47,11 +62,12 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
ENDIF(NOT DEFINED CPACK_SYSTEM_NAME)
IF(${CPACK_SYSTEM_NAME} MATCHES Windows)
IF(CMAKE_CL_64)
- SET(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR})
+ SET(CPACK_SYSTEM_NAME win64-x64)
ELSE(CMAKE_CL_64)
- SET(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR})
+ SET(CPACK_SYSTEM_NAME win32-x86)
ENDIF(CMAKE_CL_64)
ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows)
+
IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
# if the CPACK_PACKAGE_FILE_NAME is not defined by the cache
# default to source package - system, on cygwin system is not
@@ -63,15 +79,17 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
ENDIF(CYGWIN)
ENDIF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
+
SET(CPACK_PACKAGE_CONTACT "cmake at cmake.org")
+
IF(UNIX)
SET(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest")
SET(CPACK_SOURCE_STRIP_FILES "")
SET(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
ENDIF(UNIX)
-# cygwin specific packaging stuff
+
+ # cygwin specific packaging stuff
IF(CYGWIN)
-
# setup the cygwin package name
SET(CPACK_PACKAGE_NAME cmake)
# setup the name of the package for cygwin cmake-2.4.3
@@ -93,6 +111,13 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# this file uses some of the package file name variables
INCLUDE(Utilities/Release/Cygwin/CMakeLists.txt)
ENDIF(CYGWIN)
+
+ # Set the options file that needs to be included inside CMakeCPackOptions.cmake
+ SET(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
+ CONFIGURE_FILE("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
+ "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
+ SET(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
+
# include CPack model once all variables are set
INCLUDE(CPack)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index a94fa72..69a1508 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -3,8 +3,10 @@
# in this file.
if(CPACK_GENERATOR MATCHES "NSIS")
+ SET(CPACK_NSIS_INSTALL_ROOT "@CPACK_NSIS_INSTALL_ROOT@")
+
# set the install/unistall icon used for the installer itself
- # There is a bug in NSI that does not handle full unix paths properly.
+ # There is a bug in NSI that does not handle full unix paths properly.
SET(CPACK_NSIS_MUI_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
SET(CPACK_NSIS_MUI_UNIICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
# set the package header icon for MUI
@@ -21,11 +23,11 @@ if(CPACK_GENERATOR MATCHES "NSIS")
"doc/cmake- at CMake_VERSION_MAJOR@. at CMake_VERSION_MINOR@/cpack.html" "CPack Help"
"http://www.cmake.org" "CMake Web Site"
)
- # Use the icond from cmake-gui for add-remove programs
+ # Use the icon from cmake-gui for add-remove programs
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\cmake-gui.exe")
- SET(CPACK_NSIS_DISPLAY_NAME "CMake @CMake_VERSION_MAJOR at .@CMake_VERSION_MINOR@ a cross-platform, open-source build system")
- SET(CPACK_NSIS_PACKAGE_NAME "CMake @CMake_VERSION_MAJOR at .@CMake_VERSION_MINOR@")
+ SET(CPACK_NSIS_PACKAGE_NAME "@CPACK_NSIS_PACKAGE_NAME@")
+ SET(CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, a cross-platform, open-source build system")
SET(CPACK_NSIS_HELP_LINK "http://www.cmake.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
SET(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa4a3b04d0904a2e93242c0c3dd02a357d337f77
commit fa4a3b04d0904a2e93242c0c3dd02a357d337f77
Author: David Cole <david.cole at kitware.com>
AuthorDate: Thu Jan 13 16:43:56 2011 -0500
Commit: David Cole <david.cole at kitware.com>
CommitDate: Thu Jan 13 16:52:51 2011 -0500
Add CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS variable
The parent commit added a warning message whenever a required file
does not exist.
As it turns out, the "required" files never exist when built with
Visual Studio Express editions. Add a variable to suppress these
warning messages because only packagers or naive includers of
this file will care to see such warning messages.
We want to warn about this condition by default so that people who
are using InstallRequiredSystemLibraries without understanding it
fully will have a chance of understanding why it's not working in
the event of missing required files.
But we also want to give projects the ability to suppress this warning
(by "project's choice default") so that they can encourage users who
are restricted to using an Express edition to build their project.
Packagers should explicitly use...
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=OFF
...when building releases. That way, their release build process will warn
them about any missing files, but only if their project CMakeLists files
use a construct similar to CMake's:
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
ENDIF()
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 692befa..aa993cf 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -13,9 +13,15 @@
# If the cmake version includes cpack, use it
IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
IF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
- OPTION(CMAKE_INSTALL_DEBUG_LIBRARIES
+ OPTION(CMAKE_INSTALL_DEBUG_LIBRARIES
"Install Microsoft runtime debug libraries with CMake." FALSE)
MARK_AS_ADVANCED(CMAKE_INSTALL_DEBUG_LIBRARIES)
+
+ # By default, do not warn when built on machines using only VS Express:
+ IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+ ENDIF()
+
INCLUDE(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
# Set the options file that needs to be included inside CMakeCPackOptions.cmake
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 63b3d5e..2dfe8b1 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -16,6 +16,12 @@
# libraries are installed as well as the CRT run time libraries.
# If CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are
# installed to that directory rather than the default.
+# If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this file
+# warns about required files that do not exist. You can set this variable to
+# ON before including this file to avoid the warning. For example, the Visual
+# Studio Express editions do not include the redistributable files, so if you
+# include this file on a machine with only VS Express installed, you'll get
+# the warning.
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@@ -304,9 +310,14 @@ IF(MSVC)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
ELSE(EXISTS ${lib})
- MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
- # This warning indicates an incomplete Visual Studio installation
- # or a bug somewhere above here in this file
+ IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
+ # This warning indicates an incomplete Visual Studio installation
+ # or a bug somewhere above here in this file.
+ # If you would like to avoid this warning, fix the real problem, or
+ # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
+ # this file.
+ ENDIF()
ENDIF(EXISTS ${lib})
ENDFOREACH(lib)
ENDIF(MSVC)
-----------------------------------------------------------------------
Summary of changes:
CMakeCPack.cmake | 51 +++++++++++++++++++++-----
CMakeCPackOptions.cmake.in | 10 +++--
Modules/InstallRequiredSystemLibraries.cmake | 17 +++++++--
3 files changed, 61 insertions(+), 17 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list