diff options
39 files changed, 454 insertions, 368 deletions
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/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/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/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/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-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/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index c63b403..4e9969d 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2726,12 +2726,14 @@ void cmGlobalXCodeGenerator buildSettings->AddAttribute("SDKROOT", this->CreateString(sysroot)); std::string archString; + 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", this->CreateString(archString.c_str())); 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/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/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/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 7fc2bbd..f6525f1 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010) SET(KWSYS_DATE_STAMP_MONTH 09) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 15) +SET(KWSYS_DATE_STAMP_DAY 22) 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/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) |