summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt32
-rw-r--r--Modules/CMakeCInformation.cmake2
-rw-r--r--Modules/CMakeCXXInformation.cmake2
-rw-r--r--Modules/CMakeDetermineSystem.cmake6
-rw-r--r--Modules/CMakeDetermineVSServicePack.cmake6
-rw-r--r--Modules/CMakeFortranInformation.cmake2
-rw-r--r--Modules/CPackRPM.cmake6
-rw-r--r--Modules/CTest.cmake6
-rw-r--r--Modules/FeatureSummary.cmake14
-rw-r--r--Modules/FindBoost.cmake383
-rw-r--r--Modules/FindCUDA.cmake8
-rw-r--r--Modules/FindFLEX.cmake6
-rw-r--r--Modules/FindFLTK.cmake5
-rw-r--r--Modules/FindFLTK2.cmake4
-rw-r--r--Modules/FindMPI.cmake2
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake2
-rw-r--r--Modules/FindPythonInterp.cmake5
-rw-r--r--Modules/FindPythonLibs.cmake7
-rw-r--r--Modules/FindQt4.cmake4
-rw-r--r--Modules/FindThreads.cmake2
-rw-r--r--Modules/Platform/Windows-GNU-Fortran.cmake1
-rw-r--r--Modules/Platform/Windows-GNU.cmake35
-rw-r--r--Modules/Platform/Windows-df.cmake2
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx52
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.h3
-rw-r--r--Source/CPack/cmCPackGenerator.cxx24
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx3
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx14
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h5
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx175
-rw-r--r--Source/cmGlobalGenerator.cxx5
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx12
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx358
-rw-r--r--Source/cmInstallGenerator.cxx7
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx11
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx3
-rw-r--r--Source/cmMakefile.cxx8
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx7
-rw-r--r--Source/cmTarget.cxx18
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx50
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h4
-rw-r--r--Source/cmXCodeObject.cxx2
-rw-r--r--Source/cmake.cxx20
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake4
-rw-r--r--Tests/CMakeLists.txt3
-rw-r--r--Tests/CheckCompilerRelatedVariables/CMakeLists.txt3
-rw-r--r--Tests/CustomCommand/CMakeLists.txt24
-rw-r--r--Tests/EmptyLibrary/CMakeLists.txt4
-rw-r--r--Tests/EmptyLibrary/subdir/CMakeLists.txt1
-rw-r--r--Tests/EmptyLibrary/subdir/test.h1
-rw-r--r--Tests/ExternalProject/CMakeLists.txt16
-rw-r--r--Utilities/Release/README31
-rw-r--r--Utilities/Release/create-cmake-release.cmake7
-rw-r--r--Utilities/Release/dash2win64_cygwin.cmake3
-rw-r--r--Utilities/Release/dashsgi1_release.cmake11
-rw-r--r--Utilities/Release/dashsgi1_release64.cmake15
-rw-r--r--Utilities/Release/destiny_release.cmake12
-rw-r--r--Utilities/Release/muse_release.cmake10
-rw-r--r--Utilities/Release/muse_release64.cmake14
-rw-r--r--Utilities/Release/r15n65_aix_release.cmake22
-rw-r--r--Utilities/Release/r36n11_aix_release.cmake22
-rw-r--r--Utilities/Release/release_cmake.cmake6
-rwxr-xr-xUtilities/Release/release_cmake.sh.in2
-rw-r--r--Utilities/Release/v20n17_aix_release.cmake22
-rw-r--r--Utilities/Release/v60n177_aix_release.cmake21
-rw-r--r--Utilities/Release/vogon_cygwin.cmake11
-rw-r--r--Utilities/Release/vogon_release.cmake17
-rw-r--r--Utilities/Release/vogon_release_qt.cmake16
68 files changed, 952 insertions, 669 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b7c2d8..60ee9e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,15 +180,33 @@ MACRO(CMAKE_SETUP_TESTING)
ENDMACRO(CMAKE_SETUP_TESTING)
+# Provide a way for Visual Studio Express users to turn OFF the new FOLDER
+# organization feature. Default to ON for non-Express users. Express users must
+# explicitly turn off this option to build CMake in the Express IDE...
+#
+OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
+MARK_AS_ADVANCED(CMAKE_USE_FOLDERS)
+
+
+#-----------------------------------------------------------------------
+# a macro that only sets the FOLDER target property if it's
+# "appropriate"
+#-----------------------------------------------------------------------
MACRO(CMAKE_SET_TARGET_FOLDER tgt folder)
- # Really, I just want this to be an "if(TARGET ${tgt})" ...
- # but I'm not sure that our min req'd., CMake 2.4.5 can handle
- # that... so I'm just activating this for now, with a version
- # compare, and only for MSVC builds.
- IF(MSVC)
- IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
- SET_PROPERTY(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
+ IF(CMAKE_USE_FOLDERS)
+ SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
+
+ # Really, I just want this to be an "if(TARGET ${tgt})" ...
+ # but I'm not sure that our min req'd., CMake 2.4.5 can handle
+ # that... so I'm just activating this for now, with a version
+ # compare, and only for MSVC builds.
+ IF(MSVC)
+ IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
+ SET_PROPERTY(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
+ ENDIF()
ENDIF()
+ ELSE()
+ SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS OFF)
ENDIF()
ENDMACRO(CMAKE_SET_TARGET_FOLDER)
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 578aff9..86a824a 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -26,6 +26,8 @@ ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
+SET(_INCLUDED_FILE 0)
+
# Load compiler-specific information.
IF(CMAKE_C_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 869894c..680f8fd 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -26,6 +26,8 @@ ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
+SET(_INCLUDED_FILE 0)
+
# Load compiler-specific information.
IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index 5589dfc..0e65bce 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -47,17 +47,17 @@ IF(CMAKE_HOST_UNIX)
IF(CMAKE_UNAME)
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
- IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
+ IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
- ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
+ ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
IF("${val}" GREATER 0)
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
ENDIF("${val}" GREATER 0)
- ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
+ ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
# check the return of the last uname -m or -p
IF("${val}" GREATER 0)
SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake
index 8e4eb34..a877e6e 100644
--- a/Modules/CMakeDetermineVSServicePack.cmake
+++ b/Modules/CMakeDetermineVSServicePack.cmake
@@ -23,8 +23,8 @@
# ===========================
#=============================================================================
-# Copyright 2009 Kitware, Inc.
-# Copyright 2009 Philip Lowman <philip@yhbt.com>
+# Copyright 2009-2010 Kitware, Inc.
+# Copyright 2009-2010 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -47,6 +47,8 @@ function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version)
set(_version "vc90")
elseif(${_cl_version} VERSION_EQUAL "15.00.30729.01")
set(_version "vc90sp1")
+ elseif(${_cl_version} VERSION_EQUAL "16.00.30319.01")
+ set(_version "vc100")
else()
set(_version "")
endif()
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index cdb8038..f6a52c6 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -16,6 +16,8 @@
# It also loads the available platform file for the system-compiler
# if it exists.
+SET(_INCLUDED_FILE 0)
+
# Load compiler-specific information.
IF(CMAKE_Fortran_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 3ade3aa..e2d78802 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -548,16 +548,16 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
# We do only save CPack installed tree in _prepr
# and then restore it in build.
%prep
-mv $RPM_BUILD_ROOT \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot
+mv $RPM_BUILD_ROOT \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\"
#p build
%install
if [ -e $RPM_BUILD_ROOT ];
then
- mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/* $RPM_BUILD_ROOT
+ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/*\" $RPM_BUILD_ROOT
else
- mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot $RPM_BUILD_ROOT
+ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
fi
%clean
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index e3157fa..bb76ddd 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -228,8 +228,10 @@ IF(BUILD_TESTING)
ENDIF(NOT BUILDNAME)
# the build command
- BUILD_COMMAND(MAKECOMMAND CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
- SET(MAKECOMMAND ${MAKECOMMAND} CACHE STRING "Command to build the project")
+ BUILD_COMMAND(MAKECOMMAND_DEFAULT_VALUE
+ CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
+ SET(MAKECOMMAND ${MAKECOMMAND_DEFAULT_VALUE}
+ CACHE STRING "Command to build the project")
# the default build configuration the ctest build handler will use
# if there is no -C arg given to ctest:
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 594e2e7..f7bfe27 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -120,7 +120,7 @@ FUNCTION(ADD_FEATURE_INFO _name _enabled _desc)
ENDIF ()
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
-ENDFUNCTION(SET_FEATURE_INFO)
+ENDFUNCTION(ADD_FEATURE_INFO)
FUNCTION(SET_FEATURE_INFO)
@@ -199,21 +199,25 @@ FUNCTION(FEATURE_SUMMARY)
OR "${_FS_WHAT}" STREQUAL "PACKAGES_FOUND"
OR "${_FS_WHAT}" STREQUAL "PACKAGES_NOT_FOUND")
_FS_GET_FEATURE_SUMMARY( ${_FS_WHAT} _featureSummary)
+ SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
ELSEIF("${_FS_WHAT}" STREQUAL "ALL")
_FS_GET_FEATURE_SUMMARY( PACKAGES_FOUND _tmp1)
_FS_GET_FEATURE_SUMMARY( PACKAGES_NOT_FOUND _tmp2)
SET(_featureSummary "${_tmp1}${_tmp2}")
+ IF(_FS_DESCRIPTION)
+ SET(_fullText "${_FS_DESCRIPTION}${_tmp1}${_tmp2}\n")
+ ELSE(_FS_DESCRIPTION)
+ SET(_fullText "-- Found the following packages:${_tmp1}\n-- Did not find the following packages:${_tmp2}\n")
+ ENDIF(_FS_DESCRIPTION)
ELSE()
MESSAGE(FATAL_ERROR "The WHAT argument of FEATURE_SUMMARY() is set to ${_FS_WHAT}, which is not a valid value.")
ENDIF()
- SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
-
IF(_FS_FILENAME)
IF(_FS_APPEND)
- FILE(WRITE "${_FS_FILENAME}" "${_fullText}")
- ELSE(_FS_APPEND)
FILE(APPEND "${_FS_FILENAME}" "${_fullText}")
+ ELSE(_FS_APPEND)
+ FILE(WRITE "${_FS_FILENAME}" "${_fullText}")
ENDIF(_FS_APPEND)
ELSE(_FS_FILENAME)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 1a1b168..2377e10 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -17,8 +17,10 @@
#
# == Using actual libraries from within Boost: ==
#
-# set(Boost_USE_STATIC_LIBS ON)
-# set(Boost_USE_MULTITHREADED ON)
+# set(Boost_USE_STATIC_LIBS ON)
+# set(Boost_USE_MULTITHREADED ON)
+# set(Boost_USE_STATIC_RUNTIME OFF)
+# set(Boost_COMPAT_STATIC_RUNTIME OFF)
# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
#
# if(Boost_FOUND)
@@ -84,6 +86,42 @@
# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static
# boost libraries. Defaults to OFF.
#
+# Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching in system
+# paths (or other locations outside of BOOST_ROOT
+# or BOOST_INCLUDEDIR). Useful when specifying
+# BOOST_ROOT. Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries
+# linked against a static C++ standard library
+# ('s' ABI tag). Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_DEBUG_PYTHON If enabled, searches for boost libraries
+# compiled against a special debug build of
+# Python ('y' ABI tag). Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_STLPORT If enabled, searches for boost libraries
+# compiled against the STLPort standard
+# library ('p' ABI tag). Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
+# If enabled, searches for boost libraries
+# compiled against the deprecated STLPort
+# "native iostreams" feature ('n' ABI tag).
+# Defaults to OFF.
+# [Since CMake 2.8.3]
+#
+# Boost_COMPAT_STATIC_RUNTIME Set to OFF to disable backwards compatible
+# searching for libraries with the 's' ABI
+# tag on WIN32 after normal searches. You
+# should set this to OFF and also set
+# Boost_USE_STATIC_RUNTIME appropriately.
+# If not specified, defaults to ON.
+# [Since CMake 2.8.3]
+#
# Other Variables used by this module which you may want to set.
#
# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching
@@ -106,11 +144,37 @@
# (e.g. "-gcc43") if FindBoost has problems finding
# the proper Boost installation
#
+# Boost_THREADAPI When building boost.thread, sometimes the name of the
+# library contains an additional "pthread" or "win32"
+# string known as the threadapi. This can happen when
+# compiling against pthreads on Windows or win32 threads
+# on Cygwin. You may specify this variable and if set
+# when FindBoost searches for the Boost threading library
+# it will first try to match the threadapi you specify.
+# For Example: libboost_thread_win32-mgw45-mt-1_43.a
+# might be found if you specified "win32" here before
+# falling back on libboost_thread-mgw45-mt-1_43.a.
+# [Since CMake 2.8.3]
+#
+# Boost_REALPATH Resolves symbolic links for discovered boost libraries
+# to assist with packaging. For example, instead of
+# Boost_SYSTEM_LIBRARY_RELEASE being resolved to
+# "/usr/lib/libboost_system.so" it would be
+# "/usr/lib/libboost_system.so.1.42.0" instead.
+# This does not affect linking and should not be
+# enabled unless the user needs this information.
+# [Since CMake 2.8.3]
+#
+
+
+#
# These last three variables are available also as environment variables:
#
# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for
# Boost. Set this if the module has problems finding
-# the proper Boost installation.
+# the proper Boost installation. To prevent falling
+# back on the system paths, set Boost_NO_SYSTEM_PATHS
+# to true.
#
# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the
# module has problems finding the proper Boost installation
@@ -165,7 +229,7 @@
# Copyright 2007 Wengo
# Copyright 2007 Mike Jackson
# Copyright 2008 Andreas Pakulat <apaku@gmx.de>
-# Copyright 2008-2009 Philip Lowman <philip@yhbt.com>
+# Copyright 2008-2010 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -276,6 +340,28 @@ function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no)
endfunction()
#
+# Take a list of libraries with "thread" in it
+# and prepend duplicates with "thread_${Boost_THREADAPI}"
+# at the front of the list
+#
+function(_Boost_PREPEND_LIST_WITH_THREADAPI _output)
+ set(_orig_libnames ${ARGN})
+ string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames ${_orig_libnames})
+ set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE)
+endfunction()
+
+#
+# If a library is found, replace its cache entry with its REALPATH
+#
+function(_Boost_SWAP_WITH_REALPATH _library _docstring)
+ if(${_library})
+ get_filename_component(_boost_filepathreal ${${_library}} REALPATH)
+ unset(${_library} CACHE)
+ set(${_library} ${_boost_filepathreal} CACHE FILEPATH "${_docstring}")
+ endif()
+endfunction()
+
+#
# End functions/macros
#
#-------------------------------------------------------------------------------
@@ -286,6 +372,9 @@ endfunction()
IF(NOT DEFINED Boost_USE_MULTITHREADED)
SET(Boost_USE_MULTITHREADED TRUE)
ENDIF()
+if(NOT DEFINED Boost_COMPAT_STATIC_RUNTIME)
+ set(Boost_COMPAT_STATIC_RUNTIME TRUE)
+endif()
if(Boost_FIND_VERSION_EXACT)
# The version may appear in a directory with or without the patch
@@ -366,7 +455,7 @@ IF (_boost_IN_CACHE)
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} "
- "is already in the cache. For debugging messages, please clear the cache.")
+ "is already in the cache. To view debugging messages, please clear the cache.")
endif()
ELSE (_boost_IN_CACHE)
# Need to search for boost
@@ -380,6 +469,12 @@ ELSE (_boost_IN_CACHE)
"Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}")
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
endif()
IF(WIN32)
@@ -404,7 +499,7 @@ ELSE (_boost_IN_CACHE)
"-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
ENDIF(WIN32)
- SET(_boost_INCLUDE_SEARCH_DIRS
+ set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM
C:/boost/include
C:/boost
"$ENV{ProgramFiles}/boost/include"
@@ -412,6 +507,13 @@ ELSE (_boost_IN_CACHE)
/sw/local/include
)
+ # If Boost_ROOT was defined, gently correct the user
+ if(Boost_ROOT)
+ message("WARNING: Boost_ROOT was set which is incorrect and is being ignored. "
+ "You need to use BOOST_ROOT instead. "
+ "Also, we suggest setting Boost_NO_SYSTEM_PATHS.")
+ endif()
+
# If BOOST_ROOT was defined in the environment, use it.
if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
set(BOOST_ROOT $ENV{BOOST_ROOT})
@@ -449,18 +551,25 @@ ELSE (_boost_IN_CACHE)
"_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
endif()
- IF( BOOST_ROOT )
- SET(_boost_INCLUDE_SEARCH_DIRS
- ${BOOST_ROOT}/include
+ if( Boost_NO_SYSTEM_PATHS)
+ set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
+ else()
+ set(_boost_INCLUDE_SEARCH_DIRS ${_boost_INCLUDE_SEARCH_DIRS_SYSTEM})
+ endif()
+
+ if( BOOST_ROOT )
+ set(_boost_INCLUDE_SEARCH_DIRS
+ ${BOOST_ROOT}/include
${BOOST_ROOT}
${_boost_INCLUDE_SEARCH_DIRS})
- ENDIF( BOOST_ROOT )
+ endif()
- IF( BOOST_INCLUDEDIR )
+ # prepend BOOST_INCLUDEDIR to search path if specified
+ if( BOOST_INCLUDEDIR )
file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR)
- SET(_boost_INCLUDE_SEARCH_DIRS
+ set(_boost_INCLUDE_SEARCH_DIRS
${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
- ENDIF( BOOST_INCLUDEDIR )
+ endif( BOOST_INCLUDEDIR )
# ------------------------------------------------------------------------
# Search for Boost include DIR
@@ -486,10 +595,7 @@ ELSE (_boost_IN_CACHE)
ENDIF()
list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
- if(WIN32)
- # For BoostPro's underscores (and others?)
- list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
- endif()
+ list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
ENDFOREACH(_boost_VER)
@@ -507,6 +613,7 @@ ELSE (_boost_IN_CACHE)
NAMES boost/config.hpp
HINTS ${_boost_INCLUDE_SEARCH_DIRS}
PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
+ ${_boost_FIND_OPTIONS}
)
ENDIF( NOT Boost_INCLUDE_DIR )
@@ -637,7 +744,7 @@ ELSE (_boost_IN_CACHE)
endif()
endif(Boost_COMPILER)
- SET (_boost_MULTITHREADED "-mt")
+ set (_boost_MULTITHREADED "-mt")
if( NOT Boost_USE_MULTITHREADED )
set (_boost_MULTITHREADED "")
endif()
@@ -646,32 +753,67 @@ ELSE (_boost_IN_CACHE)
"_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
endif()
- SET( _boost_STATIC_TAG "")
- set( _boost_ABI_TAG "")
- IF (WIN32)
- IF(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
+ #======================
+ # Systematically build up the Boost ABI tag
+ # http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
+ set( _boost_RELEASE_ABI_TAG "-")
+ set( _boost_DEBUG_ABI_TAG "-")
+ # Key Use this library when:
+ # s linking statically to the C++ standard library and
+ # compiler runtime support libraries.
+ if(Boost_USE_STATIC_RUNTIME)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s")
+ endif()
+ # g using debug versions of the standard and runtime
+ # support libraries
+ if(WIN32)
+ if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
- SET (_boost_ABI_TAG "g")
- ENDIF()
- IF( Boost_USE_STATIC_LIBS )
- SET( _boost_STATIC_TAG "-s")
- ENDIF( Boost_USE_STATIC_LIBS )
- ENDIF(WIN32)
- SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
+ endif()
+ endif()
+ # y using special debug build of python
+ if(Boost_USE_DEBUG_PYTHON)
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y")
+ endif()
+ # d using a debug version of your code
+ set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d")
+ # p using the STLport standard library rather than the
+ # default one supplied with your compiler
+ if(Boost_USE_STLPORT)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
+ endif()
+ # n using the STLport deprecated "native iostreams" feature
+ if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
+ set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
+ set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
+ endif()
+
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_STATIC_TAG = ${_boost_STATIC_TAG}")
+ "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_ABI_TAG = ${_boost_ABI_TAG}")
+ "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}")
endif()
# ------------------------------------------------------------------------
# Begin finding boost libraries
# ------------------------------------------------------------------------
- SET(_boost_LIBRARIES_SEARCH_DIRS
+ if(BOOST_ROOT)
+ set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
+ ${BOOST_ROOT}/lib
+ ${BOOST_ROOT}/stage/lib)
+ endif()
+ set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
+ ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS}
${Boost_INCLUDE_DIR}/lib
${Boost_INCLUDE_DIR}/../lib
+ ${Boost_INCLUDE_DIR}/stage/lib
+ )
+ set(_boost_LIBRARY_SEARCH_DIRS_SYSTEM
C:/boost/lib
C:/boost
"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
@@ -680,67 +822,146 @@ ELSE (_boost_IN_CACHE)
"$ENV{ProgramFiles}/boost"
/sw/local/lib
)
- IF( BOOST_ROOT )
- SET(_boost_LIBRARIES_SEARCH_DIRS
- ${BOOST_ROOT}/lib
- ${BOOST_ROOT}/stage/lib
- ${_boost_LIBRARIES_SEARCH_DIRS})
- ENDIF( BOOST_ROOT )
+ set(_boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS})
+ if( Boost_NO_SYSTEM_PATHS )
+ set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
+ else()
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_SYSTEM})
+ endif()
- IF( BOOST_LIBRARYDIR )
+ # prepend BOOST_LIBRARYDIR to search path if specified
+ if( BOOST_LIBRARYDIR )
file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR)
- SET(_boost_LIBRARIES_SEARCH_DIRS
- ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
- ENDIF( BOOST_LIBRARYDIR )
+ set(_boost_LIBRARY_SEARCH_DIRS
+ ${BOOST_LIBRARYDIR} ${_boost_LIBRARY_SEARCH_DIRS})
+ endif()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}")
+ "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}")
endif()
- FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
- STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
- SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
- SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
- SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
-
- # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
- IF( Boost_USE_STATIC_LIBS )
- SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- IF(WIN32)
- SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
- ELSE(WIN32)
- SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
- ENDIF(WIN32)
- ENDIF( Boost_USE_STATIC_LIBS )
-
- FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
- NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}
- HINTS ${_boost_LIBRARIES_SEARCH_DIRS}
+ # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+ if( Boost_USE_STATIC_LIBS )
+ set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ if(WIN32)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ else()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
+ endif()
+ endif()
+
+ # We want to use the tag inline below without risking double dashes
+ if(_boost_RELEASE_ABI_TAG)
+ if(${_boost_RELEASE_ABI_TAG} STREQUAL "-")
+ set(_boost_RELEASE_ABI_TAG "")
+ endif()
+ endif()
+ if(_boost_DEBUG_ABI_TAG)
+ if(${_boost_DEBUG_ABI_TAG} STREQUAL "-")
+ set(_boost_DEBUG_ABI_TAG "")
+ endif()
+ endif()
+
+ # The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled
+ # on WIN32 was to:
+ # 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found)
+ # 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found)
+ # We maintain this behavior since changing it could break people's builds.
+ # To disable the ambiguous behavior, the user can
+ # set Boost_COMPAT_STATIC_RUNTIME to FALSE
+ set(_boost_STATIC_RUNTIME_WORKAROUND false)
+ if(Boost_COMPAT_STATIC_RUNTIME AND WIN32 AND Boost_USE_STATIC_LIBS)
+ if(NOT Boost_USE_STATIC_RUNTIME)
+ set(_boost_STATIC_RUNTIME_WORKAROUND true)
+ endif()
+ endif()
+
+
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ set( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
+ set( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
+ set( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
+
+ set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
+ set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
+
+ #
+ # Find RELEASE libraries
+ #
+ set(_boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}")
+ endif()
+ find_library(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
+ NAMES ${_boost_RELEASE_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS}
+ ${_boost_FIND_OPTIONS}
+ DOC "${_boost_docstring_release}"
)
- FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
- NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
- ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
- HINTS ${_boost_LIBRARIES_SEARCH_DIRS}
+ #
+ # Find DEBUG libraries
+ #
+ set(_boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+ _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
+ endif()
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}")
+ endif()
+ find_library(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
+ NAMES ${_boost_DEBUG_NAMES}
+ HINTS ${_boost_LIBRARY_SEARCH_DIRS}
+ ${_boost_FIND_OPTIONS}
+ DOC "${_boost_docstring_debug}"
)
+ if(Boost_REALPATH)
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}")
+ _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" )
+ endif()
+
_Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
- IF( Boost_USE_STATIC_LIBS )
- SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
- ENDIF( Boost_USE_STATIC_LIBS )
- ENDFOREACH(COMPONENT)
+
+ endforeach(COMPONENT)
+
+ # Restore the original find library ordering
+ if( Boost_USE_STATIC_LIBS )
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+ endif()
# ------------------------------------------------------------------------
# End finding boost libraries
# ------------------------------------------------------------------------
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index dad5709..1547b19 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -612,8 +612,10 @@ else()
endif()
########################
-# Look for the SDK stuff
+# Look for the SDK stuff. As of CUDA 3.0 NVSDKCUDA_ROOT has been replaced with
+# NVSDKCOMPUTE_ROOT with the old CUDA C contents moved into the C subdirectory
find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h
+ "$ENV{NVSDKCOMPUTE_ROOT}/C"
"$ENV{NVSDKCUDA_ROOT}"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]"
"/Developer/GPU\ Computing/C"
@@ -941,8 +943,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# we convert the strings to lists (like we want).
if(CUDA_PROPAGATE_HOST_FLAGS)
- # nvcc chokes on -g3, so replace it with -g
- if(CMAKE_COMPILER_IS_GNUCC)
+ # nvcc chokes on -g3 in versions previous to 3.0, so replace it with -g
+ if(CMAKE_COMPILER_IS_GNUCC AND CUDA_VERSION VERSION_LESS "3.0")
string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
else()
set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index 55b5639..d42e514 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -78,7 +78,11 @@ IF(FLEX_EXECUTABLE)
RESULT_VARIABLE FLEX_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
IF(NOT ${FLEX_version_result} EQUAL 0)
- MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_error}")
+ IF(FLEX_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}")
+ ELSE()
+ MESSAGE("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available")
+ ENDIF()
ELSE()
STRING(REGEX REPLACE "^flex (.*)$" "\\1"
FLEX_VERSION "${FLEX_version_output}")
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index 6d51277..03d4b8e 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -67,11 +67,6 @@ IF(APPLE)
SET( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
ENDIF(APPLE)
-IF(CYGWIN)
- FIND_LIBRARY(FLTK_MATH_LIBRARY m)
- SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ ${FLTK_MATH_LIBRARY} -lgdi32)
-ENDIF(CYGWIN)
-
# If FLTK_INCLUDE_DIR is already defined we assigne its value to FLTK_DIR
IF(FLTK_INCLUDE_DIR)
SET(FLTK_DIR ${FLTK_INCLUDE_DIR})
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index 43409d3..436e280 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -45,10 +45,6 @@ IF(APPLE)
SET( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
ENDIF(APPLE)
-IF(CYGWIN)
- SET( FLTK2_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32)
-ENDIF(CYGWIN)
-
# If FLTK2_INCLUDE_DIR is already defined we assigne its value to FLTK2_DIR
IF(FLTK2_INCLUDE_DIR)
SET(FLTK2_DIR ${FLTK2_INCLUDE_DIR})
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 45d6bff..9fef8f9 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -188,7 +188,7 @@ if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
# the cache, and we don't want to override those settings.
elseif (MPI_COMPILE_CMDLINE)
# Extract compile flags from the compile command line.
- string(REGEX MATCHALL "(^| )-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
+ string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
set(MPI_COMPILE_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
if (MPI_COMPILE_FLAGS_WORK)
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index cd33aa3..1acb021 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -232,7 +232,7 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
ENDIF (${_NAME}_FIND_VERSION)
IF(VERSION_OK)
- SET(DETAILS "${DETAILS}[v${VERSION}]")
+ SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
ELSE(VERSION_OK)
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(VERSION_OK)
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index ed6ade6..6c97ba3 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -7,7 +7,7 @@
#
#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
+# Copyright 2005-2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -20,8 +20,9 @@
# License text for the above reference.)
FIND_PROGRAM(PYTHON_EXECUTABLE
- NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
+ NAMES python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
PATHS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index d12f14a..283c914 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -128,6 +128,13 @@ FUNCTION(PYTHON_ADD_MODULE _NAME )
ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})
+ IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+ SET_TARGET_PROPERTIES(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
+ IF(WIN32 AND NOT CYGWIN)
+ SET_TARGET_PROPERTIES(${_NAME} PROPERTIES SUFFIX ".pyd")
+ ENDIF(WIN32 AND NOT CYGWIN)
+ ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+
ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
ENDFUNCTION(PYTHON_ADD_MODULE)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 0a36710..d2d39e6 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -602,10 +602,12 @@ IF (QT4_QMAKE_FOUND)
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
HINTS ${QT_LIBRARY_DIR_TMP}
+ NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
HINTS ${QT_LIBRARY_DIR_TMP}
+ NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
)
# try dropping a hint if trying to use Visual Studio with Qt built by mingw
@@ -630,7 +632,7 @@ IF (QT4_QMAKE_FOUND)
SET(QT_QTCORE_FOUND 1)
ELSE()
MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}")
- MESSAGE("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly.")
+ MESSAGE("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly, or it wasn't found for cross compiling.")
IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
ENDIF(Qt4_FIND_REQUIRED)
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index 25d48d1..4cb7451 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -6,7 +6,7 @@
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
# For systems with multiple thread libraries, caller can set
-# CMAKE_THREAD_PREFER_PTHREADS
+# CMAKE_THREAD_PREFER_PTHREAD
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
diff --git a/Modules/Platform/Windows-GNU-Fortran.cmake b/Modules/Platform/Windows-GNU-Fortran.cmake
index 8273a19..c66feed 100644
--- a/Modules/Platform/Windows-GNU-Fortran.cmake
+++ b/Modules/Platform/Windows-GNU-Fortran.cmake
@@ -1,3 +1,2 @@
include(Platform/Windows-GNU)
__windows_compiler_gnu(Fortran)
-set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 0)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index 79b2f80..ac635a5 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -76,7 +76,23 @@ macro(__windows_compiler_gnu lang)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on Windows
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE})
- set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-Wl,@")
+
+ # We prefer "@" for response files but it is not supported by gcc 3.
+ execute_process(COMMAND ${CMAKE_${lang}_COMPILER} --version OUTPUT_VARIABLE _ver ERROR_VARIABLE _ver)
+ if("${_ver}" MATCHES "\\(GCC\\) 3\\.")
+ if("${lang}" STREQUAL "Fortran")
+ # The GNU Fortran compiler reports an error:
+ # no input files; unwilling to write output files
+ # when the response file is passed with "-Wl,@".
+ set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 0)
+ else()
+ # Use "-Wl,@" to pass the response file to the linker.
+ set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-Wl,@")
+ endif()
+ elseif(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS)
+ # Use "@" to pass the response file to the front-end.
+ set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "@")
+ endif()
# Binary link rules.
set(CMAKE_${lang}_CREATE_SHARED_MODULE
@@ -85,4 +101,21 @@ macro(__windows_compiler_gnu lang)
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
+
+ # Support very long lists of object files.
+ if("${CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG}" STREQUAL "@")
+ foreach(rule CREATE_SHARED_MODULE CREATE_SHARED_LIBRARY LINK_EXECUTABLE)
+ # The gcc/collect2/ld toolchain does not use response files
+ # internally so we cannot pass long object lists. Instead pass
+ # the object file list in a response file to the archiver to put
+ # them in a temporary archive. Hand the archive to the linker.
+ string(REPLACE "<OBJECTS>" "-Wl,--whole-archive <OBJECT_DIR>/objects.a -Wl,--no-whole-archive"
+ CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}")
+ set(CMAKE_${lang}_${rule}
+ "<CMAKE_COMMAND> -E remove -f <OBJECT_DIR>/objects.a"
+ "<CMAKE_AR> cr <OBJECT_DIR>/objects.a <OBJECTS>"
+ "${CMAKE_${lang}_${rule}}"
+ )
+ endforeach()
+ endif()
endmacro()
diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake
index 753b198..f5046bf 100644
--- a/Modules/Platform/Windows-df.cmake
+++ b/Modules/Platform/Windows-df.cmake
@@ -10,6 +10,8 @@ ELSE(CMAKE_VERBOSE_MAKEFILE)
SET(CMAKE_CL_NOLOGO "/nologo")
ENDIF(CMAKE_VERBOSE_MAKEFILE)
+SET(CMAKE_Fortran_MODDIR_FLAG "-module:")
+
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 79ccdd9..c86434e 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -58,9 +58,11 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
// Change to local toplevel
cmSystemTools::ChangeDirectory(localToplevel.c_str());
std::vector<std::string>::const_iterator fileIt;
- for (fileIt = component->Files.begin(); fileIt != component->Files.end(); ++fileIt )
+ for (fileIt = component->Files.begin(); fileIt != component->Files.end();
+ ++fileIt )
{
- cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: " << (*fileIt) << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: "
+ << (*fileIt) << std::endl);
archive.Add(*fileIt);
if (!archive)
{
@@ -85,7 +87,8 @@ cmGeneratedFileStream gf; \
gf.Open(filename.c_str(), false, true); \
if (!GenerateHeader(&gf)) \
{ \
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to generate Header for archive < " \
+ cmCPackLogger(cmCPackLog::LOG_ERROR, \
+ "Problem to generate Header for archive < " \
<< filename \
<< ">." << std::endl); \
return 0; \
@@ -118,7 +121,9 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
<< std::endl);
// Begin the archive for this group
std::string packageFileName= std::string(toplevel);
- packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compGIt->first + this->GetOutputExtension();
+ packageFileName += "/"
+ +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-"+compGIt->first + this->GetOutputExtension();
// open a block in order to automatically close archive
// at the end of the block
{
@@ -142,13 +147,16 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
else
{
std::map<std::string, cmCPackComponent>::iterator compIt;
- for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt )
+ for (compIt=this->Components.begin();
+ compIt!=this->Components.end(); ++compIt )
{
std::string localToplevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
std::string packageFileName = std::string(toplevel);
localToplevel += "/"+ compIt->first;
- packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compIt->first + this->GetOutputExtension();
+ packageFileName += "/"
+ +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-"+compIt->first + this->GetOutputExtension();
{
DECLARE_AND_OPEN_ARCHIVE(packageFileName,archive);
// Add the files of this component to the archive
@@ -167,8 +175,12 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
// reset the package file names
packageFileNames.clear();
packageFileNames.push_back(std::string(toplevel));
- packageFileNames[0] += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-ALL" + this->GetOutputExtension();
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging all groups in one package...(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)"
+ packageFileNames[0] += "/"
+ +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
+ +"-ALL" + this->GetOutputExtension();
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE,
+ "Packaging all groups in one package..."
+ "(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)"
<< std::endl);
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
@@ -197,7 +209,8 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
else
{
std::map<std::string, cmCPackComponent>::iterator compIt;
- for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt )
+ for (compIt=this->Components.begin();compIt!=this->Components.end();
+ ++compIt )
{
// Add the files of this component to the archive
addOneComponentToArchive(archive,&(compIt->second));
@@ -215,9 +228,15 @@ int cmCPackArchiveGenerator::PackageFiles()
// The default behavior is to create 1 package by component group
// unless the user asked to put all COMPONENTS in a single package
- bool allGroupInOne = (NULL != (this->GetOption("CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE")));
- bool allComponentInOne = (NULL != (this->GetOption("CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
- bool ignoreComponentGroup = ( NULL != (this->GetOption("CPACK_COMPONENTS_IGNORE_GROUPS")));
+ bool allGroupInOne = (NULL !=
+ (this->GetOption(
+ "CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE")));
+ bool allComponentInOne = (NULL !=
+ (this->GetOption(
+ "CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
+ bool ignoreComponentGroup = ( NULL !=
+ (this->GetOption(
+ "CPACK_COMPONENTS_IGNORE_GROUPS")));
std::string groupingType;
@@ -248,13 +267,15 @@ int cmCPackArchiveGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " requested component grouping type <"<< groupingType
- << "> UNKNOWN not in (ALL_GROUP_IN_ONE,ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
+ << "> UNKNOWN not in (ALL_GROUP_IN_ONE,"
+ "ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
}
}
// Some components were defined but NO group
// force ignoreGroups
- if (this->ComponentGroups.empty() && (!this->Components.empty()) && (!ignoreComponentGroup)) {
+ if (this->ComponentGroups.empty() && (!this->Components.empty())
+ && (!ignoreComponentGroup)) {
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
<< this->Name << "]"
<< " Some Components defined but NO component group:"
@@ -286,7 +307,8 @@ int cmCPackArchiveGenerator::PackageFiles()
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
{
// Get the relative path to the file
- std::string rp = cmSystemTools::RelativePath(toplevel.c_str(), fileIt->c_str());
+ std::string rp = cmSystemTools::RelativePath(toplevel.c_str(),
+ fileIt->c_str());
archive.Add(rp);
if(!archive)
{
diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h
index ae545c8..6e173bd 100644
--- a/Source/CPack/cmCPackArchiveGenerator.h
+++ b/Source/CPack/cmCPackArchiveGenerator.h
@@ -45,7 +45,8 @@ protected:
* @param[in,out] archive the archive object
* @param[in] component the component whose file will be added to archive
*/
- int addOneComponentToArchive(cmArchiveWrite& archive, cmCPackComponent* component);
+ int addOneComponentToArchive(cmArchiveWrite& archive,
+ cmCPackComponent* component);
/**
* The main package file method.
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 7c3ff1d..c39aea4 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -172,7 +172,8 @@ int cmCPackGenerator::InstallProject()
= this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
std::string tempInstallDirectoryStr = bareTempInstallDirectory;
bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR"))
- | cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"));
+ | cmSystemTools::IsInternallyOn(
+ this->GetOption("CPACK_SET_DESTDIR"));
if (!setDestDir)
{
tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
@@ -694,9 +695,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
// CPACK_PACKAGING_INSTALL_PREFIX
// I know this is tricky and awkward but it's the price for
// CPACK_SET_DESTDIR backward compatibility.
- if (cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR")))
+ if (cmSystemTools::IsInternallyOn(
+ this->GetOption("CPACK_SET_DESTDIR")))
{
- this->SetOption("CPACK_INSTALL_PREFIX",this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"));
+ this->SetOption("CPACK_INSTALL_PREFIX",
+ this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"));
}
std::string dir;
if (this->GetOption("CPACK_INSTALL_PREFIX"))
@@ -782,7 +785,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
if (absoluteDestFiles.length()>0) {
absoluteDestFiles +=";";
}
- absoluteDestFiles += mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
+ absoluteDestFiles +=
+ mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Got some ABSOLUTE DESTINATION FILES: "
<< absoluteDestFiles << std::endl);
@@ -794,7 +798,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
}
}
}
- this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES",absoluteDestFiles.c_str());
+ this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES",
+ absoluteDestFiles.c_str());
return 1;
}
@@ -921,8 +926,9 @@ int cmCPackGenerator::DoPackage()
// beware we cannot just use tempDirectory as before
// because some generator will "CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
// we really want "CPACK_TEMPORARY_DIRECTORY"
- std::string fileN = cmSystemTools::RelativePath(this->GetOption("CPACK_TEMPORARY_DIRECTORY"),
- it->c_str());
+ std::string fileN =
+ cmSystemTools::RelativePath(
+ this->GetOption("CPACK_TEMPORARY_DIRECTORY"), it->c_str());
// Determine which component we are in.
std::string componentName = fileN.substr(0, fileN.find('/'));
@@ -932,7 +938,9 @@ int cmCPackGenerator::DoPackage()
// Add this file to the list of files for the component.
this->Components[componentName].Files.push_back(fileN);
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <" <<fileN<<"> to component <"<<componentName<<">"<<std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
+ <<fileN<<"> to component <"
+ <<componentName<<">"<<std::endl);
}
}
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index f6f9fbc..d0eda81 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -93,7 +93,8 @@ int cmCPackNSISGenerator::PackageFiles()
for ( sit = dirs.begin(); sit != dirs.end(); ++ sit )
{
std::string componentName;
- std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(), sit->c_str());
+ std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(),
+ sit->c_str());
if ( fileN.empty() )
{
continue;
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 389ec7f..7f3e360 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -902,7 +902,7 @@ void cmCursesMainForm::HandleInput()
this->SearchMode = false;
if ( this->SearchString.size() > 0 )
{
- this->JumpToCacheEntry(-1, this->SearchString.c_str());
+ this->JumpToCacheEntry(this->SearchString.c_str());
this->OldSearchString = this->SearchString;
}
this->SearchString = "";
@@ -1076,7 +1076,7 @@ void cmCursesMainForm::HandleInput()
{
if ( this->OldSearchString.size() > 0 )
{
- this->JumpToCacheEntry(-1, this->OldSearchString.c_str());
+ this->JumpToCacheEntry(this->OldSearchString.c_str());
}
}
// switch advanced on/off
@@ -1191,7 +1191,7 @@ int cmCursesMainForm::LoadCache(const char *)
return r;
}
-void cmCursesMainForm::JumpToCacheEntry(int idx, const char* astr)
+void cmCursesMainForm::JumpToCacheEntry(const char* astr)
{
std::string str;
if ( astr )
@@ -1199,18 +1199,14 @@ void cmCursesMainForm::JumpToCacheEntry(int idx, const char* astr)
str = cmSystemTools::LowerCase(astr);
}
- if ( size_t(idx) > this->NumberOfVisibleEntries )
- {
- return;
- }
- if ( idx < 0 && str.size() == 0)
+ if(str.empty())
{
return;
}
FIELD* cur = current_field(this->Form);
int start_index = field_index(cur);
int findex = start_index;
- while ( (findex / 3) != idx )
+ for(;;)
{
if ( str.size() > 0 )
{
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index 4084415..3e191b4 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -122,9 +122,8 @@ protected:
// Remove an entry from the interface and the cache.
void RemoveEntry(const char* value);
- // Jump to the cache value with index idx. If string str is
- // specified, it will stop on widget that contain that string.
- void JumpToCacheEntry(int idx, const char* str);
+ // Jump to the cache entry whose name matches the string.
+ void JumpToCacheEntry(const char* str);
// Copies of cache entries stored in the user interface
std::vector<cmCursesCacheEntryComposite*>* Entries;
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 74a3d35..29fcfc0 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -34,7 +34,7 @@
#include "FirstConfigure.h"
#include "cmVersion.h"
-QCMakeThread::QCMakeThread(QObject* p)
+QCMakeThread::QCMakeThread(QObject* p)
: QThread(p), CMakeInstance(NULL)
{
}
@@ -76,7 +76,7 @@ CMakeSetupDialog::CMakeSetupDialog()
this->ProgressBar->reset();
this->RemoveEntry->setEnabled(false);
this->AddEntry->setEnabled(false);
-
+
QByteArray p = settings.value("SplitterSizes").toByteArray();
this->Splitter->restoreState(p);
@@ -84,50 +84,54 @@ CMakeSetupDialog::CMakeSetupDialog()
this->setGroupedView(groupView);
this->groupedCheck->setCheckState(groupView ? Qt::Checked : Qt::Unchecked);
+ bool advancedView = settings.value("AdvancedView", false).toBool();
+ this->setAdvancedView(advancedView);
+ this->advancedCheck->setCheckState(advancedView?Qt::Checked : Qt::Unchecked);
+
QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache"));
- QObject::connect(this->ReloadCacheAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->ReloadCacheAction, SIGNAL(triggered(bool)),
this, SLOT(doReloadCache()));
this->DeleteCacheAction = FileMenu->addAction(tr("&Delete Cache"));
- QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)),
this, SLOT(doDeleteCache()));
this->ExitAction = FileMenu->addAction(tr("E&xit"));
- QObject::connect(this->ExitAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->ExitAction, SIGNAL(triggered(bool)),
this, SLOT(close()));
QMenu* ToolsMenu = this->menuBar()->addMenu(tr("&Tools"));
this->ConfigureAction = ToolsMenu->addAction(tr("&Configure"));
// prevent merging with Preferences menu item on Mac OS X
this->ConfigureAction->setMenuRole(QAction::NoRole);
- QObject::connect(this->ConfigureAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->ConfigureAction, SIGNAL(triggered(bool)),
this, SLOT(doConfigure()));
this->GenerateAction = ToolsMenu->addAction(tr("&Generate"));
- QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)),
this, SLOT(doGenerate()));
QAction* showChangesAction = ToolsMenu->addAction(tr("&Show My Changes"));
- QObject::connect(showChangesAction, SIGNAL(triggered(bool)),
+ QObject::connect(showChangesAction, SIGNAL(triggered(bool)),
this, SLOT(showUserChanges()));
#if defined(Q_WS_MAC)
- this->InstallForCommandLineAction
+ this->InstallForCommandLineAction
= ToolsMenu->addAction(tr("&Install For Command Line Use"));
- QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)),
this, SLOT(doInstallForCommandLine()));
-#endif
+#endif
QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options"));
this->SuppressDevWarningsAction = OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)"));
this->SuppressDevWarningsAction->setCheckable(true);
QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output"));
debugAction->setCheckable(true);
- QObject::connect(debugAction, SIGNAL(toggled(bool)),
+ QObject::connect(debugAction, SIGNAL(toggled(bool)),
this, SLOT(setDebugOutput(bool)));
-
+
OptionsMenu->addSeparator();
QAction* expandAction = OptionsMenu->addAction(tr("&Expand Grouped Entries"));
- QObject::connect(expandAction, SIGNAL(triggered(bool)),
+ QObject::connect(expandAction, SIGNAL(triggered(bool)),
this->CacheValues, SLOT(expandAll()));
QAction* collapseAction = OptionsMenu->addAction(tr("&Collapse Grouped Entries"));
- QObject::connect(collapseAction, SIGNAL(triggered(bool)),
+ QObject::connect(collapseAction, SIGNAL(triggered(bool)),
this->CacheValues, SLOT(collapseAll()));
QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
@@ -137,17 +141,17 @@ CMakeSetupDialog::CMakeSetupDialog()
a = HelpMenu->addAction(tr("Help"));
QObject::connect(a, SIGNAL(triggered(bool)),
this, SLOT(doHelp()));
-
+
QShortcut* filterShortcut = new QShortcut(QKeySequence::Find, this);
- QObject::connect(filterShortcut, SIGNAL(activated()),
+ QObject::connect(filterShortcut, SIGNAL(activated()),
this, SLOT(startSearch()));
-
+
this->setAcceptDrops(true);
-
+
// get the saved binary directories
QStringList buildPaths = this->loadBuildPaths();
this->BinaryDirectory->addItems(buildPaths);
-
+
this->BinaryDirectory->setCompleter(new QCMakeFileCompleter(this, true));
this->SourceDirectory->setCompleter(new QCMakeFileCompleter(this, true));
@@ -159,23 +163,23 @@ CMakeSetupDialog::CMakeSetupDialog()
// start the cmake worker thread
this->CMakeThread = new QCMakeThread(this);
QObject::connect(this->CMakeThread, SIGNAL(cmakeInitialized()),
- this, SLOT(initialize()), Qt::QueuedConnection);
+ this, SLOT(initialize()), Qt::QueuedConnection);
this->CMakeThread->start();
-
+
this->enterState(ReadyConfigure);
}
void CMakeSetupDialog::initialize()
{
// now the cmake worker thread is running, lets make our connections to it
- QObject::connect(this->CMakeThread->cmakeInstance(),
+ QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(propertiesChanged(const QCMakePropertyList&)),
this->CacheValues->cacheModel(),
SLOT(setProperties(const QCMakePropertyList&)));
QObject::connect(this->ConfigureButton, SIGNAL(clicked(bool)),
this, SLOT(doConfigure()));
- QObject::connect(this->CMakeThread->cmakeInstance(),
+ QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(configureDone(int)),
this, SLOT(finishConfigure(int)));
QObject::connect(this->CMakeThread->cmakeInstance(),
@@ -184,12 +188,12 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->GenerateButton, SIGNAL(clicked(bool)),
this, SLOT(doGenerate()));
-
+
QObject::connect(this->BrowseSourceDirectoryButton, SIGNAL(clicked(bool)),
this, SLOT(doSourceBrowse()));
QObject::connect(this->BrowseBinaryDirectoryButton, SIGNAL(clicked(bool)),
this, SLOT(doBinaryBrowse()));
-
+
QObject::connect(this->BinaryDirectory, SIGNAL(editTextChanged(QString)),
this, SLOT(onBinaryDirectoryChanged(QString)));
QObject::connect(this->SourceDirectory, SIGNAL(textChanged(QString)),
@@ -201,11 +205,11 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(binaryDirChanged(QString)),
this, SLOT(updateBinaryDirectory(QString)));
-
+
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(progressChanged(QString, float)),
this, SLOT(showProgress(QString,float)));
-
+
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(errorMessage(QString)),
this, SLOT(error(QString)));
@@ -218,29 +222,29 @@ void CMakeSetupDialog::initialize()
this, SLOT(setGroupedView(bool)));
QObject::connect(this->advancedCheck, SIGNAL(toggled(bool)),
this, SLOT(setAdvancedView(bool)));
- QObject::connect(this->Search, SIGNAL(textChanged(QString)),
+ QObject::connect(this->Search, SIGNAL(textChanged(QString)),
this, SLOT(setSearchFilter(QString)));
-
+
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(generatorChanged(QString)),
this, SLOT(updateGeneratorLabel(QString)));
this->updateGeneratorLabel(QString());
-
+
QObject::connect(this->CacheValues->cacheModel(),
- SIGNAL(dataChanged(QModelIndex,QModelIndex)),
+ SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(setCacheModified()));
-
+
QObject::connect(this->CacheValues->selectionModel(),
- SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+ SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(selectionChanged()));
- QObject::connect(this->RemoveEntry, SIGNAL(clicked(bool)),
+ QObject::connect(this->RemoveEntry, SIGNAL(clicked(bool)),
this, SLOT(removeSelectedCacheEntries()));
- QObject::connect(this->AddEntry, SIGNAL(clicked(bool)),
+ QObject::connect(this->AddEntry, SIGNAL(clicked(bool)),
this, SLOT(addCacheEntry()));
- QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)),
+ QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)),
this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool)));
-
+
if(!this->SourceDirectory->text().isEmpty() ||
!this->BinaryDirectory->lineEdit()->text().isEmpty())
{
@@ -265,7 +269,7 @@ CMakeSetupDialog::~CMakeSetupDialog()
this->CMakeThread->quit();
this->CMakeThread->wait(2000);
}
-
+
void CMakeSetupDialog::doConfigure()
{
if(this->CurrentState == Configuring)
@@ -287,7 +291,7 @@ void CMakeSetupDialog::doConfigure()
msg += bindir;
QString title = tr("Create Directory");
QMessageBox::StandardButton btn;
- btn = QMessageBox::information(this, title, msg,
+ btn = QMessageBox::information(this, title, msg,
QMessageBox::Yes | QMessageBox::No);
if(btn == QMessageBox::No)
{
@@ -295,8 +299,8 @@ void CMakeSetupDialog::doConfigure()
}
if(!dir.mkpath("."))
{
- QMessageBox::information(this, tr("Create Directory Failed"),
- QString(tr("Failed to create directory %1")).arg(dir.path()),
+ QMessageBox::information(this, tr("Create Directory Failed"),
+ QString(tr("Failed to create directory %1")).arg(dir.path()),
QMessageBox::Ok);
return;
@@ -314,12 +318,12 @@ void CMakeSetupDialog::doConfigure()
// remember path
this->addBinaryPath(dir.absolutePath());
-
+
this->enterState(Configuring);
this->CacheValues->selectionModel()->clear();
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
- "setProperties", Qt::QueuedConnection,
+ "setProperties", Qt::QueuedConnection,
Q_ARG(QCMakePropertyList,
this->CacheValues->cacheModel()->properties()));
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
@@ -337,11 +341,11 @@ void CMakeSetupDialog::finishConfigure(int err)
this->enterState(ReadyConfigure);
this->CacheValues->scrollToTop();
}
-
+
if(err != 0)
{
- QMessageBox::critical(this, tr("Error"),
- tr("Error in configuration process, project files may be invalid"),
+ QMessageBox::critical(this, tr("Error"),
+ tr("Error in configuration process, project files may be invalid"),
QMessageBox::Ok);
}
}
@@ -351,7 +355,7 @@ void CMakeSetupDialog::finishGenerate(int err)
this->enterState(ReadyConfigure);
if(err != 0)
{
- QMessageBox::critical(this, tr("Error"),
+ QMessageBox::critical(this, tr("Error"),
tr("Error in generation process, project files may be invalid"),
QMessageBox::Ok);
}
@@ -375,7 +379,7 @@ void CMakeSetupDialog::doGenerate()
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
"generate", Qt::QueuedConnection);
}
-
+
void CMakeSetupDialog::closeEvent(QCloseEvent* e)
{
// prompt for close if there are unsaved changes, and we're not busy
@@ -466,7 +470,7 @@ void CMakeSetupDialog::doInterrupt()
void CMakeSetupDialog::doSourceBrowse()
{
- QString dir = QFileDialog::getExistingDirectory(this,
+ QString dir = QFileDialog::getExistingDirectory(this,
tr("Enter Path to Source"), this->SourceDirectory->text());
if(!dir.isEmpty())
{
@@ -496,7 +500,7 @@ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir)
void CMakeSetupDialog::doBinaryBrowse()
{
- QString dir = QFileDialog::getExistingDirectory(this,
+ QString dir = QFileDialog::getExistingDirectory(this,
tr("Enter Path to Build"), this->BinaryDirectory->currentText());
if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
{
@@ -585,7 +589,7 @@ bool CMakeSetupDialog::setupFirstConfigure()
{
dialog.saveToSettings();
this->CMakeThread->cmakeInstance()->setGenerator(dialog.getGenerator());
-
+
QCMakeCacheModel* m = this->CacheValues->cacheModel();
if(dialog.compilerSetup())
@@ -593,20 +597,20 @@ bool CMakeSetupDialog::setupFirstConfigure()
QString fortranCompiler = dialog.getFortranCompiler();
if(!fortranCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
"Fortran compiler.", fortranCompiler, false);
}
QString cxxCompiler = dialog.getCXXCompiler();
if(!cxxCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
"CXX compiler.", cxxCompiler, false);
}
-
+
QString cCompiler = dialog.getCCompiler();
if(!cCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
"C compiler.", cCompiler, false);
}
}
@@ -615,38 +619,38 @@ bool CMakeSetupDialog::setupFirstConfigure()
QString fortranCompiler = dialog.getFortranCompiler();
if(!fortranCompiler.isEmpty())
{
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_Fortran_COMPILER",
"Fortran compiler.", fortranCompiler, false);
}
QString mode = dialog.getCrossIncludeMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE",
"CMake Find Include Mode", mode, false);
mode = dialog.getCrossLibraryMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY",
"CMake Find Library Mode", mode, false);
mode = dialog.getCrossProgramMode();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM",
"CMake Find Program Mode", mode, false);
-
+
QString rootPath = dialog.getCrossRoot();
- m->insertProperty(QCMakeProperty::PATH, "CMAKE_FIND_ROOT_PATH",
+ m->insertProperty(QCMakeProperty::PATH, "CMAKE_FIND_ROOT_PATH",
"CMake Find Root Path", rootPath, false);
QString systemName = dialog.getSystemName();
- m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_NAME",
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_NAME",
"CMake System Name", systemName, false);
QString cxxCompiler = dialog.getCXXCompiler();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
"CXX compiler.", cxxCompiler, false);
QString cCompiler = dialog.getCCompiler();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER",
"C compiler.", cCompiler, false);
}
else if(dialog.crossCompilerToolChainFile())
{
QString toolchainFile = dialog.getCrossCompilerToolChainFile();
- m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_TOOLCHAIN_FILE",
+ m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_TOOLCHAIN_FILE",
"Cross Compile ToolChain File", toolchainFile, false);
}
return true;
@@ -676,11 +680,11 @@ void CMakeSetupDialog::doReloadCache()
}
void CMakeSetupDialog::doDeleteCache()
-{
+{
QString title = tr("Delete Cache");
QString msg = "Are you sure you want to delete the cache?";
QMessageBox::StandardButton btn;
- btn = QMessageBox::information(this, title, msg,
+ btn = QMessageBox::information(this, title, msg,
QMessageBox::Yes | QMessageBox::No);
if(btn == QMessageBox::No)
{
@@ -721,7 +725,7 @@ void CMakeSetupDialog::setExitAfterGenerate(bool b)
void CMakeSetupDialog::addBinaryPath(const QString& path)
{
QString cleanpath = QDir::cleanPath(path);
-
+
// update UI
this->BinaryDirectory->blockSignals(true);
int idx = this->BinaryDirectory->findText(cleanpath);
@@ -732,7 +736,7 @@ void CMakeSetupDialog::addBinaryPath(const QString& path)
this->BinaryDirectory->insertItem(0, cleanpath);
this->BinaryDirectory->setCurrentIndex(0);
this->BinaryDirectory->blockSignals(false);
-
+
// save to registry
QStringList buildPaths = this->loadBuildPaths();
buildPaths.removeAll(cleanpath);
@@ -742,7 +746,7 @@ void CMakeSetupDialog::addBinaryPath(const QString& path)
void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e)
{
- if(!(this->CurrentState == ReadyConfigure ||
+ if(!(this->CurrentState == ReadyConfigure ||
this->CurrentState == ReadyGenerate))
{
e->ignore();
@@ -752,7 +756,7 @@ void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e)
const QMimeData* dat = e->mimeData();
QList<QUrl> urls = dat->urls();
QString file = urls.count() ? urls[0].toLocalFile() : QString();
- if(!file.isEmpty() &&
+ if(!file.isEmpty() &&
(file.endsWith("CMakeCache.txt", Qt::CaseInsensitive) ||
file.endsWith("CMakeLists.txt", Qt::CaseInsensitive) ) )
{
@@ -766,7 +770,7 @@ void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e)
void CMakeSetupDialog::dropEvent(QDropEvent* e)
{
- if(!(this->CurrentState == ReadyConfigure ||
+ if(!(this->CurrentState == ReadyConfigure ||
this->CurrentState == ReadyGenerate))
{
return;
@@ -801,7 +805,7 @@ QStringList CMakeSetupDialog::loadBuildPaths()
QStringList buildPaths;
for(int i=0; i<10; i++)
- {
+ {
QString p = settings.value(QString("WhereBuild%1").arg(i)).toString();
if(!p.isEmpty())
{
@@ -823,11 +827,11 @@ void CMakeSetupDialog::saveBuildPaths(const QStringList& paths)
}
for(int i=0; i<num; i++)
- {
+ {
settings.setValue(QString("WhereBuild%1").arg(i), paths[i]);
}
}
-
+
void CMakeSetupDialog::setCacheModified()
{
this->CacheModified = true;
@@ -851,8 +855,8 @@ void CMakeSetupDialog::removeSelectedCacheEntries()
void CMakeSetupDialog::selectionChanged()
{
QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows();
- if(idxs.count() &&
- (this->CurrentState == ReadyConfigure ||
+ if(idxs.count() &&
+ (this->CurrentState == ReadyConfigure ||
this->CurrentState == ReadyGenerate) )
{
this->RemoveEntry->setEnabled(true);
@@ -862,7 +866,7 @@ void CMakeSetupDialog::selectionChanged()
this->RemoveEntry->setEnabled(false);
}
}
-
+
void CMakeSetupDialog::enterState(CMakeSetupDialog::State s)
{
if(s == this->CurrentState)
@@ -953,16 +957,19 @@ void CMakeSetupDialog::setGroupedView(bool v)
{
this->CacheValues->cacheModel()->setViewType(v ? QCMakeCacheModel::GroupView : QCMakeCacheModel::FlatView);
this->CacheValues->setRootIsDecorated(v);
-
+
QSettings settings;
settings.beginGroup("Settings/StartPath");
settings.setValue("GroupView", v);
-
+
}
void CMakeSetupDialog::setAdvancedView(bool v)
{
this->CacheValues->setShowAdvanced(v);
+ QSettings settings;
+ settings.beginGroup("Settings/StartPath");
+ settings.setValue("AdvancedView", v);
}
void CMakeSetupDialog::showUserChanges()
@@ -984,7 +991,7 @@ void CMakeSetupDialog::showUserChanges()
QString command;
QString cache;
-
+
foreach(QCMakeProperty prop, changes)
{
QString type;
@@ -1020,13 +1027,13 @@ void CMakeSetupDialog::showUserChanges()
command += QString("-D%1\"%2\" ").arg(line).arg(value);
cache += QString("%1%2\n").arg(line).arg(value);
}
-
+
textedit->append(tr("Commandline options:"));
textedit->append(command);
textedit->append("\n");
textedit->append(tr("Cache file:"));
textedit->append(cache);
-
+
dialog.exec();
}
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index c6d05b0..0def336 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1871,9 +1871,10 @@ bool cmGlobalGenerator::UseFolderProperty()
return cmSystemTools::IsOn(prop);
}
- // By default, this feature is ON:
+ // By default, this feature is OFF, since it is not supported in the
+ // Visual Studio Express editions:
//
- return true;
+ return false;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 751dc24..2b9e5ba 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -323,7 +323,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
if (cumulativePath.empty())
{
- cumulativePath = *iter;
+ cumulativePath = "CMAKE_FOLDER_GUID_" + *iter;
}
else
{
@@ -431,14 +431,22 @@ void cmGlobalVisualStudio7Generator
//----------------------------------------------------------------------------
void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout)
{
+ const char *prefix = "CMAKE_FOLDER_GUID_";
+ const std::string::size_type skip_prefix = strlen(prefix);
std::string guidProjectTypeFolder = "2150E333-8FDC-42A3-9474-1A3956D46DE8";
for(std::map<std::string,std::set<std::string> >::iterator iter =
VisualStudioFolders.begin(); iter != VisualStudioFolders.end(); ++iter)
{
std::string fullName = iter->first;
std::string guid = this->GetGUID(fullName.c_str());
- std::string nameOnly = cmSystemTools::GetFilenameName(fullName);
+
cmSystemTools::ReplaceString(fullName, "/", "\\");
+ if (cmSystemTools::StringStartsWith(fullName.c_str(), prefix))
+ {
+ fullName = fullName.substr(skip_prefix);
+ }
+
+ std::string nameOnly = cmSystemTools::GetFilenameName(fullName);
fout << "Project(\"{" <<
guidProjectTypeFolder << "}\") = \"" <<
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index c63b403..0976a4d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -131,8 +131,8 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(std::string const& version)
//----------------------------------------------------------------------------
cmGlobalGenerator* cmGlobalXCodeGenerator::New()
-{
-#if defined(CMAKE_BUILD_WITH_CMAKE)
+{
+#if defined(CMAKE_BUILD_WITH_CMAKE)
cmXcodeVersionParser parser;
parser.ParseFile
("/Developer/Applications/Xcode.app/Contents/version.plist");
@@ -156,7 +156,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New()
void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
lang,
cmMakefile * mf, bool optional)
-{
+{
mf->AddDefinition("XCODE","1");
mf->AddDefinition("XCODE_VERSION", this->VersionString.c_str());
if(this->XcodeVersion == 15)
@@ -175,12 +175,12 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
mf->AddDefinition("CMAKE_GENERATOR_CC", "gcc");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "g++");
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
- // initialize Architectures so it can be used by
+ // initialize Architectures so it can be used by
// GetTargetObjectFileDirectories
this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
- const char* osxArch =
+ const char* osxArch =
mf->GetDefinition("CMAKE_OSX_ARCHITECTURES");
- const char* sysroot =
+ const char* sysroot =
mf->GetDefinition("CMAKE_OSX_SYSROOT");
if(osxArch && sysroot)
{
@@ -193,10 +193,10 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
//----------------------------------------------------------------------------
std::string cmGlobalXCodeGenerator
::GenerateBuildCommand(const char* makeProgram,
- const char *projectName,
- const char* additionalOptions,
+ const char *projectName,
+ const char* additionalOptions,
const char *targetName,
- const char* config,
+ const char* config,
bool ignoreErrors,
bool)
{
@@ -210,7 +210,7 @@ std::string cmGlobalXCodeGenerator
"Generator cannot find the appropriate make command.");
return "";
}
- std::string makeCommand =
+ std::string makeCommand =
cmSystemTools::ConvertToOutputPath(makeProgram);
std::string lowerCaseCommand = makeCommand;
cmSystemTools::LowerCase(lowerCaseCommand);
@@ -284,7 +284,7 @@ void cmGlobalXCodeGenerator::Generate()
// make sure extra targets are added before calling
// the parent generate which will call trace depends
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
- {
+ {
cmLocalGenerator* root = it->second[0];
this->SetGenerationRoot(root);
// add ALL_BUILD, INSTALL, etc
@@ -293,7 +293,7 @@ void cmGlobalXCodeGenerator::Generate()
this->ForceLinkerLanguages();
this->cmGlobalGenerator::Generate();
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
- {
+ {
cmLocalGenerator* root = it->second[0];
this->SetGenerationRoot(root);
// now create the project
@@ -319,8 +319,8 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
}
//----------------------------------------------------------------------------
-void
-cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
+void
+cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& gens)
{
cmMakefile* mf = root->GetMakefile();
@@ -339,7 +339,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
listfile += "CMakeLists.txt";
allbuild->AddSource(listfile.c_str());
- // Add XCODE depend helper
+ // Add XCODE depend helper
std::string dir = mf->GetCurrentOutputDirectory();
cmCustomCommandLine makecommand;
makecommand.push_back("make");
@@ -361,7 +361,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
for(std::vector<cmLocalGenerator*>::iterator i = gens.begin();
i != gens.end(); ++i)
{
- cmLocalGenerator* lg = *i;
+ cmLocalGenerator* lg = *i;
if(this->IsExcluded(root, *i))
{
continue;
@@ -370,7 +370,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
{
cmTarget& target = l->second;
- // make all exe, shared libs and modules
+ // make all exe, shared libs and modules
// run the depend check makefile as a post build rule
// this will make sure that when the next target is built
// things are up-to-date
@@ -385,7 +385,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
cmTarget::POST_BUILD,
"Depend check for xcode",
dir.c_str());
-
+
}
if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
{
@@ -407,8 +407,8 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
cmMakefile* mf = root->GetMakefile();
std::vector<std::string> lfiles = mf->GetListFiles();
// sort the array
- std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
- std::vector<std::string>::iterator new_end =
+ std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
+ std::vector<std::string>::iterator new_end =
std::unique(lfiles.begin(), lfiles.end());
lfiles.erase(new_end, lfiles.end());
std::string dir = mf->GetHomeOutputDirectory();
@@ -428,7 +428,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
makefileStream << "\\\n" << this->ConvertToRelativeForMake(i->c_str());
}
std::string cmake = mf->GetRequiredDefinition("CMAKE_COMMAND");
- makefileStream << "\n\t" << this->ConvertToRelativeForMake(cmake.c_str())
+ makefileStream << "\n\t" << this->ConvertToRelativeForMake(cmake.c_str())
<< " -H" << this->ConvertToRelativeForMake(
mf->GetHomeDirectory())
<< " -B" << this->ConvertToRelativeForMake(
@@ -451,7 +451,7 @@ void cmGlobalXCodeGenerator::ClearXCodeObjects()
}
//----------------------------------------------------------------------------
-cmXCodeObject*
+cmXCodeObject*
cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::PBXType ptype)
{
cmXCodeObject* obj;
@@ -468,7 +468,7 @@ cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::PBXType ptype)
}
//----------------------------------------------------------------------------
-cmXCodeObject*
+cmXCodeObject*
cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::Type type)
{
cmXCodeObject* obj = new cmXCodeObject(cmXCodeObject::None, type);
@@ -539,7 +539,7 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
buildFile->SetComment(fileRef->GetComment());
buildFile->AddAttribute("fileRef", this->CreateObjectReference(fileRef));
- cmXCodeObject* settings =
+ cmXCodeObject* settings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
settings->AddAttribute("COMPILER_FLAGS", this->CreateString(flags.c_str()));
@@ -608,7 +608,7 @@ cmGlobalXCodeGenerator::CreateXCodeFileReference(cmSourceFile* sf,
}
fileRef->AddAttribute("fileEncoding", this->CreateString("4"));
- const char* lang =
+ const char* lang =
this->CurrentLocalGenerator->GetSourceFileLanguage(*sf);
std::string sourcecode = "sourcecode";
std::string ext = sf->GetExtension();
@@ -675,7 +675,7 @@ cmGlobalXCodeGenerator::CreateXCodeFileReference(cmSourceFile* sf,
// // valid lastKnownFileType value.
// }
- fileRef->AddAttribute("lastKnownFileType",
+ fileRef->AddAttribute("lastKnownFileType",
this->CreateString(sourcecode.c_str()));
// Store the file path relative to the top of the source tree.
@@ -717,7 +717,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
std::string outdir =
cmSystemTools::CollapseFullPath(this->CurrentMakefile->
GetCurrentOutputDirectory());
- cmSystemTools::SplitPath(outdir.c_str(),
+ cmSystemTools::SplitPath(outdir.c_str(),
this->CurrentOutputDirectoryComponents);
// Select the current set of configuration types.
@@ -767,7 +767,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
*i, cmtarget);
cmXCodeObject* fr = xsf->GetObject("fileRef");
- cmXCodeObject* filetype =
+ cmXCodeObject* filetype =
fr->GetObject()->GetObject("lastKnownFileType");
cmTarget::SourceFileFlags tsFlags =
@@ -813,7 +813,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
sourceBuildPhase =
this->CreateObject(cmXCodeObject::PBXSourcesBuildPhase);
sourceBuildPhase->SetComment("Sources");
- sourceBuildPhase->AddAttribute("buildActionMask",
+ sourceBuildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
for(std::vector<cmXCodeObject*>::iterator i = sourceFiles.begin();
@@ -822,7 +822,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
buildFiles->AddObject(*i);
}
sourceBuildPhase->AddAttribute("files", buildFiles);
- sourceBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
+ sourceBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
this->CreateString("0"));
}
@@ -915,7 +915,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
for ( sfIt = mit->second.begin(); sfIt != mit->second.end(); ++ sfIt )
{
cmXCodeObject* xsf =
- this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
+ this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
*sfIt, cmtarget);
buildFiles->AddObject(xsf);
}
@@ -939,12 +939,12 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
{
buildFiles->AddObject(*i);
}
- frameworkBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
+ frameworkBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
this->CreateString("0"));
}
// create list of build phases and create the XCode target
- cmXCodeObject* buildPhases =
+ cmXCodeObject* buildPhases =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
this->CreateCustomCommands(buildPhases, sourceBuildPhase,
@@ -1033,15 +1033,15 @@ cmGlobalXCodeGenerator::CreateBuildPhase(const char* name,
{
return 0;
}
- cmXCodeObject* buildPhase =
+ cmXCodeObject* buildPhase =
this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
buildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
buildPhase->AddAttribute("files", buildFiles);
- buildPhase->AddAttribute("name",
+ buildPhase->AddAttribute("name",
this->CreateString(name));
- buildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
+ buildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
this->CreateString("0"));
buildPhase->AddAttribute("shellPath",
this->CreateString("/bin/sh"));
@@ -1064,16 +1064,16 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
frameworkBuildPhase,
cmTarget& cmtarget)
{
- std::vector<cmCustomCommand> const & prebuild
+ std::vector<cmCustomCommand> const & prebuild
= cmtarget.GetPreBuildCommands();
- std::vector<cmCustomCommand> const & prelink
+ std::vector<cmCustomCommand> const & prelink
= cmtarget.GetPreLinkCommands();
- std::vector<cmCustomCommand> const & postbuild
+ std::vector<cmCustomCommand> const & postbuild
= cmtarget.GetPostBuildCommands();
std::vector<cmSourceFile*>const &classes = cmtarget.GetSourceFiles();
// add all the sources
std::vector<cmCustomCommand> commands;
- for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
+ for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); ++i)
{
if((*i)->GetCustomCommand())
@@ -1082,7 +1082,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
}
}
std::vector<cmCustomCommand> reruncom;
- cmXCodeObject* cmakeReRunPhase =
+ cmXCodeObject* cmakeReRunPhase =
this->CreateBuildPhase("CMake ReRun", "cmakeReRunPhase",
cmtarget, reruncom);
buildPhases->AddObject(cmakeReRunPhase);
@@ -1092,15 +1092,15 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
"cmakeRulesBuildPhase",
cmtarget, commands);
// create prebuild phase
- cmXCodeObject* preBuildPhase =
+ cmXCodeObject* preBuildPhase =
this->CreateBuildPhase("CMake PreBuild Rules", "preBuildCommands",
cmtarget, prebuild);
// create prelink phase
- cmXCodeObject* preLinkPhase =
+ cmXCodeObject* preLinkPhase =
this->CreateBuildPhase("CMake PreLink Rules", "preLinkCommands",
cmtarget, prelink);
// create postbuild phase
- cmXCodeObject* postBuildPhase =
+ cmXCodeObject* postBuildPhase =
this->CreateBuildPhase("CMake PostBuild Rules", "postBuildPhase",
cmtarget, postbuild);
@@ -1167,10 +1167,10 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag,
}
//----------------------------------------------------------------------------
-void
+void
cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
cmTarget& target,
- std::vector<cmCustomCommand>
+ std::vector<cmCustomCommand>
const & commands,
const char* name)
{
@@ -1181,7 +1181,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
std::string makecmd = "make -C ";
makecmd += cdir;
makecmd += " -f ";
- makecmd +=
+ makecmd +=
this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile.c_str());
cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ ");
buildphase->AddAttribute("shellScript",
@@ -1195,7 +1195,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
for(std::vector<cmCustomCommand>::const_iterator i = commands.begin();
i != commands.end(); ++i)
{
- cmCustomCommand const& cc = *i;
+ cmCustomCommand const& cc = *i;
if(!cc.GetCommandLines().empty())
{
const std::vector<std::string>& outputs = cc.GetOutputs();
@@ -1213,7 +1213,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
}
}
}
-
+
std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory();
dir += "/CMakeScripts";
cmSystemTools::MakeDirectory(dir.c_str());
@@ -1223,19 +1223,19 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
makefile += "_";
makefile += name;
makefile += ".make";
-
- for (std::vector<std::string>::const_iterator currentConfig=
+
+ for (std::vector<std::string>::const_iterator currentConfig=
this->CurrentConfigurationTypes.begin();
currentConfig!=this->CurrentConfigurationTypes.end();
currentConfig++ )
{
- this->CreateCustomRulesMakefile(makefile.c_str(),
- target,
- commands,
+ this->CreateCustomRulesMakefile(makefile.c_str(),
+ target,
+ commands,
currentConfig->c_str(),
multipleOutputPairs);
}
-
+
std::string cdir = this->CurrentMakefile->GetCurrentOutputDirectory();
cdir = this->ConvertToRelativeForXCode(cdir.c_str());
std::string makecmd = "make -C ";
@@ -1249,18 +1249,18 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
}
makecmd += " all";
cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ ");
- buildphase->AddAttribute("shellScript",
+ buildphase->AddAttribute("shellScript",
this->CreateString(makecmd.c_str()));
}
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator
-::CreateCustomRulesMakefile(const char* makefileBasename,
- cmTarget& target,
- std::vector<cmCustomCommand>
+::CreateCustomRulesMakefile(const char* makefileBasename,
+ cmTarget& target,
+ std::vector<cmCustomCommand>
const & commands,
const char* configName,
- const std::map<cmStdString,
+ const std::map<cmStdString,
cmStdString>& multipleOutputPairs
)
{
@@ -1277,7 +1277,7 @@ void cmGlobalXCodeGenerator
makefileStream.SetCopyIfDifferent(true);
makefileStream << "# Generated by CMake, DO NOT EDIT\n";
makefileStream << "# Custom rules for " << target.GetName() << "\n";
-
+
// have all depend on all outputs
makefileStream << "all: ";
std::map<const cmCustomCommand*, cmStdString> tname;
@@ -1285,7 +1285,7 @@ void cmGlobalXCodeGenerator
for(std::vector<cmCustomCommand>::const_iterator i = commands.begin();
i != commands.end(); ++i)
{
- cmCustomCommand const& cc = *i;
+ cmCustomCommand const& cc = *i;
if(!cc.GetCommandLines().empty())
{
const std::vector<std::string>& outputs = cc.GetOutputs();
@@ -1299,10 +1299,10 @@ void cmGlobalXCodeGenerator
}
}
else
- {
+ {
cmOStringStream str;
str << "_buildpart_" << count++ ;
- tname[&cc] = std::string(target.GetName()) + str.str();
+ tname[&cc] = std::string(target.GetName()) + str.str();
makefileStream << "\\\n\t" << tname[&cc];
}
}
@@ -1311,7 +1311,7 @@ void cmGlobalXCodeGenerator
for(std::vector<cmCustomCommand>::const_iterator i = commands.begin();
i != commands.end(); ++i)
{
- cmCustomCommand const& cc = *i;
+ cmCustomCommand const& cc = *i;
if(!cc.GetCommandLines().empty())
{
bool escapeOldStyle = cc.GetEscapeOldStyle();
@@ -1330,7 +1330,7 @@ void cmGlobalXCodeGenerator
// There are no outputs. Use the generated force rule name.
makefileStream << tname[&cc] << ": ";
}
- for(std::vector<std::string>::const_iterator d =
+ for(std::vector<std::string>::const_iterator d =
cc.GetDepends().begin();
d != cc.GetDepends().end(); ++d)
{
@@ -1351,7 +1351,7 @@ void cmGlobalXCodeGenerator
}
// Add each command line to the set of commands.
- for(cmCustomCommandLines::const_iterator cl =
+ for(cmCustomCommandLines::const_iterator cl =
cc.GetCommandLines().begin();
cl != cc.GetCommandLines().end(); ++cl)
{
@@ -1359,7 +1359,7 @@ void cmGlobalXCodeGenerator
const cmCustomCommandLine& commandLine = *cl;
std::string cmd2 = this->CurrentLocalGenerator
->GetRealLocation(commandLine[0].c_str(), configName);
-
+
cmSystemTools::ReplaceString(cmd2, "/./", "/");
cmd2 = this->ConvertToRelativeForMake(cmd2.c_str());
std::string cmd;
@@ -1393,7 +1393,7 @@ void cmGlobalXCodeGenerator
// Add rules to deal with multiple outputs of custom commands.
if(!multipleOutputPairs.empty())
{
- makefileStream <<
+ makefileStream <<
"\n# Dependencies of multiple outputs to their primary outputs \n";
for(std::map<cmStdString, cmStdString>::const_iterator o =
@@ -1424,6 +1424,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string defFlags;
bool shared = ((target.GetType() == cmTarget::SHARED_LIBRARY) ||
(target.GetType() == cmTarget::MODULE_LIBRARY));
+ bool binary = ((target.GetType() == cmTarget::STATIC_LIBRARY) ||
+ (target.GetType() == cmTarget::EXECUTABLE) ||
+ shared);
const char* lang = target.GetLinkerLanguage(configName);
std::string cflags;
@@ -1438,10 +1441,17 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// Add language-specific flags.
this->CurrentLocalGenerator->AddLanguageFlags(flags, lang, configName);
-
+
// Add shared-library flags if needed.
this->CurrentLocalGenerator->AddSharedFlags(flags, lang, shared);
}
+ else if(binary)
+ {
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
+ target.GetName());
+ return;
+ }
// Add define flags
this->CurrentLocalGenerator->
@@ -1476,11 +1486,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string extraLinkOptions;
if(target.GetType() == cmTarget::EXECUTABLE)
{
- extraLinkOptions =
+ extraLinkOptions =
this->CurrentMakefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
std::string var = "CMAKE_EXE_LINKER_FLAGS_";
var += cmSystemTools::UpperCase(configName);
- std::string val =
+ std::string val =
this->CurrentMakefile->GetSafeDefinition(var.c_str());
if(val.size())
{
@@ -1579,9 +1589,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
this->CreateString(pndir.c_str()));
pndir = target.GetDirectory(configName);
}
- buildSettings->AddAttribute("EXECUTABLE_PREFIX",
+ buildSettings->AddAttribute("EXECUTABLE_PREFIX",
this->CreateString(pnprefix.c_str()));
- buildSettings->AddAttribute("EXECUTABLE_SUFFIX",
+ buildSettings->AddAttribute("EXECUTABLE_SUFFIX",
this->CreateString(pnsuffix.c_str()));
}
buildSettings->AddAttribute("SYMROOT",
@@ -1592,20 +1602,20 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
case cmTarget::STATIC_LIBRARY:
{
- buildSettings->AddAttribute("LIBRARY_STYLE",
+ buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("STATIC"));
break;
}
-
+
case cmTarget::MODULE_LIBRARY:
{
- buildSettings->AddAttribute("LIBRARY_STYLE",
+ buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("BUNDLE"));
if(this->XcodeVersion >= 22)
{
- buildSettings->AddAttribute("MACH_O_TYPE",
+ buildSettings->AddAttribute("MACH_O_TYPE",
this->CreateString("mh_bundle"));
- buildSettings->AddAttribute("GCC_DYNAMIC_NO_PIC",
+ buildSettings->AddAttribute("GCC_DYNAMIC_NO_PIC",
this->CreateString("NO"));
// Add the flags to create an executable.
std::string createFlags =
@@ -1690,7 +1700,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
plist.c_str());
std::string path =
this->ConvertToRelativeForXCode(plist.c_str());
- buildSettings->AddAttribute("INFOPLIST_FILE",
+ buildSettings->AddAttribute("INFOPLIST_FILE",
this->CreateString(path.c_str()));
}
@@ -1701,7 +1711,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
if(this->XcodeVersion >= 22)
{
- buildSettings->AddAttribute("PREBINDING",
+ buildSettings->AddAttribute("PREBINDING",
this->CreateString("NO"));
}
@@ -1726,7 +1736,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
else
{
- std::string incpath =
+ std::string incpath =
this->XCodeEscapePath(i->c_str());
dirs.Add(incpath.c_str());
}
@@ -1745,12 +1755,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
if(!fdirs.IsEmpty())
{
- buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS",
+ buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS",
fdirs.CreateList());
}
if(!dirs.IsEmpty())
{
- buildSettings->AddAttribute("HEADER_SEARCH_PATHS",
+ buildSettings->AddAttribute("HEADER_SEARCH_PATHS",
dirs.CreateList());
}
std::string oflagc = this->ExtractFlag("-O", cflags);
@@ -1792,11 +1802,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
if(gflagc.size() ==0 && gflag.size() == 0)
{
debugStr = "NO";
- }
+ }
buildSettings->AddAttribute("GCC_GENERATE_DEBUGGING_SYMBOLS",
this->CreateString(debugStr));
- buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL",
+ buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL",
this->CreateString(optLevel));
buildSettings->AddAttribute("GCC_SYMBOLS_PRIVATE_EXTERN",
this->CreateString("NO"));
@@ -1806,11 +1816,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
flags += " ";
flags += defFlags;
- buildSettings->AddAttribute("OTHER_CPLUSPLUSFLAGS",
+ buildSettings->AddAttribute("OTHER_CPLUSPLUSFLAGS",
this->CreateString(flags.c_str()));
cflags += " ";
cflags += defFlags;
- buildSettings->AddAttribute("OTHER_CFLAGS",
+ buildSettings->AddAttribute("OTHER_CFLAGS",
this->CreateString(cflags.c_str()));
}
@@ -1818,7 +1828,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
flags += " ";
flags += defFlags;
- buildSettings->AddAttribute("OTHER_CFLAGS",
+ buildSettings->AddAttribute("OTHER_CFLAGS",
this->CreateString(flags.c_str()));
}
@@ -1846,9 +1856,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
buildSettings->AddAttribute("INSTALL_PATH",
this->CreateString(install_name_dir.c_str()));
- buildSettings->AddAttribute("OTHER_LDFLAGS",
+ buildSettings->AddAttribute("OTHER_LDFLAGS",
this->CreateString(extraLinkOptions.c_str()));
- buildSettings->AddAttribute("OTHER_REZFLAGS",
+ buildSettings->AddAttribute("OTHER_REZFLAGS",
this->CreateString(""));
buildSettings->AddAttribute("SECTORDER_FLAGS",
this->CreateString(""));
@@ -1918,12 +1928,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
//----------------------------------------------------------------------------
-cmXCodeObject*
+cmXCodeObject*
cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
{
cmXCodeObject* shellBuildPhase =
this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
- shellBuildPhase->AddAttribute("buildActionMask",
+ shellBuildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
shellBuildPhase->AddAttribute("files", buildFiles);
@@ -1938,10 +1948,10 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
shellBuildPhase->AddAttribute("shellScript",
this->CreateString(
"# shell script goes here\nexit 0"));
- cmXCodeObject* target =
+ cmXCodeObject* target =
this->CreateObject(cmXCodeObject::PBXAggregateTarget);
target->SetComment(cmtarget.GetName());
- cmXCodeObject* buildPhases =
+ cmXCodeObject* buildPhases =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
std::vector<cmXCodeObject*> emptyContentVector;
this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0,
@@ -1960,7 +1970,7 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
this->CreateBuildSettings(cmtarget, buildSettings, theConfig);
target->AddAttribute("buildSettings", buildSettings);
}
- cmXCodeObject* dependencies =
+ cmXCodeObject* dependencies =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
target->AddAttribute("dependencies", dependencies);
target->AddAttribute("name", this->CreateString(cmtarget.GetName()));
@@ -1988,13 +1998,13 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
cmTarget& cmtarget)
{
- std::string configTypes =
+ std::string configTypes =
this->CurrentMakefile->GetRequiredDefinition("CMAKE_CONFIGURATION_TYPES");
std::vector<std::string> configVectorIn;
std::vector<std::string> configVector;
configVectorIn.push_back(configTypes);
cmSystemTools::ExpandList(configVectorIn, configVector);
- cmXCodeObject* configlist =
+ cmXCodeObject* configlist =
this->CreateObject(cmXCodeObject::XCConfigurationList);
cmXCodeObject* buildConfigurations =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -2005,11 +2015,11 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
comment += cmtarget.GetName();
comment += "\"";
configlist->SetComment(comment.c_str());
- target->AddAttribute("buildConfigurationList",
+ target->AddAttribute("buildConfigurationList",
this->CreateObjectReference(configlist));
for(unsigned int i = 0; i < configVector.size(); ++i)
{
- cmXCodeObject* config =
+ cmXCodeObject* config =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
buildConfigurations->AddObject(config);
cmXCodeObject* buildSettings =
@@ -2022,9 +2032,9 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
}
if(configVector.size())
{
- configlist->AddAttribute("defaultConfigurationName",
+ configlist->AddAttribute("defaultConfigurationName",
this->CreateString(configVector[0].c_str()));
- configlist->AddAttribute("defaultConfigurationIsVisible",
+ configlist->AddAttribute("defaultConfigurationIsVisible",
this->CreateString("0"));
return configVector[0];
}
@@ -2079,7 +2089,7 @@ cmXCodeObject*
cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
cmXCodeObject* buildPhases)
{
- cmXCodeObject* target =
+ cmXCodeObject* target =
this->CreateObject(cmXCodeObject::PBXNativeTarget);
target->AddAttribute("buildPhases", buildPhases);
cmXCodeObject* buildRules = this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -2097,13 +2107,13 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
this->CreateBuildSettings(cmtarget, buildSettings, defConfig.c_str());
target->AddAttribute("buildSettings", buildSettings);
}
- cmXCodeObject* dependencies =
+ cmXCodeObject* dependencies =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
target->AddAttribute("dependencies", dependencies);
target->AddAttribute("name", this->CreateString(cmtarget.GetName()));
target->AddAttribute("productName",this->CreateString(cmtarget.GetName()));
- cmXCodeObject* fileRef =
+ cmXCodeObject* fileRef =
this->CreateObject(cmXCodeObject::PBXFileReference);
if(const char* fileType = this->GetTargetFileType(cmtarget))
{
@@ -2115,7 +2125,7 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
fileRef->AddAttribute("sourceTree",
this->CreateString("BUILT_PRODUCTS_DIR"));
fileRef->SetComment(cmtarget.GetName());
- target->AddAttribute("productReference",
+ target->AddAttribute("productReference",
this->CreateObjectReference(fileRef));
if(const char* productType = this->GetTargetProductType(cmtarget))
{
@@ -2156,20 +2166,20 @@ void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target,
// now avoid circular references if dependTarget already
// depends on target then skip it. Circular references crashes
// xcode
- cmXCodeObject* dependTargetDepends =
+ cmXCodeObject* dependTargetDepends =
dependTarget->GetObject("dependencies");
if(dependTargetDepends)
{
if(dependTargetDepends->HasObject(target->GetPBXTargetDependency()))
- {
+ {
return;
}
}
-
+
cmXCodeObject* targetdep = dependTarget->GetPBXTargetDependency();
if(!targetdep)
{
- cmXCodeObject* container =
+ cmXCodeObject* container =
this->CreateObject(cmXCodeObject::PBXContainerItemProxy);
container->SetComment("PBXContainerItemProxy");
container->AddAttribute("containerPortal",
@@ -2177,25 +2187,25 @@ void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target,
container->AddAttribute("proxyType", this->CreateString("1"));
container->AddAttribute("remoteGlobalIDString",
this->CreateObjectReference(dependTarget));
- container->AddAttribute("remoteInfo",
+ container->AddAttribute("remoteInfo",
this->CreateString(
dependTarget->GetTarget()->GetName()));
- targetdep =
+ targetdep =
this->CreateObject(cmXCodeObject::PBXTargetDependency);
targetdep->SetComment("PBXTargetDependency");
targetdep->AddAttribute("target",
this->CreateObjectReference(dependTarget));
- targetdep->AddAttribute("targetProxy",
+ targetdep->AddAttribute("targetProxy",
this->CreateObjectReference(container));
dependTarget->SetPBXTargetDependency(targetdep);
}
-
+
cmXCodeObject* depends = target->GetObject("dependencies");
if(!depends)
{
cmSystemTools::
Error("target does not have dependencies attribute error..");
-
+
}
else
{
@@ -2243,14 +2253,14 @@ void cmGlobalXCodeGenerator
{
// There are multiple configurations. Add the setting to the
// buildSettings of the configuration name given.
- cmXCodeObject* configurationList =
+ cmXCodeObject* configurationList =
target->GetObject("buildConfigurationList")->GetObject();
- cmXCodeObject* buildConfigs =
+ cmXCodeObject* buildConfigs =
configurationList->GetObject("buildConfigurations");
std::vector<cmXCodeObject*> list = buildConfigs->GetObjectList();
- // each configuration and the target itself has a buildSettings in it
+ // each configuration and the target itself has a buildSettings in it
//list.push_back(target);
- for(std::vector<cmXCodeObject*>::iterator i = list.begin();
+ for(std::vector<cmXCodeObject*>::iterator i = list.begin();
i != list.end(); ++i)
{
if(configName)
@@ -2412,7 +2422,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
std::vector<cmSourceGroup> sourceGroups = mf->GetSourceGroups();
cmTargets &tgts = mf->GetTargets();
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
- {
+ {
cmTarget& cmtarget = l->second;
// Same skipping logic here as in CreateXCodeTargets so that we do not
@@ -2435,21 +2445,21 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
std::vector<cmSourceFile*> classes = cmtarget.GetSourceFiles();
- for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
+ for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
s != classes.end(); s++)
{
cmSourceFile* sf = *s;
// Add the file to the list of sources.
std::string const& source = sf->GetFullPath();
- cmSourceGroup& sourceGroup =
+ cmSourceGroup& sourceGroup =
mf->FindSourceGroup(source.c_str(), sourceGroups);
- cmXCodeObject* pbxgroup =
+ cmXCodeObject* pbxgroup =
this->CreateOrGetPBXGroup(cmtarget, &sourceGroup);
cmStdString key = GetGroupMapKey(cmtarget, sf);
this->GroupMap[key] = pbxgroup;
}
}
- }
+ }
}
//----------------------------------------------------------------------------
@@ -2475,7 +2485,7 @@ cmXCodeObject* cmGlobalXCodeGenerator
{
tgroup = this->CreateObject(cmXCodeObject::PBXGroup);
this->TargetGroup[cmtarget.GetName()] = tgroup;
- cmXCodeObject* tgroupChildren =
+ cmXCodeObject* tgroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
tgroup->AddAttribute("name", this->CreateString(cmtarget.GetName()));
tgroup->AddAttribute("children", tgroupChildren);
@@ -2498,7 +2508,7 @@ cmXCodeObject* cmGlobalXCodeGenerator
cmXCodeObject* tgroupChildren = tgroup->GetObject("children");
cmXCodeObject* group = this->CreateObject(cmXCodeObject::PBXGroup);
- cmXCodeObject* groupChildren =
+ cmXCodeObject* groupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
group->AddAttribute("name", this->CreateString(sg->GetName()));
group->AddAttribute("children", groupChildren);
@@ -2518,19 +2528,19 @@ void cmGlobalXCodeGenerator
std::vector<cmLocalGenerator*>&
generators)
{
- this->ClearXCodeObjects();
+ this->ClearXCodeObjects();
this->RootObject = 0;
this->SourcesGroupChildren = 0;
this->ResourcesGroupChildren = 0;
this->MainGroupChildren = 0;
cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
- cmXCodeObject* developBuildStyle =
+ cmXCodeObject* developBuildStyle =
this->CreateObject(cmXCodeObject::PBXBuildStyle);
cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
if(this->XcodeVersion == 15)
{
- developBuildStyle->AddAttribute("name",
+ developBuildStyle->AddAttribute("name",
this->CreateString("Development"));
developBuildStyle->AddAttribute("buildSettings", group);
listObjs->AddObject(developBuildStyle);
@@ -2546,7 +2556,7 @@ void cmGlobalXCodeGenerator
{
for(unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i)
{
- cmXCodeObject* buildStyle =
+ cmXCodeObject* buildStyle =
this->CreateObject(cmXCodeObject::PBXBuildStyle);
const char* name = this->CurrentConfigurationTypes[i].c_str();
buildStyle->AddAttribute("name", this->CreateString(name));
@@ -2560,7 +2570,7 @@ void cmGlobalXCodeGenerator
}
cmXCodeObject* mainGroup = this->CreateObject(cmXCodeObject::PBXGroup);
- this->MainGroupChildren =
+ this->MainGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
mainGroup->AddAttribute("children", this->MainGroupChildren);
if(this->XcodeVersion == 15)
@@ -2570,7 +2580,7 @@ void cmGlobalXCodeGenerator
mainGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
cmXCodeObject* sourcesGroup = this->CreateObject(cmXCodeObject::PBXGroup);
- this->SourcesGroupChildren =
+ this->SourcesGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
sourcesGroup->AddAttribute("name", this->CreateString("Sources"));
sourcesGroup->AddAttribute("children", this->SourcesGroupChildren);
@@ -2593,7 +2603,7 @@ void cmGlobalXCodeGenerator
resourcesGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
this->MainGroupChildren->AddObject(resourcesGroup);
- // now create the cmake groups
+ // now create the cmake groups
this->CreateGroups(root, generators);
cmXCodeObject* productGroup = this->CreateObject(cmXCodeObject::PBXGroup);
@@ -2603,16 +2613,16 @@ void cmGlobalXCodeGenerator
productGroup->AddAttribute("refType", this->CreateString("4"));
}
productGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
- cmXCodeObject* productGroupChildren =
+ cmXCodeObject* productGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
productGroup->AddAttribute("children", productGroupChildren);
this->MainGroupChildren->AddObject(productGroup);
-
-
+
+
this->RootObject = this->CreateObject(cmXCodeObject::PBXProject);
this->RootObject->SetComment("Project object");
group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
- this->RootObject->AddAttribute("mainGroup",
+ this->RootObject->AddAttribute("mainGroup",
this->CreateObjectReference(mainGroup));
this->RootObject->AddAttribute("buildSettings", group);
this->RootObject->AddAttribute("buildStyles", listObjs);
@@ -2639,18 +2649,18 @@ void cmGlobalXCodeGenerator
this->CreateString(pdir.c_str()));
this->RootObject->AddAttribute("projectRoot", this->CreateString(""));
}
- cmXCodeObject* configlist =
+ cmXCodeObject* configlist =
this->CreateObject(cmXCodeObject::XCConfigurationList);
cmXCodeObject* buildConfigurations =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
std::vector<cmXCodeObject*> configs;
if(this->XcodeVersion == 15)
{
- cmXCodeObject* configDebug =
+ cmXCodeObject* configDebug =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
configDebug->AddAttribute("name", this->CreateString("Debug"));
configs.push_back(configDebug);
- cmXCodeObject* configRelease =
+ cmXCodeObject* configRelease =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
configRelease->AddAttribute("name", this->CreateString("Release"));
configs.push_back(configRelease);
@@ -2660,7 +2670,7 @@ void cmGlobalXCodeGenerator
for(unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i)
{
const char* name = this->CurrentConfigurationTypes[i].c_str();
- cmXCodeObject* config =
+ cmXCodeObject* config =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
config->AddAttribute("name", this->CreateString(name));
configs.push_back(config);
@@ -2678,13 +2688,13 @@ void cmGlobalXCodeGenerator
comment += this->CurrentProject;
comment += "\"";
configlist->SetComment(comment.c_str());
- configlist->AddAttribute("defaultConfigurationIsVisible",
+ configlist->AddAttribute("defaultConfigurationIsVisible",
this->CreateString("0"));
- configlist->AddAttribute("defaultConfigurationName",
+ configlist->AddAttribute("defaultConfigurationName",
this->CreateString("Debug"));
cmXCodeObject* buildSettings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
- const char* osxArch =
+ const char* osxArch =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES");
if(strlen(osxArch) == 0)
{
@@ -2709,11 +2719,11 @@ void cmGlobalXCodeGenerator
this->CreateString("YES"));
}
- const char* sysroot =
+ const char* sysroot =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
- const char* sysrootDefault =
+ const char* sysrootDefault =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
- const char* deploymentTarget =
+ const char* deploymentTarget =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
if(osxArch && sysroot)
{
@@ -2723,22 +2733,24 @@ void cmGlobalXCodeGenerator
cmSystemTools::ExpandListArgument(std::string(osxArch),
this->Architectures);
flagsUsed = true;
- buildSettings->AddAttribute("SDKROOT",
+ buildSettings->AddAttribute("SDKROOT",
this->CreateString(sysroot));
std::string archString;
- for( std::vector<std::string>::iterator i =
+ const char* sep = "";
+ for( std::vector<std::string>::iterator i =
this->Architectures.begin();
i != this->Architectures.end(); ++i)
{
+ archString += sep;
archString += *i;
- archString += " ";
+ sep = " ";
}
- buildSettings->AddAttribute("ARCHS",
+ buildSettings->AddAttribute("ARCHS",
this->CreateString(archString.c_str()));
if(!flagsUsed && sysrootDefault &&
strcmp(sysroot, sysrootDefault) != 0)
{
- buildSettings->AddAttribute("SDKROOT",
+ buildSettings->AddAttribute("SDKROOT",
this->CreateString(sysroot));
}
}
@@ -2774,7 +2786,7 @@ void cmGlobalXCodeGenerator
(*i)->AddAttribute("buildSettings", buildSettings);
}
- this->RootObject->AddAttribute("buildConfigurationList",
+ this->RootObject->AddAttribute("buildConfigurationList",
this->CreateObjectReference(configlist));
std::vector<cmXCodeObject*> targets;
@@ -2799,7 +2811,7 @@ void cmGlobalXCodeGenerator
cmXCodeObject* allTargets = this->CreateObject(cmXCodeObject::OBJECT_LIST);
for(std::vector<cmXCodeObject*>::iterator i = targets.begin();
i != targets.end(); ++i)
- {
+ {
cmXCodeObject* t = *i;
allTargets->AddObject(t);
cmXCodeObject* productRef = t->GetObject("productReference");
@@ -2812,11 +2824,11 @@ void cmGlobalXCodeGenerator
}
//----------------------------------------------------------------------------
-void
+void
cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
std::vector<cmXCodeObject*>& targets)
-{
- cmGeneratedFileStream
+{
+ cmGeneratedFileStream
makefileStream(this->CurrentXCodeHackMakefile.c_str());
if(!makefileStream)
{
@@ -2862,9 +2874,9 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
this->ConvertToRelativeForMake(tfull.c_str());
}
}
- makefileStream << "\n\n";
+ makefileStream << "\n\n";
}
- makefileStream
+ makefileStream
<< "# For each target create a dummy rule "
"so the target does not have to exist\n";
std::set<cmStdString> emitted;
@@ -2874,7 +2886,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
cmXCodeObject* target = *i;
std::map<cmStdString, cmXCodeObject::StringVec> const& deplibs =
target->GetDependLibraries();
- for(std::map<cmStdString, cmXCodeObject::StringVec>::const_iterator ci
+ for(std::map<cmStdString, cmXCodeObject::StringVec>::const_iterator ci
= deplibs.begin(); ci != deplibs.end(); ++ci)
{
for(cmXCodeObject::StringVec::const_iterator d = ci->second.begin();
@@ -2882,7 +2894,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
{
if(emitted.insert(*d).second)
{
- makefileStream <<
+ makefileStream <<
this->ConvertToRelativeForMake(d->c_str()) << ":\n";
}
}
@@ -2891,10 +2903,10 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
makefileStream << "\n\n";
// Write rules to help Xcode relink things at the right time.
- makefileStream <<
+ makefileStream <<
"# Rules to remove targets that are older than anything to which they\n"
"# link. This forces Xcode to relink the targets from scratch. It\n"
- "# does not seem to check these dependencies itself.\n";
+ "# does not seem to check these dependencies itself.\n";
for(std::vector<std::string>::const_iterator
ct = this->CurrentConfigurationTypes.begin();
ct != this->CurrentConfigurationTypes.end(); ++ct)
@@ -2915,7 +2927,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
{
// Create a rule for this target.
std::string tfull = t->GetFullPath(configName);
- makefileStream << this->ConvertToRelativeForMake(tfull.c_str())
+ makefileStream << this->ConvertToRelativeForMake(tfull.c_str())
<< ":";
// List dependencies if any exist.
@@ -2927,7 +2939,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
for(std::vector<cmStdString>::const_iterator d = deplibs.begin();
d != deplibs.end(); ++d)
{
- makefileStream << "\\\n\t" <<
+ makefileStream << "\\\n\t" <<
this->ConvertToRelativeForMake(d->c_str());
}
}
@@ -2949,7 +2961,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
universal += "/";
universal += t->GetName();
universal += ".build/Objects-normal/";
- for( std::vector<std::string>::iterator arch =
+ for( std::vector<std::string>::iterator arch =
this->Architectures.begin();
arch != this->Architectures.end(); ++arch)
{
@@ -2958,7 +2970,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
universalFile += "/";
universalFile += t->GetFullName(configName);
makefileStream << "\t/bin/rm -f "
- <<
+ <<
this->ConvertToRelativeForMake(universalFile.c_str())
<< "\n";
}
@@ -2972,7 +2984,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
//----------------------------------------------------------------------------
void
cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
- std::vector<cmLocalGenerator*>&
+ std::vector<cmLocalGenerator*>&
generators)
{
if(generators.size() == 0)
@@ -3012,7 +3024,7 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
}
//----------------------------------------------------------------------------
-void
+void
cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
cmLocalGenerator* ,
std::vector<cmLocalGenerator*>& )
@@ -3070,7 +3082,7 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(const char* p)
}
else
{
- std::string ret =
+ std::string ret =
this->CurrentLocalGenerator->
ConvertToRelativePath(this->CurrentOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
@@ -3086,7 +3098,7 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForXCode(const char* p)
}
else
{
- std::string ret =
+ std::string ret =
this->CurrentLocalGenerator->
ConvertToRelativePath(this->ProjectOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
@@ -3126,7 +3138,7 @@ std::string cmGlobalXCodeGenerator::XCodeEscapePath(const char* p)
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator::
GetTargetObjectFileDirectories(cmTarget* target,
- std::vector<std::string>&
+ std::vector<std::string>&
dirs)
{
std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory();
@@ -3140,7 +3152,7 @@ GetTargetObjectFileDirectories(cmTarget* target,
std::string dirsave = dir;
if(this->Architectures.size())
{
- for(std::vector<std::string>::iterator i = this->Architectures.begin();
+ for(std::vector<std::string>::iterator i = this->Architectures.begin();
i != this->Architectures.end(); ++i)
{
dir += *i;
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index 9d5e416..d7505dc 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -67,8 +67,11 @@ void cmInstallGenerator
for(std::vector<std::string>::const_iterator fi = files.begin();
fi != files.end(); ++fi)
{
- if (fi!=files.begin()) os << ";";
- os << dest << cmSystemTools::ConvertToOutputPath("/");
+ if (fi!=files.begin())
+ {
+ os << ";";
+ }
+ os << dest << "/";
if (rename && *rename)
{
os << rename;
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 004d19a..f04d0a0 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1062,9 +1062,16 @@ cmLocalUnixMakefileGenerator3
}
}
}
- if (useCall && launcher.empty())
+ if (launcher.empty())
{
- cmd = "call " + cmd;
+ if (useCall)
+ {
+ cmd = "call " + cmd;
+ }
+ else if (this->NMake && cmd[0]=='"')
+ {
+ cmd = "echo >nul && " + cmd;
+ }
}
commands1.push_back(cmd);
}
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 01fcafd..eb4e4a4 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1187,7 +1187,8 @@ void cmLocalVisualStudio6Generator
extraLinkOptionsMinSizeRel += targetLinkFlags;
}
- if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
+ if(const char* targetLinkFlags =
+ target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
{
extraLinkOptionsRelWithDebInfo += " ";
extraLinkOptionsRelWithDebInfo += targetLinkFlags;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c64053a..ef15113 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -894,6 +894,14 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
// Construct a rule file associated with the first output produced.
std::string outName = outputs[0];
outName += ".rule";
+ const char* dir =
+ this->LocalGenerator->GetGlobalGenerator()->
+ GetCMakeCFGInitDirectory();
+ if(dir && dir[0] == '$')
+ {
+ cmSystemTools::ReplaceString(outName, dir,
+ cmake::GetCMakeFilesDirectory());
+ }
// Check if the rule file already exists.
file = this->GetSource(outName.c_str());
if(file && file->GetCustomCommand() && !replace)
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 93c981a..a5e319d 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -345,6 +345,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
vars.CMTarget = this->Target;
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
+ std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
+ objdir += this->Target->GetName();
+ objdir += ".dir";
+ objdir = this->Convert(objdir.c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::SHELL);
+ vars.ObjectDir = objdir.c_str();
vars.Target = targetOutPathReal.c_str();
vars.TargetPDB = targetOutPathPDB.c_str();
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 458d1a5..3ee329f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -393,6 +393,24 @@ void cmTarget::DefineProperties(cmake *cm)
"from which the target is imported.");
cm->DefineProperty
+ ("IMPORTED_NO_SONAME", cmProperty::TARGET,
+ "Specifies that an IMPORTED shared library target has no \"soname\". ",
+ "Set this property to true for an imported shared library file that "
+ "has no \"soname\" field. "
+ "CMake may adjust generated link commands for some platforms to prevent "
+ "the linker from using the path to the library in place of its missing "
+ "soname. "
+ "Ignored for non-imported targets.");
+
+ cm->DefineProperty
+ ("IMPORTED_NO_SONAME_<CONFIG>", cmProperty::TARGET,
+ "Per-configuration version of IMPORTED_NO_SONAME property.",
+ "This property is used when loading settings for the <CONFIG> "
+ "configuration of an imported target. "
+ "Configuration names correspond to those provided by the project "
+ "from which the target is imported.");
+
+ cm->DefineProperty
("EXCLUDE_FROM_ALL", cmProperty::TARGET,
"Exclude the target from the all target.",
"A property on a target that indicates if the target is excluded "
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b290aed..9c0364b 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -32,6 +32,30 @@ static std::string cmVS10EscapeXML(std::string arg)
return arg;
}
+static std::string cmVS10EscapeComment(std::string comment)
+{
+ // MSBuild takes the CDATA of a <Message></Message> element and just
+ // does "echo $CDATA" with no escapes. We must encode the string.
+ // http://technet.microsoft.com/en-us/library/cc772462%28WS.10%29.aspx
+ std::string echoable;
+ for(std::string::iterator c = comment.begin(); c != comment.end(); ++c)
+ {
+ switch (*c)
+ {
+ case '\r': break;
+ case '\n': echoable += '\t'; break;
+ case '"': /* no break */
+ case '|': /* no break */
+ case '&': /* no break */
+ case '<': /* no break */
+ case '>': /* no break */
+ case '^': echoable += '^'; /* no break */
+ default: echoable += *c; break;
+ }
+ }
+ return echoable;
+}
+
cmVisualStudio10TargetGenerator::
cmVisualStudio10TargetGenerator(cmTarget* target,
cmGlobalVisualStudio10Generator* gg)
@@ -125,7 +149,10 @@ void cmVisualStudio10TargetGenerator::Generate()
".vcxproj");
if(this->Target->GetType() <= cmTarget::MODULE_LIBRARY)
{
- this->ComputeClOptions();
+ if(!this->ComputeClOptions())
+ {
+ return;
+ }
}
cmMakefile* mf = this->Target->GetMakefile();
std::string path = mf->GetStartOutputDirectory();
@@ -325,6 +352,7 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
}
cmLocalVisualStudio7Generator* lg = this->LocalGenerator;
std::string comment = lg->ConstructComment(command);
+ comment = cmVS10EscapeComment(comment);
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>
(this->GlobalGenerator)->GetConfigurations();
@@ -347,7 +375,7 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
command.GetEscapeAllowMakeVars())
);
this->WritePlatformConfigTag("Message",i->c_str(), 3);
- (*this->BuildFileStream ) << comment << "</Message>\n";
+ (*this->BuildFileStream ) << cmVS10EscapeXML(comment) << "</Message>\n";
this->WritePlatformConfigTag("Command", i->c_str(), 3);
(*this->BuildFileStream ) << script << "</Command>\n";
this->WritePlatformConfigTag("AdditionalInputs", i->c_str(), 3);
@@ -767,7 +795,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
hasFlags = true;
this->WriteString("<ObjectFileName>", 3);
(*this->BuildFileStream )
- << "$(Configuration)/" << objectName << "</ObjectFileName>\n";
+ << "$(IntDir)/" << objectName << "</ObjectFileName>\n";
}
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>
@@ -949,19 +977,23 @@ OutputLinkIncremental(std::string const& configName)
}
//----------------------------------------------------------------------------
-void cmVisualStudio10TargetGenerator::ComputeClOptions()
+bool cmVisualStudio10TargetGenerator::ComputeClOptions()
{
std::vector<std::string> const* configs =
this->GlobalGenerator->GetConfigurations();
for(std::vector<std::string>::const_iterator i = configs->begin();
i != configs->end(); ++i)
{
- this->ComputeClOptions(*i);
+ if(!this->ComputeClOptions(*i))
+ {
+ return false;
+ }
}
+ return true;
}
//----------------------------------------------------------------------------
-void cmVisualStudio10TargetGenerator::ComputeClOptions(
+bool cmVisualStudio10TargetGenerator::ComputeClOptions(
std::string const& configName)
{
// much of this was copied from here:
@@ -984,7 +1016,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
cmSystemTools::Error
("CMake can not determine linker language for target:",
this->Name.c_str());
- return;
+ return false;
}
if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0
|| strcmp(linkLanguage, "Fortran") == 0)
@@ -1044,6 +1076,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
}
this->ClOptions[configName] = pOptions.release();
+ return true;
}
//----------------------------------------------------------------------------
@@ -1433,8 +1466,9 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
command.GetEscapeAllowMakeVars())
);
}
+ comment = cmVS10EscapeComment(comment);
this->WriteString("<Message>",3);
- (*this->BuildFileStream ) << comment << "</Message>\n";
+ (*this->BuildFileStream ) << cmVS10EscapeXML(comment) << "</Message>\n";
this->WriteString("<Command>", 3);
(*this->BuildFileStream ) << script;
(*this->BuildFileStream ) << "</Command>" << "\n";
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 64b2361..c3c27f4 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -50,8 +50,8 @@ private:
void WriteObjSources();
void WritePathAndIncrementalLinkOptions();
void WriteItemDefinitionGroups();
- void ComputeClOptions();
- void ComputeClOptions(std::string const& configName);
+ bool ComputeClOptions();
+ bool ComputeClOptions(std::string const& configName);
void WriteClOptions(std::string const& config,
std::vector<std::string> const & includes);
void WriteRCOptions(std::string const& config,
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 07c7b8c..5920470 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -236,7 +236,7 @@ void cmXCodeObject::PrintString(std::ostream& os) const
// considered special by the Xcode project file parser.
bool needQuote =
(this->String.empty() ||
- this->String.find_first_of(" <>.+-=@") != this->String.npos);
+ this->String.find_first_of(" <>.+-=@$") != this->String.npos);
const char* quote = needQuote? "\"" : "";
// Print the string, quoted and escaped as necessary.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e6c7bb0..2ebd165 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1574,6 +1574,24 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
cmSystemTools::Error("Problem extracting tar: ", outFile.c_str());
return 1;
}
+#ifdef WIN32
+ // OK, on windows 7 after we untar some files,
+ // sometimes we can not rename the directory after
+ // the untar is done. This breaks the external project
+ // untar and rename code. So, by default we will wait
+ // 1/10th of a second after the untar. If CMAKE_UNTAR_DELAY
+ // is set in the env, its value will be used instead of 100.
+ int delay = 100;
+ const char* delayVar = cmSystemTools::GetEnv("CMAKE_UNTAR_DELAY");
+ if(delayVar)
+ {
+ delay = atoi(delayVar);
+ }
+ if(delay)
+ {
+ cmSystemTools::Delay(delay);
+ }
+#endif
}
return 0;
}
@@ -3486,7 +3504,7 @@ void cmake::DefineProperties(cmake *cm)
cm->DefineProperty
("USE_FOLDERS", cmProperty::GLOBAL,
"Use the FOLDER target property to organize targets into folders.",
- "If not set, CMake treats this property as ON by default. "
+ "If not set, CMake treats this property as OFF by default. "
"CMake generators that are capable of organizing into a "
"hierarchy of folders use the values of the FOLDER target "
"property to name those folders. See also the documentation "
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 99c8b27..8cddd2f 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2010)
# KWSys version date month component. Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 09)
+SET(KWSYS_DATE_STAMP_MONTH 10)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 14)
+SET(KWSYS_DATE_STAMP_DAY 06)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 5e88b5c..c056e86 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -153,6 +153,9 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(ExportImport ExportImport)
ADD_TEST_MACRO(Unset Unset)
ADD_TEST_MACRO(PolicyScope PolicyScope)
+ ADD_TEST_MACRO(EmptyLibrary EmptyLibrary)
+ SET_TESTS_PROPERTIES(EmptyLibrary PROPERTIES
+ PASS_REGULAR_EXPRESSION "CMake Error: CMake can not determine linker language for target:test")
ADD_TEST_MACRO(CrossCompile CrossCompile)
SET_TESTS_PROPERTIES(CrossCompile PROPERTIES
PASS_REGULAR_EXPRESSION "TRY_RUN.. invoked in cross-compiling mode")
diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
index 7206f1d..8095a1c 100644
--- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
+++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
@@ -76,7 +76,8 @@ endif()
file(WRITE
"${CMAKE_CURRENT_BINARY_DIR}/main.cxx"
- "int main() { return 0; }"
+ "int main() { return 0; }
+"
)
add_executable(
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index 4fc9fb5..76208d4 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -9,12 +9,16 @@ ADD_SUBDIRECTORY(GeneratedHeader)
#
# Lib and exe path
#
-SET (LIBRARY_OUTPUT_PATH
- ${PROJECT_BINARY_DIR}/bin/ CACHE INTERNAL
+IF(NOT DEFINED bin_dir)
+ SET(bin_dir "bin")
+ENDIF()
+
+SET (LIBRARY_OUTPUT_PATH
+ ${PROJECT_BINARY_DIR}/${bin_dir} CACHE INTERNAL
"Single output directory for building all libraries.")
-SET (EXECUTABLE_OUTPUT_PATH
- ${PROJECT_BINARY_DIR}/bin/ CACHE INTERNAL
+SET (EXECUTABLE_OUTPUT_PATH
+ ${PROJECT_BINARY_DIR}/${bin_dir} CACHE INTERNAL
"Single output directory for building all executables.")
################################################################
@@ -220,7 +224,12 @@ ADD_CUSTOM_COMMAND(OUTPUT gen_redirect.c
##############################################################################
# Test non-trivial command line arguments in custom commands.
SET(EXPECTED_ARGUMENTS)
+SET(CHECK_ARGS)
+IF(NOT MSVC71)
+ SET(CHECK_ARGS -DPATH=c:/posix/path)
+ENDIF()
SET(CHECK_ARGS
+ ${CHECK_ARGS}
c:/posix/path
c:\\windows\\path
'single-quotes'
@@ -359,13 +368,16 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in
@ONLY IMMEDIATE)
ADD_EXECUTABLE(check_command_line
${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c)
+SET(output_name "check_command_line")
+SET_PROPERTY(TARGET check_command_line
+ PROPERTY OUTPUT_NAME ${output_name})
# SET_TARGET_PROPERTIES(check_command_line PROPERTIES
# COMPILE_FLAGS -DCHECK_COMMAND_LINE_VERBOSE)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/command_line_check
COMMAND ${CMAKE_COMMAND} -DMARK_FILE=${CMAKE_CURRENT_BINARY_DIR}/check_mark.txt
-P ${CMAKE_CURRENT_SOURCE_DIR}/check_mark.cmake
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${output_name}
${CHECK_ARGS} ""
VERBATIM
COMMENT "Checking custom command line escapes (single'quote)"
@@ -375,7 +387,7 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/command_line_check
ADD_CUSTOM_TARGET(do_check_command_line ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/command_line_check
COMMAND ${CMAKE_COMMAND} -E echo "Checking custom target command escapes"
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${output_name}
${CHECK_ARGS} ""
VERBATIM
COMMENT "Checking custom target command line escapes ($dollar-signs$)"
diff --git a/Tests/EmptyLibrary/CMakeLists.txt b/Tests/EmptyLibrary/CMakeLists.txt
new file mode 100644
index 0000000..baddbbf
--- /dev/null
+++ b/Tests/EmptyLibrary/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 2.6)
+project(TestEmptyLibrary)
+
+add_subdirectory(subdir)
diff --git a/Tests/EmptyLibrary/subdir/CMakeLists.txt b/Tests/EmptyLibrary/subdir/CMakeLists.txt
new file mode 100644
index 0000000..e273f8d
--- /dev/null
+++ b/Tests/EmptyLibrary/subdir/CMakeLists.txt
@@ -0,0 +1 @@
+add_library(test test.h)
diff --git a/Tests/EmptyLibrary/subdir/test.h b/Tests/EmptyLibrary/subdir/test.h
new file mode 100644
index 0000000..8511f53
--- /dev/null
+++ b/Tests/EmptyLibrary/subdir/test.h
@@ -0,0 +1 @@
+extern int dummy;
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index bf90a52..a878194 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -7,6 +7,13 @@ find_package(CVS)
find_package(Subversion)
find_package(Git)
+option(ExternalProjectTest_USE_FOLDERS "Enable folder grouping in IDEs." ON)
+if(ExternalProjectTest_USE_FOLDERS)
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+else()
+ set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
+endif()
+
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER
"CMakePredefinedTargets-in-ExternalProjectTest")
@@ -61,6 +68,15 @@ ExternalProject_Add(${proj}
INSTALL_COMMAND ""
)
+set(proj TargetNameSameAsFolder)
+ExternalProject_Add(${proj}
+ BUILD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ DOWNLOAD_COMMAND ""
+ INSTALL_COMMAND ""
+)
+set_property(TARGET ${proj} PROPERTY FOLDER "${proj}")
+
set(proj MinimalNoOpProject)
ExternalProject_Add(${proj}
BUILD_COMMAND ""
diff --git a/Utilities/Release/README b/Utilities/Release/README
index 75cdf48..12eafe1 100644
--- a/Utilities/Release/README
+++ b/Utilities/Release/README
@@ -1,28 +1,21 @@
-To create a cmake release, first test the branch:
+To create a cmake release, make sure the "release" tag is pointing to the
+expected git commit:
-mkdir 2-4
-cd 2-4
-cmake -DCMAKE_CREATE_VERSION=CMake-2-4 -P ../create-cmake-release.cmake
-./create-CMake-2-4.sh
+http://cmake.org/gitweb?p=cmake.git;a=shortlog;h=refs/heads/release
-If that works:
-EDIT CMakeLists.txt and remove the RC setting!
-commit that.
+Then as kitware@hythloth, using an up-to-date CMake:
-Then tag the minor release:
-cvs tag 2-4-7
+ cd ~/CMakeReleases/cmake/Utilities/Release
+ mkdir 283rc1
+ cd 283rc1
+ ~/CMakeReleases/build/bin/cmake -DCMAKE_CREATE_VERSION=release -P ../create-cmake-release.cmake
+ ./create-release.sh
-Then create a release from the tag:
-mkdir 2-4-7
-cd 2-4-7
-cmake -DCMAKE_CREATE_VERSION=CMake-2-4-7 -P ../create-cmake-release.cmake
-./create-CMake-2-4.sh
-
-create-cmake-release.cmake: script to run to create release sh script
-To add or remove machines this file should be edited.
+create-cmake-release.cmake: script to run to create release sh scripts
+Add or remove machines in create-cmake-release.cmake.
Cygwin -> directory that contains cpack cygwin package files used in
- CMakeCPack.cmake)
+ CMakeCPack.cmake
machine_release.cmake : config files for each machine
diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake
index 66753ce..fd91665 100644
--- a/Utilities/Release/create-cmake-release.cmake
+++ b/Utilities/Release/create-cmake-release.cmake
@@ -5,17 +5,14 @@ endif(NOT DEFINED CMAKE_CREATE_VERSION)
set(RELEASE_SCRIPTS
dashmacmini2_release.cmake # Mac Darwin universal
dashsun1_release.cmake # SunOS
- destiny_release.cmake # HPUX
+# destiny_release.cmake # HPUX -- destiny is dead; long live destiny
magrathea_release.cmake # Linux
dash2win64_release.cmake # Windows
# dash2win64_cygwin.cmake # Cygwin
# blight_cygwin.cmake # Cygwin
v20n250_aix_release.cmake # AIX 5.3
-# vogon_cygwin.cmake # Cygwin
ferrari_sgi64_release.cmake # IRIX 64
ferrari_sgi_release.cmake # IRIX 64
-# r36n11_aix_release.cmake # AIX 5.3
-# r15n65_aix_release.cmake # AIX 5.2
)
file(WRITE create-${CMAKE_CREATE_VERSION}.sh "#!/bin/bash")
@@ -29,5 +26,3 @@ ${CMAKE_COMMAND} -DCMAKE_CREATE_VERSION=${CMAKE_CREATE_VERSION} -P ${CMAKE_ROOT}
endforeach(f)
execute_process(COMMAND chmod a+x create-${CMAKE_CREATE_VERSION}.sh)
message("Run ./create-${CMAKE_CREATE_VERSION}.sh")
-
-
diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake
index d866896..64099a9 100644
--- a/Utilities/Release/dash2win64_cygwin.cmake
+++ b/Utilities/Release/dash2win64_cygwin.cmake
@@ -6,12 +6,13 @@ set(HOST dash2win64)
set(CPACK_BINARY_GENERATORS "CygwinBinary")
set(CPACK_SOURCE_GENERATORS "CygwinSource")
set(MAKE_PROGRAM "make")
-set(CVS_COMMAND /usr/bin/cvs)
set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE
")
set(CXX g++)
set(CC gcc)
set(SCRIPT_NAME dash2win64cygwin)
+set(GIT_COMMAND git)
+set(GIT_EXTRA "git config core.autocrlf true")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/dashsgi1_release.cmake b/Utilities/Release/dashsgi1_release.cmake
deleted file mode 100644
index 0af5ca7..0000000
--- a/Utilities/Release/dashsgi1_release.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/usr/people/kitware/CMakeReleaseDirectory")
-set(PROCESSORS 2)
-set(HOST dashsgi1)
-set(MAKE_PROGRAM "make")
-set(MAKE "${MAKE_PROGRAM} -P")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CPACK_SYSTEM_NAME:STRING=IRIX64-n32
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/dashsgi1_release64.cmake b/Utilities/Release/dashsgi1_release64.cmake
deleted file mode 100644
index 133f478..0000000
--- a/Utilities/Release/dashsgi1_release64.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/usr/people/kitware/CMakeReleaseDirectory64")
-set(PROCESSORS 2)
-set(CFLAGS "-64")
-set(CXXFLAGS "-64")
-set(LDFLAGS="-64")
-set(HOST dashsgi1)
-set(SCRIPT_NAME dashsgi164)
-set(MAKE_PROGRAM "make")
-set(MAKE "${MAKE_PROGRAM} -P")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CPACK_SYSTEM_NAME:STRING=IRIX64-64
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/destiny_release.cmake b/Utilities/Release/destiny_release.cmake
deleted file mode 100644
index 886909f..0000000
--- a/Utilities/Release/destiny_release.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-set(PROCESSORS 1)
-set(RUN_SHELL "/usr/local/bin/zsh -l -c /bin/sh")
-set(CVS_COMMAND "/usr/local/bin/cvs")
-set(HOST destiny)
-set(MAKE_PROGRAM "/usr/local/bin/gmake")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-a,archive_shared
-CMAKE_C_FLAGS:STRING=+DAportable
-CMAKE_CXX_FLAGS:STRING=-Wl,+vnocompatwarnings +W740,749 +DAportable -D__HPACC_STRICTER_ANSI__")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/muse_release.cmake b/Utilities/Release/muse_release.cmake
deleted file mode 100644
index 9fd41c4..0000000
--- a/Utilities/Release/muse_release.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/home/collab/itk/CMakeReleaseDirectory" )
-set(PROCESSORS 20)
-set(HOST muse)
-set(MAKE_PROGRAM "gmake")
-set(MAKE "${MAKE_PROGRAM} -j20")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/muse_release64.cmake b/Utilities/Release/muse_release64.cmake
deleted file mode 100644
index cd87f51..0000000
--- a/Utilities/Release/muse_release64.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "/home/collab/itk/CMakeReleaseDirectory64" )
-set(PROCESSORS 20)
-set(CFLAGS "-64")
-set(CXXFLAGS "-64")
-set(LDFLAGS="-64")
-set(HOST muse)
-set(SCRIPT_NAME muse64)
-set(MAKE_PROGRAM "gmake")
-set(MAKE "${MAKE_PROGRAM} -j20")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/r15n65_aix_release.cmake b/Utilities/Release/r15n65_aix_release.cmake
deleted file mode 100644
index 74d6d0b..0000000
--- a/Utilities/Release/r15n65_aix_release.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-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 r15n65" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(FC "xlf")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/r36n11_aix_release.cmake b/Utilities/Release/r36n11_aix_release.cmake
deleted file mode 100644
index 60c8459..0000000
--- a/Utilities/Release/r36n11_aix_release.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-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 "ssh r36n11" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(FC "xlf")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index 6fd1372..3a35ec3 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -34,7 +34,11 @@ if(NOT DEFINED CVS_COMMAND)
set(CVS_COMMAND cvs)
endif(NOT DEFINED CVS_COMMAND)
-set(GIT_BRANCH ${CMAKE_CREATE_VERSION})
+if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next)$")
+ set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION})
+else()
+ set(GIT_BRANCH ${CMAKE_CREATE_VERSION})
+endif()
set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -d ${CVSROOT} co -d ${CMAKE_CREATE_VERSION} ${CMAKE_CREATE_VERSION}")
diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in
index 4189728..8455e92 100755
--- a/Utilities/Release/release_cmake.sh.in
+++ b/Utilities/Release/release_cmake.sh.in
@@ -89,7 +89,7 @@ if [ ! -z "@GIT_COMMAND@" ]; then
@GIT_EXTRA@
check_exit_value $? "git extra cmake source" || exit 1
# now checkout a copy on the local branch working
- @GIT_COMMAND@ checkout -b working origin/@GIT_BRANCH@
+ @GIT_COMMAND@ checkout -b working @GIT_BRANCH@
check_exit_value $? "git checkout" || exit 1
cd ..
else
diff --git a/Utilities/Release/v20n17_aix_release.cmake b/Utilities/Release/v20n17_aix_release.cmake
deleted file mode 100644
index b7494bb..0000000
--- a/Utilities/Release/v20n17_aix_release.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-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 v20n17" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(FC "xlf")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/v60n177_aix_release.cmake b/Utilities/Release/v60n177_aix_release.cmake
deleted file mode 100644
index 9ed42ad..0000000
--- a/Utilities/Release/v60n177_aix_release.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-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 v60n177" )
-set(MAKE_PROGRAM "make")
-set(CC "xlc")
-set(CXX "xlC")
-set(INITIAL_CACHE "
-CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-")
-set(EXTRA_COPY "
-rm -rf ~/cmake-release
-mkdir ~/cmake-release
-mv *.sh ~/cmake-release
-mv *.Z ~/cmake-release
-mv *.gz ~/cmake-release")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/vogon_cygwin.cmake b/Utilities/Release/vogon_cygwin.cmake
deleted file mode 100644
index 0506f2a..0000000
--- a/Utilities/Release/vogon_cygwin.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseCygwin")
-set(PROCESSORS 2)
-set(HOST vogon)
-set(CPACK_BINARY_GENERATORS "CygwinBinary")
-set(CPACK_SOURCE_GENERATORS "CygwinSource")
-set(MAKE_PROGRAM "make")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-Subversion_SVNADMIN_EXECUTABLE:STRING=FALSE
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/vogon_release.cmake b/Utilities/Release/vogon_release.cmake
deleted file mode 100644
index 41245a5..0000000
--- a/Utilities/Release/vogon_release.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseDirectory")
-set(CONFIGURE_WITH_CMAKE TRUE)
-set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files/CMake\\ 2.7/bin/cmake.exe")
-set(PROCESSORS 1)
-set(HOST vogon)
-set(CPACK_BINARY_GENERATORS "NSIS ZIP")
-set(CPACK_SOURCE_GENERATORS "ZIP")
-set(MAKE_PROGRAM "nmake")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CMAKE_GENERATOR:INTERNAL=NMake Makefiles
-CMAKE_MT_EXECUTABLE:STRING=mt
-BUILD_QtDialog:BOOL:=TRUE
-QT_QMAKE_EXECUTABLE:FILEPATH=C:/QT/qt-win-opensource-src-4.5.0/bin/qmake.exe
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/vogon_release_qt.cmake b/Utilities/Release/vogon_release_qt.cmake
deleted file mode 100644
index 1772006..0000000
--- a/Utilities/Release/vogon_release_qt.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseDirectory")
-set(CONFIGURE_WITH_CMAKE TRUE)
-set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files/CMake\\ 2.6/bin/cmake.exe")
-set(PROCESSORS 1)
-set(HOST vogon)
-set(CPACK_BINARY_GENERATORS "NSIS ZIP")
-set(CPACK_SOURCE_GENERATORS "ZIP")
-set(MAKE_PROGRAM "nmake")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CMAKE_GENERATOR:INTERNAL=NMake Makefiles
-CMAKE_MT_EXECUTABLE:STRING=mt
-QT_QMAKE_EXECUTABLE:FILEPATH=C:/QT/qt-win-opensource-src-4.5.0/bin/qmake.exe
-")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${path}/release_cmake.cmake)