summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeCPack.cmake51
-rw-r--r--CMakeCPackOptions.cmake.in10
-rw-r--r--CMakeLists.txt67
-rw-r--r--Modules/CMakeCCompilerId.c.in3
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in3
-rw-r--r--Modules/CheckCSourceCompiles.cmake4
-rw-r--r--Modules/CheckCXXSourceCompiles.cmake4
-rw-r--r--Modules/CheckFunctionExists.cmake14
-rw-r--r--Modules/CheckSymbolExists.cmake19
-rw-r--r--Modules/Compiler/SCO-C.cmake2
-rw-r--r--Modules/Compiler/SCO-CXX.cmake2
-rw-r--r--Modules/Compiler/SCO.cmake25
-rw-r--r--Modules/FindGLUT.cmake2
-rw-r--r--Modules/FindPNG.cmake2
-rw-r--r--Modules/FindPythonLibs.cmake1
-rw-r--r--Modules/FindQt4.cmake5
-rw-r--r--Modules/FindZLIB.cmake2
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake58
-rw-r--r--Modules/Platform/SCO_SV.cmake3
-rw-r--r--Source/CMakeLists.txt1
-rw-r--r--Source/cmDocumentCompileDefinitions.h34
-rw-r--r--Source/cmDocumentVariables.cxx8
-rw-r--r--Source/cmGetCMakePropertyCommand.h11
-rw-r--r--Source/cmGetDirectoryPropertyCommand.h3
-rw-r--r--Source/cmGetSourceFilePropertyCommand.h4
-rw-r--r--Source/cmGetTargetPropertyCommand.h4
-rw-r--r--Source/cmGetTestPropertyCommand.h12
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx17
-rw-r--r--Source/cmGlobalXCodeGenerator.h3
-rw-r--r--Source/cmIfCommand.h89
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx29
-rw-r--r--Source/cmLocalVisualStudio7Generator.h1
-rw-r--r--Source/cmMakefile.cxx22
-rw-r--r--Source/cmSourceFile.cxx20
-rw-r--r--Source/cmTarget.cxx10
-rw-r--r--Source/cmTryCompileCommand.h45
-rw-r--r--Source/cmTryRunCommand.h5
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
-rw-r--r--Tests/CMakeLists.txt17
-rw-r--r--Tests/MissingSourceFile/CMakeLists.txt2
-rw-r--r--Tests/SubDirSpaces/CMakeLists.txt10
-rw-r--r--Utilities/Release/v20n250_aix_release.cmake6
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt8
-rwxr-xr-xbootstrap50
44 files changed, 454 insertions, 236 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 692befa..c3c25f5 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -13,16 +13,18 @@
# 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
- 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")
@@ -30,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
@@ -41,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
@@ -57,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@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
@@ -87,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-@CMake_VERSION_MAJOR@.@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@.@CMake_VERSION_MINOR@ a cross-platform, open-source build system")
- SET(CPACK_NSIS_PACKAGE_NAME "CMake @CMake_VERSION_MAJOR@.@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@)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4508e33..37e0edc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,12 @@ IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
+IF(CMAKE_BOOTSTRAP)
+ # Running from bootstrap script. Set local variable and remove from cache.
+ SET(CMAKE_BOOTSTRAP 1)
+ UNSET(CMAKE_BOOTSTRAP CACHE)
+ENDIF()
+
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# Allow empty endif() and such with CMake 2.4.
@@ -53,42 +59,47 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
OPTION(CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF)
MARK_AS_ADVANCED(CTEST_USE_XMLRPC)
- # Allow the user to enable/disable all system utility library options
- # by setting CMAKE_USE_SYSTEM_LIBRARIES on the command line.
- IF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
- SET(CMAKE_USE_SYSTEM_LIBRARIES_USER 1)
- ENDIF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
- IF(CMAKE_USE_SYSTEM_LIBRARIES)
- SET(CMAKE_USE_SYSTEM_LIBRARIES ON)
- ELSE(CMAKE_USE_SYSTEM_LIBRARIES)
- SET(CMAKE_USE_SYSTEM_LIBRARIES OFF)
- ENDIF(CMAKE_USE_SYSTEM_LIBRARIES)
- IF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
- SET(CMAKE_USE_SYSTEM_CURL "${CMAKE_USE_SYSTEM_LIBRARIES}"
- CACHE BOOL "Use system-installed curl" FORCE)
- SET(CMAKE_USE_SYSTEM_EXPAT "${CMAKE_USE_SYSTEM_LIBRARIES}"
- CACHE BOOL "Use system-installed expat" FORCE)
- SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}"
- CACHE BOOL "Use system-installed zlib" FORCE)
- SET(CMAKE_USE_SYSTEM_BZIP2 "${CMAKE_USE_SYSTEM_LIBRARIES}"
- CACHE BOOL "Use system-installed bzip2" FORCE)
- SET(CMAKE_USE_SYSTEM_LIBARCHIVE "${CMAKE_USE_SYSTEM_LIBRARIES}"
- CACHE BOOL "Use system-installed libarchive" FORCE)
- ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
+ # Allow the user to enable/disable all system utility library options by
+ # defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}.
+ SET(UTILITIES BZIP2 CURL EXPAT LIBARCHIVE ZLIB)
+ FOREACH(util ${UTILITIES})
+ IF(NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util}
+ AND DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
+ SET(CMAKE_USE_SYSTEM_LIBRARY_${util} "${CMAKE_USE_SYSTEM_LIBRARIES}")
+ ENDIF()
+ IF(DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util})
+ IF(CMAKE_USE_SYSTEM_LIBRARY_${util})
+ SET(CMAKE_USE_SYSTEM_LIBRARY_${util} ON)
+ ELSE()
+ SET(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
+ ENDIF()
+ IF(CMAKE_BOOTSTRAP)
+ UNSET(CMAKE_USE_SYSTEM_LIBRARY_${util} CACHE)
+ ENDIF()
+ STRING(TOLOWER "${util}" lutil)
+ SET(CMAKE_USE_SYSTEM_${util} "${CMAKE_USE_SYSTEM_LIBRARY_${util}}"
+ CACHE BOOL "Use system-installed ${lutil}" FORCE)
+ ELSE()
+ SET(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
+ ENDIF()
+ ENDFOREACH(util)
+ IF(CMAKE_BOOTSTRAP)
+ UNSET(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
+ ENDIF()
# Optionally use system utility libraries.
- OPTION(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" ${CMAKE_USE_SYSTEM_LIBRARIES})
+ OPTION(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}")
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
- ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
+ "${CMAKE_USE_SYSTEM_LIBRARY_CURL}" "NOT CTEST_USE_XMLRPC" ON)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
- ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
+ "${CMAKE_USE_SYSTEM_LIBRARY_EXPAT}" "NOT CTEST_USE_XMLRPC" ON)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
- ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL" ON)
+ "${CMAKE_USE_SYSTEM_LIBRARY_ZLIB}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL" ON)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2"
- ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
+ "${CMAKE_USE_SYSTEM_LIBRARY_BZIP2}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
# Mention to the user what system libraries are being used.
- FOREACH(util BZIP2 CURL EXPAT LIBARCHIVE ZLIB)
+ FOREACH(util ${UTILITIES})
IF(CMAKE_USE_SYSTEM_${util})
MESSAGE(STATUS "Using system-installed ${util}")
ENDIF(CMAKE_USE_SYSTEM_${util})
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index c7778fb..c91553a 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -48,6 +48,9 @@
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI_DSP"
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 2ff227a..4c8f497 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -50,6 +50,9 @@
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI_DSP"
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index e8bfc0c..d59fe55 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -1,6 +1,6 @@
-# - Check if the given C source code compiles.
+# - Check if given C source compiles and links into an executable
# CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-# <code> - source code to try to compile
+# <code> - source code to try to compile, must define 'main'
# <var> - variable to store whether the source code compiled
# <fail-regex> - fail if test output matches this regex
# The following variables may be set before calling this macro to
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 4502c6b..0491b37 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -1,6 +1,6 @@
-# - Check if the given C++ source code compiles.
+# - Check if given C++ source compiles and links into an executable
# CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-# <code> - source code to try to compile
+# <code> - source code to try to compile, must define 'main'
# <var> - variable to store whether the source code compiled
# <fail-regex> - fail if test output matches this regex
# The following variables may be set before calling this macro to
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index e1a1777..0ba36d9 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -1,8 +1,10 @@
-# - Check if the function exists.
-# CHECK_FUNCTION_EXISTS(FUNCTION VARIABLE)
-# - macro which checks if the function exists
-# FUNCTION - the name of the function
-# VARIABLE - variable to store the result
+# - Check if a C function can be linked
+# CHECK_FUNCTION_EXISTS(<function> <variable>)
+#
+# Check that the <function> is provided by libraries on the system and
+# store the result in a <variable>. This does not verify that any
+# system header file declares the function, only that it can be found
+# at link time (considure using CheckSymbolExists).
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
@@ -13,7 +15,7 @@
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
-# Copyright 2002-2009 Kitware, Inc.
+# Copyright 2002-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 40910f2..e86604b 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -1,9 +1,16 @@
-# - Check if the symbol exists in include files
-# CHECK_SYMBOL_EXISTS(SYMBOL FILES VARIABLE)
+# - Check if a symbol exists as a function, variable, or macro
+# CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)
#
-# SYMBOL - symbol
-# FILES - include files to check
-# VARIABLE - variable to return result
+# Check that the <symbol> is available after including given header
+# <files> and store the result in a <variable>. Specify the list
+# of files in one argument as a semicolon-separated list.
+#
+# If the header files define the symbol as a macro it is considered
+# available and assumed to work. If the header files declare the
+# symbol as a function or variable then the symbol must also be
+# available for linking. If the symbol is a type or enum value
+# it will not be recognized (consider using CheckTypeSize or
+# CheckCSourceCompiles).
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
@@ -14,7 +21,7 @@
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
-# Copyright 2003-2009 Kitware, Inc.
+# Copyright 2003-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
diff --git a/Modules/Compiler/SCO-C.cmake b/Modules/Compiler/SCO-C.cmake
new file mode 100644
index 0000000..6e762cc
--- /dev/null
+++ b/Modules/Compiler/SCO-C.cmake
@@ -0,0 +1,2 @@
+include(Compiler/SCO)
+__compiler_sco(C)
diff --git a/Modules/Compiler/SCO-CXX.cmake b/Modules/Compiler/SCO-CXX.cmake
new file mode 100644
index 0000000..5b713a0
--- /dev/null
+++ b/Modules/Compiler/SCO-CXX.cmake
@@ -0,0 +1,2 @@
+include(Compiler/SCO)
+__compiler_sco(CXX)
diff --git a/Modules/Compiler/SCO.cmake b/Modules/Compiler/SCO.cmake
new file mode 100644
index 0000000..d3deeb1
--- /dev/null
+++ b/Modules/Compiler/SCO.cmake
@@ -0,0 +1,25 @@
+
+#=============================================================================
+# Copyright 2002-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This module is shared by multiple languages; use include blocker.
+if(__COMPILER_SCO)
+ return()
+endif()
+set(__COMPILER_SCO 1)
+
+macro(__compiler_sco lang)
+ # Feature flags.
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-Kpic -belf")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-belf -Wl,-Bexport")
+endmacro()
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 45df79e..af88997 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -23,7 +23,7 @@
IF (WIN32)
FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include )
- FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32
+ FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 4fb218b..6d5dd98 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -33,7 +33,7 @@ if(ZLIB_FOUND)
/usr/local/include/libpng # OpenBSD
)
- set(PNG_NAMES ${PNG_NAMES} png libpng png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d)
+ set(PNG_NAMES ${PNG_NAMES} png libpng png15 libpng15 png15d libpng15d png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d)
find_library(PNG_LIBRARY NAMES ${PNG_NAMES} )
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 780ffc2..333e075 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -151,6 +151,7 @@ FUNCTION(PYTHON_WRITE_MODULES_HEADER _filename)
GET_FILENAME_COMPONENT(_name "${_filename}" NAME)
STRING(REPLACE "." "_" _name "${_name}")
STRING(TOUPPER ${_name} _nameUpper)
+ SET(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
SET(_filenameTmp "${_filename}.in")
FILE(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index d9d6ea7..79a3d51 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -447,7 +447,10 @@ MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
ENDMACRO (_QT4_ADJUST_LIB_VARS)
function(_QT4_QUERY_QMAKE VAR RESULT)
- exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output )
+ execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
+ RESULT_VARIABLE return_code
+ OUTPUT_VARIABLE output ERROR_VARIABLE output
+ OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
if(NOT return_code)
file(TO_CMAKE_PATH "${output}" output)
set(${RESULT} ${output} PARENT_SCOPE)
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 1ac6c2c..3de5829 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -35,7 +35,7 @@ FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
)
-SET(ZLIB_NAMES z zlib zdll)
+SET(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1)
FIND_LIBRARY(ZLIB_LIBRARY
NAMES
${ZLIB_NAMES}
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 4564e74..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.
@@ -33,6 +39,21 @@
IF(MSVC)
FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
+ IF(CMAKE_CL_64)
+ IF(MSVC_VERSION GREATER 1599)
+ # VS 10 and later:
+ SET(CMAKE_MSVC_ARCH x64)
+ ELSE()
+ # VS 9 and earlier:
+ SET(CMAKE_MSVC_ARCH amd64)
+ ENDIF()
+ ELSE(CMAKE_CL_64)
+ SET(CMAKE_MSVC_ARCH x86)
+ ENDIF(CMAKE_CL_64)
+
+ GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
+ GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
+
IF(MSVC70)
SET(__install__libs
"${SYSTEMROOT}/system32/msvcp70.dll"
@@ -47,15 +68,6 @@ IF(MSVC)
)
ENDIF(MSVC71)
- IF(CMAKE_CL_64)
- SET(CMAKE_MSVC_ARCH amd64)
- ELSE(CMAKE_CL_64)
- SET(CMAKE_MSVC_ARCH x86)
- ENDIF(CMAKE_CL_64)
-
- GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
- GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
-
IF(MSVC80)
# Find the runtime library redistribution directory.
FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
@@ -87,7 +99,6 @@ IF(MSVC)
"${MSVC80_CRT_DIR}/msvcr80d.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
-
ENDIF(MSVC80)
IF(MSVC90)
@@ -130,15 +141,14 @@ IF(MSVC)
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../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"
)
MARK_AS_ADVANCED(MSVC10_REDIST_DIR)
SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
SET(__install__libs
- "${MSVC10_CRT_DIR}/Microsoft.VC100.CRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100.dll"
"${MSVC10_CRT_DIR}/msvcr100.dll"
)
@@ -146,9 +156,8 @@ IF(MSVC)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_CRT_DIR
- "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
+ "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugCRT")
SET(__install__libs ${__install__libs}
- "${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100d.dll"
"${MSVC10_CRT_DIR}/msvcr100d.dll"
)
@@ -161,11 +170,13 @@ IF(MSVC)
"${SYSTEMROOT}/system32/mfc70.dll"
)
ENDIF(MSVC70)
+
IF(MSVC71)
SET(__install__libs ${__install__libs}
"${SYSTEMROOT}/system32/mfc71.dll"
)
ENDIF(MSVC71)
+
IF(MSVC80)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_MFC_DIR
@@ -259,7 +270,6 @@ IF(MSVC)
SET(MSVC10_MFC_DIR
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC")
SET(__install__libs ${__install__libs}
- "${MSVC10_MFC_DIR}/Microsoft.VC100.DebugMFC.manifest"
"${MSVC10_MFC_DIR}/mfc100d.dll"
"${MSVC10_MFC_DIR}/mfc100ud.dll"
"${MSVC10_MFC_DIR}/mfcm100d.dll"
@@ -268,11 +278,8 @@ IF(MSVC)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
SET(__install__libs ${__install__libs}
- "${MSVC10_MFC_DIR}/Microsoft.VC100.MFC.manifest"
"${MSVC10_MFC_DIR}/mfc100.dll"
"${MSVC10_MFC_DIR}/mfc100u.dll"
"${MSVC10_MFC_DIR}/mfcm100.dll"
@@ -282,10 +289,7 @@ IF(MSVC)
# include the language dll's for vs10 as well as the actuall dll's
SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
SET(__install__libs ${__install__libs}
- "${MSVC10_MFCLOC_DIR}/Microsoft.VC100.MFCLOC.manifest"
"${MSVC10_MFCLOC_DIR}/mfc100chs.dll"
"${MSVC10_MFCLOC_DIR}/mfc100cht.dll"
"${MSVC10_MFCLOC_DIR}/mfc100enu.dll"
@@ -297,7 +301,6 @@ IF(MSVC)
"${MSVC10_MFCLOC_DIR}/mfc100kor.dll"
)
ENDIF(MSVC10)
-
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib
@@ -306,6 +309,15 @@ IF(MSVC)
IF(EXISTS ${lib})
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
+ ELSE(EXISTS ${lib})
+ 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)
diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake
index efb7aa0..cbdcb7d 100644
--- a/Modules/Platform/SCO_SV.cmake
+++ b/Modules/Platform/SCO_SV.cmake
@@ -1,5 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-Kpic -belf")
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-Kpic -belf")
SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-belf -Wl,-Bexport")
INCLUDE(Platform/UnixPaths)
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index f183eb4..7722c19 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -158,6 +158,7 @@ SET(SRCS
cmDocumentationFormatterText.cxx
cmDocumentationFormatterUsage.cxx
cmDocumentationSection.cxx
+ cmDocumentCompileDefinitions.h
cmDocumentGeneratorExpressions.h
cmDocumentVariables.cxx
cmDynamicLoader.cxx
diff --git a/Source/cmDocumentCompileDefinitions.h b/Source/cmDocumentCompileDefinitions.h
new file mode 100644
index 0000000..ef3b3e7
--- /dev/null
+++ b/Source/cmDocumentCompileDefinitions.h
@@ -0,0 +1,34 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmDocumentCompileDefinitions_h
+#define cmDocumentCompileDefinitions_h
+
+#define CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER \
+ "Disclaimer: Most native build tools have poor support for escaping " \
+ "certain values. CMake has work-arounds for many cases but some " \
+ "values may just not be possible to pass correctly. If a value " \
+ "does not seem to be escaped correctly, do not attempt to " \
+ "work-around the problem by adding escape sequences to the value. " \
+ "Your work-around may break in a future version of CMake that " \
+ "has improved escape support. Instead consider defining the macro " \
+ "in a (configured) header file. Then report the limitation. " \
+ "Known limitations include:\n" \
+ " # - broken almost everywhere\n" \
+ " ; - broken in VS IDE and Borland Makefiles\n" \
+ " , - broken in VS IDE\n" \
+ " % - broken in some cases in NMake\n" \
+ " & | - broken in some cases on MinGW\n" \
+ " ^ < > \\\" - broken in most Make tools on Windows\n" \
+ "CMake does not reject these values outright because they do work " \
+ "in some cases. Use with caution. "
+
+#endif
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 5dfa64e..e9b54d8 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1121,6 +1121,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"this variable for a target if they are set. "
"Library targets are otherwise placed in this directory.",false,
"Variables that Control the Build");
+ cm->DefineProperty
+ ("CMAKE_TRY_COMPILE_CONFIGURATION", cmProperty::VARIABLE,
+ "Build configuration used for try_compile and try_run projects.",
+ "Projects built by try_compile and try_run are built "
+ "synchronously during the CMake configuration step. "
+ "Therefore a specific build configuration must be chosen even "
+ "if the generated build system supports multiple configurations.",false,
+ "Variables that Control the Build");
// Variables defined when the a language is enabled These variables will
diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h
index c78671e..d82be70 100644
--- a/Source/cmGetCMakePropertyCommand.h
+++ b/Source/cmGetCMakePropertyCommand.h
@@ -54,11 +54,14 @@ public:
{
return
" get_cmake_property(VAR property)\n"
- "Get a property from the CMake instance. The value of the "
- "property is stored in the variable VAR. If the property is "
- "not found, CMake will report an error. Some supported properties "
+ "Get a property from the CMake instance. "
+ "The value of the property is stored in the variable VAR. "
+ "If the property is not found, VAR will be set to \"NOTFOUND\". "
+ "Some supported properties "
"include: VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, and "
- "COMPONENTS.";
+ "COMPONENTS."
+ "\n"
+ "See also the more general get_property() command.";
}
cmTypeMacro(cmGetCMakePropertyCommand, cmCommand);
diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h
index c3a23a3..b7a5f71 100644
--- a/Source/cmGetDirectoryPropertyCommand.h
+++ b/Source/cmGetDirectoryPropertyCommand.h
@@ -66,7 +66,8 @@ public:
"Get a variable definition from a directory. "
"This form is useful to get a variable definition from another "
"directory."
- ;
+ "\n"
+ "See also the more general get_property() command.";
}
cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand);
diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h
index c1d5e11..56469f8 100644
--- a/Source/cmGetSourceFilePropertyCommand.h
+++ b/Source/cmGetSourceFilePropertyCommand.h
@@ -53,7 +53,9 @@ public:
"stored in the variable VAR. If the property is not found, VAR "
"will be set to \"NOTFOUND\". Use set_source_files_properties to set "
"property values. Source file properties usually control how the "
- "file is built. One property that is always there is LOCATION";
+ "file is built. One property that is always there is LOCATION"
+ "\n"
+ "See also the more general get_property() command.";
}
cmTypeMacro(cmGetSourceFilePropertyCommand, cmCommand);
diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h
index e1984c3..71c75ef 100644
--- a/Source/cmGetTargetPropertyCommand.h
+++ b/Source/cmGetTargetPropertyCommand.h
@@ -55,7 +55,9 @@ public:
"property values. Properties are usually used to control how "
"a target is built, but some query the target instead. "
"This command can get properties for any target so far created. "
- "The targets do not need to be in the current CMakeLists.txt file.";
+ "The targets do not need to be in the current CMakeLists.txt file."
+ "\n"
+ "See also the more general get_property() command.";
}
cmTypeMacro(cmGetTargetPropertyCommand, cmCommand);
diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h
index 956cf55..d9f5d9b 100644
--- a/Source/cmGetTestPropertyCommand.h
+++ b/Source/cmGetTestPropertyCommand.h
@@ -48,11 +48,13 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " get_test_property(test VAR property)\n"
- "Get a property from the Test. The value of the property is "
- "stored in the variable VAR. If the property is not found, "
- "CMake will report an error. For a list of standard properties "
- "you can type cmake --help-property-list";
+ " get_test_property(test property VAR)\n"
+ "Get a property from the Test. The value of the property is "
+ "stored in the variable VAR. If the property is not found, VAR "
+ "will be set to \"NOTFOUND\". For a list of standard properties "
+ "you can type cmake --help-property-list"
+ "\n"
+ "See also the more general get_property() command.";
}
cmTypeMacro(cmGetTestPropertyCommand, cmCommand);
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 59ca38f..1395865 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -355,7 +355,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
cmCustomCommandLines commandLines;
commandLines.push_back(makecommand);
// Add Re-Run CMake rules
- this->CreateReRunCMakeFile(root);
+ this->CreateReRunCMakeFile(root, gens);
// now make the allbuild depend on all the non-utility targets
// in the project
@@ -403,10 +403,18 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
}
//----------------------------------------------------------------------------
-void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
+void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
+ cmLocalGenerator* root, std::vector<cmLocalGenerator*> const& gens)
{
cmMakefile* mf = root->GetMakefile();
- std::vector<std::string> lfiles = mf->GetListFiles();
+ std::vector<std::string> lfiles;
+ for(std::vector<cmLocalGenerator*>::const_iterator gi = gens.begin();
+ gi != gens.end(); ++gi)
+ {
+ std::vector<std::string> const& lf = (*gi)->GetMakefile()->GetListFiles();
+ lfiles.insert(lfiles.end(), lf.begin(), lf.end());
+ }
+
// sort the array
std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
std::vector<std::string>::iterator new_end =
@@ -1279,6 +1287,9 @@ void cmGlobalXCodeGenerator
makefileStream << "# Generated by CMake, DO NOT EDIT\n";
makefileStream << "# Custom rules for " << target.GetName() << "\n";
+ // disable the implicit rules
+ makefileStream << ".SUFFIXES: " << "\n";
+
// have all depend on all outputs
makefileStream << "all: ";
std::map<const cmCustomCommand*, cmStdString> tname;
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index b4de805..290532a 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -171,7 +171,8 @@ private:
const char* name2,
cmTarget& cmtarget,
const std::vector<cmCustomCommand>&);
- void CreateReRunCMakeFile(cmLocalGenerator* root);
+ void CreateReRunCMakeFile(cmLocalGenerator* root,
+ std::vector<cmLocalGenerator*> const& gens);
std::string LookupFlags(const char* varNamePrefix,
const char* varNameLang,
diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h
index 107a892..4996bc4 100644
--- a/Source/cmIfCommand.h
+++ b/Source/cmIfCommand.h
@@ -125,10 +125,13 @@ public:
"True if the constant is 1, ON, YES, TRUE, Y, or a non-zero number. "
"False if the constant is 0, OFF, NO, FALSE, N, IGNORE, \"\", "
"or ends in the suffix '-NOTFOUND'. "
- "Named boolean constants are case-insensitive."
+ "Named boolean constants are case-insensitive. "
+ "If the argument is not one of these constants, "
+ "it is treated as a variable:"
"\n"
" if(<variable>)\n"
- "True if the variable's value is not a false constant."
+ "True if the variable is defined to a value that is not a false "
+ "constant. False otherwise. "
"\n"
" if(NOT <expression>)\n"
"True if the expression is not true."
@@ -163,32 +166,25 @@ public:
"Behavior is well-defined only for full paths.\n"
" if(IS_ABSOLUTE path)\n"
"True if the given path is an absolute path.\n"
- " if(variable MATCHES regex)\n"
- " if(string MATCHES regex)\n"
+ " if(<variable|string> MATCHES regex)\n"
"True if the given string or variable's value matches the given "
"regular expression.\n"
- " if(variable LESS number)\n"
- " if(string LESS number)\n"
- " if(variable GREATER number)\n"
- " if(string GREATER number)\n"
- " if(variable EQUAL number)\n"
- " if(string EQUAL number)\n"
+ " if(<variable|string> LESS <variable|string>)\n"
+ " if(<variable|string> GREATER <variable|string>)\n"
+ " if(<variable|string> EQUAL <variable|string>)\n"
"True if the given string or variable's value is a valid number and "
"the inequality or equality is true.\n"
- " if(variable STRLESS string)\n"
- " if(string STRLESS string)\n"
- " if(variable STRGREATER string)\n"
- " if(string STRGREATER string)\n"
- " if(variable STREQUAL string)\n"
- " if(string STREQUAL string)\n"
+ " if(<variable|string> STRLESS <variable|string>)\n"
+ " if(<variable|string> STRGREATER <variable|string>)\n"
+ " if(<variable|string> STREQUAL <variable|string>)\n"
"True if the given string or variable's value is lexicographically "
"less (or greater, or equal) than the string or variable on the right.\n"
- " if(version1 VERSION_LESS version2)\n"
- " if(version1 VERSION_EQUAL version2)\n"
- " if(version1 VERSION_GREATER version2)\n"
+ " if(<variable|string> VERSION_LESS <variable|string>)\n"
+ " if(<variable|string> VERSION_EQUAL <variable|string>)\n"
+ " if(<variable|string> VERSION_GREATER <variable|string>)\n"
"Component-wise integer version number comparison (version format is "
"major[.minor[.patch[.tweak]]]).\n"
- " if(DEFINED variable)\n"
+ " if(DEFINED <variable>)\n"
"True if the given variable is defined. It does not matter if the "
"variable is true or false just if it has been set.\n"
" if((expression) AND (expression OR (expression)))\n"
@@ -199,38 +195,27 @@ public:
"that contains them."
"\n"
- "The if statement was written fairly early in CMake's history "
- "and it has some convenience features that are worth covering. "
- "The if statement reduces operations until there is "
- "a single remaining value, at that point if the case "
- "insensitive value is: ON, 1, YES, TRUE, Y it returns true, if "
- "it is OFF, 0, NO, FALSE, N, NOTFOUND, *-NOTFOUND, IGNORE it "
- "will return false. \n"
-
- "This is fairly reasonable. The convenience feature that sometimes "
- "throws new authors is how CMake handles values that do not "
- "match the true or false list. Those values are treated as "
- "variables and are dereferenced even though they do not have "
- "the required ${} syntax. This means that if you write\n"
-
- " if (boobah)\n"
-
- "CMake will treat it as if you wrote \n"
-
- " if (${boobah})\n"
-
- "likewise if you write \n"
-
- " if (fubar AND sol)\n"
-
- "CMake will conveniently treat it as \n"
-
- " if (\"${fubar}\" AND \"${sol}\")\n"
-
- "The later is really the correct way to write it, but the "
- "former will work as well. Only some operations in the if "
- "statement have this special handling of arguments. The "
- "specific details follow: \n"
+ "The if command was written very early in CMake's history, predating "
+ "the ${} variable evaluation syntax, and for convenience evaluates "
+ "variables named by its arguments as shown in the above signatures. "
+ "Note that normal variable evaluation with ${} applies before the "
+ "if command even receives the arguments. "
+ "Therefore code like\n"
+ " set(var1 OFF)\n"
+ " set(var2 \"var1\")\n"
+ " if(${var2})\n"
+ "appears to the if command as\n"
+ " if(var1)\n"
+ "and is evaluated according to the if(<variable>) case "
+ "documented above. "
+ "The result is OFF which is false. "
+ "However, if we remove the ${} from the example then the command sees\n"
+ " if(var2)\n"
+ "which is true because var2 is defined to \"var1\" which is not "
+ "a false constant."
+ "\n"
+ "Automatic evaluation applies in the other cases whenever the "
+ "above-documented signature accepts <variable|string>:\n"
"1) The left hand argument to MATCHES is first checked to see "
"if it is a defined variable, if so the variable's value is "
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 21f6460..34756d8 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1706,6 +1706,22 @@ void cmLocalVisualStudio7Generator
event.Finish();
}
+void cmLocalVisualStudio7Generator::WriteProjectSCC(std::ostream& fout,
+ cmTarget& target)
+{
+ // if we have all the required Source code control tags
+ // then add that to the project
+ const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME");
+ const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH");
+ const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER");
+ if(vsProvider && vsLocalpath && vsProjectname)
+ {
+ fout << "\tSccProjectName=\"" << vsProjectname << "\"\n"
+ << "\tSccLocalPath=\"" << vsLocalpath << "\"\n"
+ << "\tSccProvider=\"" << vsProvider << "\"\n";
+ }
+}
+
void
cmLocalVisualStudio7Generator
::WriteProjectStartFortran(std::ostream& fout,
@@ -1773,6 +1789,7 @@ cmLocalVisualStudio7Generator
{
fout << "\tProjectType=\"" << projectType << "\"\n";
}
+ this->WriteProjectSCC(fout, target);
fout<< "\tKeyword=\"" << keyword << "\">\n"
<< "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\">\n"
<< "\t<Platforms>\n"
@@ -1813,9 +1830,6 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
{
keyword = "Win32Proj";
}
- const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME");
- const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH");
- const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER");
cmGlobalVisualStudio7Generator* gg =
static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
fout << "\tName=\"" << projLabel << "\"\n";
@@ -1823,14 +1837,7 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
{
fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
}
- // if we have all the required Source code control tags
- // then add that to the project
- if(vsProvider && vsLocalpath && vsProjectname)
- {
- fout << "\tSccProjectName=\"" << vsProjectname << "\"\n"
- << "\tSccLocalPath=\"" << vsLocalpath << "\"\n"
- << "\tSccProvider=\"" << vsProvider << "\"\n";
- }
+ this->WriteProjectSCC(fout, target);
fout << "\tKeyword=\"" << keyword << "\">\n"
<< "\t<Platforms>\n"
<< "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index 19f7b97..160e2d4 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -102,6 +102,7 @@ private:
cmTarget& t, bool debug);
void OutputLibraryDirectories(std::ostream& fout,
std::vector<std::string> const& dirs);
+ void WriteProjectSCC(std::ostream& fout, cmTarget& target);
void WriteProjectStart(std::ostream& fout, const char *libName,
cmTarget &tgt, std::vector<cmSourceGroup> &sgs);
void WriteProjectStartFortran(std::ostream& fout, const char *libName,
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 53f4c3c..e1cea22 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -22,6 +22,7 @@
#include "cmFunctionBlocker.h"
#include "cmListFileCache.h"
#include "cmCommandArgumentParserHelper.h"
+#include "cmDocumentCompileDefinitions.h"
#include "cmTest.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
# include "cmVariableWatch.h"
@@ -2717,6 +2718,18 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
cm.SetStartOutputDirectory(bindir);
cm.SetCMakeCommand(cmakeCommand.c_str());
cm.LoadCache();
+ if(!gg->IsMultiConfig())
+ {
+ if(const char* config =
+ this->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION"))
+ {
+ // Tell the single-configuration generator which one to use.
+ // Add this before the user-provided CMake arguments in case
+ // one of the arguments is -DCMAKE_BUILD_TYPE=...
+ cm.AddCacheEntry("CMAKE_BUILD_TYPE", config,
+ "Build configuration", cmCacheManager::STRING);
+ }
+ }
// if cmake args were provided then pass them in
if (cmakeArgs)
{
@@ -3492,14 +3505,7 @@ void cmMakefile::DefineProperties(cmake *cm)
"are not supported by the native build tool. "
"The VS6 IDE does not support definition values with spaces "
"(but NMake does).\n"
- "Dislaimer: Most native build tools have poor support for escaping "
- "certain values. CMake has work-arounds for many cases but some "
- "values may just not be possible to pass correctly. If a value "
- "does not seem to be escaped correctly, do not attempt to "
- "work-around the problem by adding escape sequences to the value. "
- "Your work-around may break in a future version of CMake that "
- "has improved escape support. Instead consider defining the macro "
- "in a (configured) header file. Then report the limitation.");
+ CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER);
cm->DefineProperty
("COMPILE_DEFINITIONS_<CONFIG>", cmProperty::DIRECTORY,
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 26328cf..ed1da7b 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -16,6 +16,7 @@
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include "cmake.h"
+#include "cmDocumentCompileDefinitions.h"
//----------------------------------------------------------------------------
cmSourceFile::cmSourceFile(cmMakefile* mf, const char* name):
@@ -187,8 +188,13 @@ bool cmSourceFile::FindFullPath(std::string* error)
}
cmOStringStream e;
- e << "Cannot find source file \"" << this->Location.GetName() << "\"";
- e << ". Tried extensions";
+ std::string missing = this->Location.GetDirectory();
+ if(!missing.empty())
+ {
+ missing += "/";
+ }
+ missing += this->Location.GetName();
+ e << "Cannot find source file:\n " << missing << "\nTried extensions";
for(std::vector<std::string>::const_iterator ext = srcExts.begin();
ext != srcExts.end(); ++ext)
{
@@ -411,15 +417,7 @@ void cmSourceFile::DefineProperties(cmake *cm)
"The VS6 IDE does not support definition values with spaces "
"(but NMake does). Xcode does not support per-configuration "
"definitions on source files.\n"
- "Disclaimer: Most native build tools have poor support for escaping "
- "certain values. CMake has work-arounds for many cases but some "
- "values may just not be possible to pass correctly. If a value "
- "does not seem to be escaped correctly, do not attempt to "
- "work-around the problem by adding escape sequences to the value. "
- "Your work-around may break in a future version of CMake that "
- "has improved escape support. Instead consider defining the macro "
- "in a (configured) header file. Then report the limitation.");
-
+ CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER);
cm->DefineProperty
("COMPILE_DEFINITIONS_<CONFIG>", cmProperty::SOURCE_FILE,
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 52574e2..72efce3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -16,6 +16,7 @@
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmComputeLinkInformation.h"
+#include "cmDocumentCompileDefinitions.h"
#include "cmListFileCache.h"
#include "cmGeneratorExpression.h"
#include <cmsys/RegularExpression.hxx>
@@ -146,14 +147,7 @@ void cmTarget::DefineProperties(cmake *cm)
"are not supported by the native build tool. "
"The VS6 IDE does not support definition values with spaces "
"(but NMake does).\n"
- "Dislaimer: Most native build tools have poor support for escaping "
- "certain values. CMake has work-arounds for many cases but some "
- "values may just not be possible to pass correctly. If a value "
- "does not seem to be escaped correctly, do not attempt to "
- "work-around the problem by adding escape sequences to the value. "
- "Your work-around may break in a future version of CMake that "
- "has improved escape support. Instead consider defining the macro "
- "in a (configured) header file. Then report the limitation.");
+ CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER);
cm->DefineProperty
("COMPILE_DEFINITIONS_<CONFIG>", cmProperty::TARGET,
diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h
index 3a30e4c..0c67a8b 100644
--- a/Source/cmTryCompileCommand.h
+++ b/Source/cmTryCompileCommand.h
@@ -47,7 +47,7 @@ public:
*/
virtual const char* GetTerseDocumentation()
{
- return "Try compiling some code.";
+ return "Try building some code.";
}
/**
@@ -55,23 +55,28 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " try_compile(RESULT_VAR bindir srcdir\n"
- " projectName <targetname> [CMAKE_FLAGS <Flags>]\n"
- " [OUTPUT_VARIABLE var])\n"
- "Try compiling a program. In this form, srcdir should contain a "
- "complete CMake project with a CMakeLists.txt file and all sources. The "
- "bindir and srcdir will not be deleted after this command is run. "
- "If <target name> is specified then build just that target "
- "otherwise the all or ALL_BUILD target is built.\n"
- " try_compile(RESULT_VAR bindir srcfile\n"
- " [CMAKE_FLAGS <Flags>]\n"
- " [COMPILE_DEFINITIONS <flags> ...]\n"
- " [OUTPUT_VARIABLE var]\n"
- " [COPY_FILE <filename> )\n"
- "Try compiling a srcfile. In this case, the user need only supply a "
- "source file. CMake will create the appropriate CMakeLists.txt file "
- "to build the source. If COPY_FILE is used, the compiled file will be "
- "copied to the given file.\n"
+ " try_compile(RESULT_VAR <bindir> <srcdir>\n"
+ " <projectName> [targetName] [CMAKE_FLAGS flags...]\n"
+ " [OUTPUT_VARIABLE <var>])\n"
+ "Try building a project. In this form, srcdir should contain a "
+ "complete CMake project with a CMakeLists.txt file and all sources. "
+ "The bindir and srcdir will not be deleted after this command is run. "
+ "Specify targetName to build a specific target instead of the 'all' or "
+ "'ALL_BUILD' target."
+ "\n"
+ " try_compile(RESULT_VAR <bindir> <srcfile>\n"
+ " [CMAKE_FLAGS flags...]\n"
+ " [COMPILE_DEFINITIONS flags...]\n"
+ " [OUTPUT_VARIABLE <var>]\n"
+ " [COPY_FILE <fileName>])\n"
+ "Try building a source file into an executable. "
+ "In this form the user need only supply a source file that defines "
+ "a 'main'. "
+ "CMake will create a CMakeLists.txt file to build the source "
+ "as an executable. "
+ "Specify COPY_FILE to get a copy of the linked executable at the "
+ "given fileName."
+ "\n"
"In this version all files in bindir/CMakeFiles/CMakeTmp, "
"will be cleaned automatically, for debugging a --debug-trycompile can "
"be passed to cmake to avoid the clean. Some extra flags that "
@@ -94,7 +99,9 @@ public:
"Return the success or failure in "
"RESULT_VAR. CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags "
"to the cmake that is run during the build. "
- "";
+ "Set variable CMAKE_TRY_COMPILE_CONFIGURATION to choose a build "
+ "configuration."
+ ;
}
cmTypeMacro(cmTryCompileCommand, cmCoreTryCompile);
diff --git a/Source/cmTryRunCommand.h b/Source/cmTryRunCommand.h
index ca48e90..f86d863 100644
--- a/Source/cmTryRunCommand.h
+++ b/Source/cmTryRunCommand.h
@@ -93,7 +93,10 @@ public:
"that when crosscompiling, the cache variables will have to be set "
"manually to the output of the executable. You can also \"guard\" the "
"calls to try_run with if(CMAKE_CROSSCOMPILING) and provide an "
- "easy-to-preset alternative for this case.\n";
+ "easy-to-preset alternative for this case.\n"
+ "Set variable CMAKE_TRY_COMPILE_CONFIGURATION to choose a build "
+ "configuration."
+ ;
}
cmTypeMacro(cmTryRunCommand, cmCoreTryCompile);
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 4bc8769..64abcb3 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 01)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 11)
+SET(KWSYS_DATE_STAMP_DAY 19)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index c5331be..adef084 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -149,7 +149,7 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(PreOrder PreOrder)
ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
SET_TESTS_PROPERTIES(MissingSourceFile PROPERTIES
- PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file \"MissingSourceFile.c\"")
+ PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
ADD_TEST_MACRO(COnly COnly)
ADD_TEST_MACRO(CxxOnly CxxOnly)
ADD_TEST_MACRO(IPO COnly/COnly)
@@ -1785,11 +1785,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SimpleCOnly_sdcc")
ENDIF(SDCC_EXECUTABLE)
-
+ # If a Linux -> MinGW cross compiler is found then try it
FIND_PROGRAM(MINGW_CC_LINUX2WIN_EXECUTABLE i586-mingw32msvc-gcc)
FIND_PROGRAM(MINGW_CXX_LINUX2WIN_EXECUTABLE i586-mingw32msvc-g++)
- MARK_AS_ADVANCED(MINGW_CC_LINUX2WIN_EXECUTABLE MINGW_CXX_LINUX2WIN_EXECUTABLE)
- IF(MINGW_CC_LINUX2WIN_EXECUTABLE AND MINGW_CXX_LINUX2WIN_EXECUTABLE)
+ FIND_PROGRAM(MINGW_RC_LINUX2WIN_EXECUTABLE i586-mingw32msvc-windres)
+ MARK_AS_ADVANCED(MINGW_CC_LINUX2WIN_EXECUTABLE MINGW_CXX_LINUX2WIN_EXECUTABLE MINGW_RC_LINUX2WIN_EXECUTABLE)
+ IF(MINGW_CC_LINUX2WIN_EXECUTABLE AND MINGW_CXX_LINUX2WIN_EXECUTABLE AND MINGW_RC_LINUX2WIN_EXECUTABLE)
ADD_TEST(Simple_Mingw_Linux2Win ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Simple"
@@ -1800,11 +1801,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--build-options
"-DCMAKE_SYSTEM_NAME=Windows"
"-DCMAKE_C_COMPILER=${MINGW_CC_LINUX2WIN_EXECUTABLE}"
- "-DCMAKE_CXX_COMPILER=${MINGW_CXX_LINUX2WIN_EXECUTABLE}")
+ "-DCMAKE_CXX_COMPILER=${MINGW_CXX_LINUX2WIN_EXECUTABLE}"
+ "-DCMAKE_RC_COMPILER=${MINGW_RC_LINUX2WIN_EXECUTABLE}"
+ )
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_Mingw_Linux2Win")
- ENDIF(MINGW_CC_LINUX2WIN_EXECUTABLE AND MINGW_CXX_LINUX2WIN_EXECUTABLE)
-
-
+ ENDIF()
ENDIF(CMAKE_TEST_GENERATOR MATCHES "Makefiles" OR CMAKE_TEST_GENERATOR MATCHES "KDevelop")
IF(UNIX)
diff --git a/Tests/MissingSourceFile/CMakeLists.txt b/Tests/MissingSourceFile/CMakeLists.txt
index 42b7c51..a7206c8 100644
--- a/Tests/MissingSourceFile/CMakeLists.txt
+++ b/Tests/MissingSourceFile/CMakeLists.txt
@@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8)
project(MissingSourceFile C)
-add_executable(MissingSourceFile MissingSourceFile.c)
+add_executable(MissingSourceFile DoesNotExist/MissingSourceFile.c)
diff --git a/Tests/SubDirSpaces/CMakeLists.txt b/Tests/SubDirSpaces/CMakeLists.txt
index a647fef..879530b 100644
--- a/Tests/SubDirSpaces/CMakeLists.txt
+++ b/Tests/SubDirSpaces/CMakeLists.txt
@@ -13,7 +13,15 @@ set(CMAKE_PAREN TRUE)
IF("${CMAKE_MAKE_PROGRAM}" MATCHES "wmake")
message("wmake does not support () in path")
set(CMAKE_PAREN FALSE)
-ENDIF("${CMAKE_MAKE_PROGRAM}" MATCHES "wmake")
+elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "make")
+ execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} no_such_target --version
+ RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out)
+ if("${out}" MATCHES "GNU Make 3.82")
+ # GNU Make 3.82 fails on parens: http://savannah.gnu.org/bugs/?30612
+ message(STATUS "GNU Make 3.82 sometimes fails on () in path")
+ set(CMAKE_PAREN FALSE)
+ endif()
+endif()
IF(CMAKE_PAREN)
ADD_DEFINITIONS(-DCMAKE_PAREN=1)
diff --git a/Utilities/Release/v20n250_aix_release.cmake b/Utilities/Release/v20n250_aix_release.cmake
index 88eb8d0..7a5c8b9 100644
--- a/Utilities/Release/v20n250_aix_release.cmake
+++ b/Utilities/Release/v20n250_aix_release.cmake
@@ -1,9 +1,9 @@
-set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" )
+set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory")
set(FINAL_PATH /u/noibm34/cmake-release)
set(PROCESSORS 2)
set(CVS_COMMAND /vol/local/bin/cvs)
-set(HOST "sshserv.centers.ihost.com" )
-set(EXTRA_HOP "rsh v20n250" )
+set(HOST "sshserv.centers.ihost.com")
+set(EXTRA_HOP "rsh p90n03")
set(MAKE_PROGRAM "make")
set(CC "xlc_r")
set(CXX "xlC_r")
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 8c10b21..6472ec5 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -415,8 +415,12 @@ CHECK_SYMBOL_EXISTS(strerror_r "string.h" HAVE_STRERROR_R)
CHECK_SYMBOL_EXISTS(strftime "time.h" HAVE_STRFTIME)
CHECK_SYMBOL_EXISTS(vprintf "stdio.h" HAVE_VPRINTF)
-CHECK_SYMBOL_EXISTS(major "sys/mkdev.h" MAJOR_IN_MKDEV)
-CHECK_SYMBOL_EXISTS(major "sys/sysmacros.h" MAJOR_IN_SYSMACROS)
+CHECK_C_SOURCE_COMPILES(
+ "#include <sys/mkdev.h>\nint main() { return major(256); }"
+ MAJOR_IN_MKDEV)
+CHECK_C_SOURCE_COMPILES(
+ "#include <sys/sysmacros.h>\nint main() { return major(256); }"
+ MAJOR_IN_SYSMACROS)
IF(HAVE_STRERROR_R)
SET(HAVE_DECL_STRERROR_R 1)
diff --git a/bootstrap b/bootstrap
index b4e19ef..b95e36a 100755
--- a/bootstrap
+++ b/bootstrap
@@ -26,6 +26,11 @@ cmake_date_stamp_component()
"
}
+cmake_toupper()
+{
+ echo "$1" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
+}
+
# Detect system and directory information.
cmake_system=`uname`
cmake_source_dir=`cd "\`dirname \"$0\"\`";pwd`
@@ -294,11 +299,23 @@ Configuration:
--verbose display more information
--parallel=n bootstrap cmake in parallel, where n is
number of nodes [1]
- --init=FILE use FILE for cmake initialization
- --system-libs use system-installed third-party libraries
+ --enable-ccache Enable ccache when building cmake
+ --init=FILE load FILE as script to populate cache
+ --system-libs use all system-installed third-party libraries
(for use only by package maintainers)
- --no-system-libs use cmake-provided third-party libraries
+ --no-system-libs use all cmake-provided third-party libraries
(default)
+ --system-curl use system-installed curl library
+ --no-system-curl use cmake-provided curl library (default)
+ --system-expat use system-installed expat library
+ --no-system-expat use cmake-provided expat library (default)
+ --system-zlib use system-installed zlib library
+ --no-system-zlib use cmake-provided zlib library (default)
+ --system-bzip2 use system-installed bzip2 library
+ --no-system-bzip2 use cmake-provided bzip2 library (default)
+ --system-libarchive use system-installed libarchive library
+ --no-system-libarchive use cmake-provided libarchive library (default)
+
--qt-gui build the Qt-based GUI (requires Qt >= 4.2)
--no-qt-gui do not build the Qt-based GUI (default)
--qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt
@@ -507,6 +524,7 @@ cmake_try_make ()
# Parse arguments
cmake_verbose=
cmake_parallel_make=
+cmake_ccache_enabled=
cmake_prefix_dir="${cmake_default_prefix}"
for a in "$@"; do
if echo $a | grep "^--prefix=" > /dev/null 2> /dev/null; then
@@ -528,11 +546,20 @@ for a in "$@"; do
if echo $a | grep "^--init=" > /dev/null 2> /dev/null; then
cmake_init_file=`echo $a | sed "s/^--init=//"`
fi
+ for lib in bzip2 curl expat libarchive zlib; do
+ if echo $a | grep "^--system-${lib}" > /dev/null 2> /dev/null; then
+ cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper ${lib}`=1"
+ break
+ elif echo $a | grep "^--no-system-${lib}" > /dev/null 2> /dev/null; then
+ cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper ${lib}`=0"
+ break
+ fi
+ done
if echo $a | grep "^--system-libs" > /dev/null 2> /dev/null; then
- cmake_bootstrap_system_libs="-DCMAKE_USE_SYSTEM_LIBRARIES=1"
+ cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1"
fi
if echo $a | grep "^--no-system-libs" > /dev/null 2> /dev/null; then
- cmake_bootstrap_system_libs="-DCMAKE_USE_SYSTEM_LIBRARIES=0"
+ cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0"
fi
if echo $a | grep "^--qt-gui" > /dev/null 2> /dev/null; then
cmake_bootstrap_qt_gui="1"
@@ -553,6 +580,9 @@ for a in "$@"; do
if echo $a | grep "^--verbose" > /dev/null 2> /dev/null; then
cmake_verbose=TRUE
fi
+ if echo $a | grep "^--enable-ccache" > /dev/null 2> /dev/null; then
+ cmake_ccache_enabled=TRUE
+ fi
done
# If verbose, display some information about bootstrap
@@ -1488,13 +1518,21 @@ cd "${cmake_binary_dir}"
# build with same compiler and make
CC="${cmake_c_compiler}"
CXX="${cmake_cxx_compiler}"
+if [ -n "${cmake_ccache_enabled}" ]; then
+ CC="ccache ${CC}"
+ CXX="ccache ${CXX}"
+fi
MAKE="${cmake_make_processor}"
export CC
export CXX
export MAKE
# Run bootstrap CMake to configure real CMake
-"${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_bootstrap_system_libs}
+cmake_options="-DCMAKE_BOOTSTRAP=1"
+if [ -n "${cmake_verbose}" ]; then
+ cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
+fi
+"${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs}
RES=$?
if [ "${RES}" -ne "0" ]; then
cmake_error 11 "Problem while running initial CMake"