diff options
33 files changed, 535 insertions, 174 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cf948c2..788b386 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,11 +231,13 @@ MACRO (CMAKE_BUILD_UTILITIES) CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}ProcessFwd9x "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}") + if(BUILD_TESTING) + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}") + endif() #--------------------------------------------------------------------- # Setup third-party libraries. @@ -598,7 +600,9 @@ ADD_SUBDIRECTORY(Source) ADD_SUBDIRECTORY(Utilities) ADD_SUBDIRECTORY(Tests) -CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests") +if(BUILD_TESTING) + CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests") +endif() CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat") CMAKE_SET_TARGET_FOLDER(documentation "Documentation") diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index 39d1f17..a808a28 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -83,6 +83,29 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src) FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Parsed ${lang} implicit link information from above output:\n${log}\n\n") ENDIF() + # for VS IDE Intel Fortran we have to figure out the + # implicit link path for the fortran run time using + # a try-compile + IF("${lang}" MATCHES "Fortran" + AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio") + SET(_desc "Determine Intel Fortran Compiler Implicit Link Path") + MESSAGE(STATUS "${_desc}") + # Build a sample project which reports symbols. + TRY_COMPILE(IFORT_LIB_PATH_COMPILED + ${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath + ${CMAKE_ROOT}/Modules/IntelVSImplicitPath + IntelFortranImplicit + CMAKE_FLAGS + "-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}" + OUTPUT_VARIABLE _output) + FILE(WRITE + "${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.txt" + "${_output}") + INCLUDE(${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.cmake OPTIONAL) + SET(_desc "Determine Intel Fortran Compiler Implicit Link Path -- done") + MESSAGE(STATUS "${_desc}") + ENDIF() + SET(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE) SET(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE) diff --git a/Modules/CMakeVS11FindMake.cmake b/Modules/CMakeVS11FindMake.cmake new file mode 100644 index 0000000..302efaa --- /dev/null +++ b/Modules/CMakeVS11FindMake.cmake @@ -0,0 +1,54 @@ + +#============================================================================= +# Copyright 2007-2011 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# Look for devenv as a build program. We need to use this to support +# Intel Fortran integration into VS. MSBuild can not be used for that case +# since Intel Fortran uses the older devenv file format. +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES devenv + HINTS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;EnvironmentDirectory] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup;Dbghelp_path] + "$ENV{ProgramFiles}/Microsoft Visual Studio 11.0/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio11.0/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio 11/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio11/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11.0/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11.0/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11/Common7/IDE" + "/Program Files/Microsoft Visual Studio 11.0/Common7/IDE/" + "/Program Files/Microsoft Visual Studio 11/Common7/IDE/" + ) + +# if devenv is not found, then use MSBuild. +# it is expected that if devenv is not found, then we are +# dealing with Visual Studio Express. VCExpress has random +# failures when being run as a command line build tool which +# causes the compiler checks and try-compile stuff to fail. MSbuild +# is a better choice for this. However, VCExpress does not support +# cross compiling needed for Win CE. +IF(NOT CMAKE_CROSSCOMPILING) + FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES MSBuild + HINTS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir] + "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/" + "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/" + "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/") +ENDIF() + +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) +SET(MSVC11 1) +SET(MSVC_VERSION 1700) diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 0975c5b..26433bb 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -133,6 +133,11 @@ IF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS) SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) ENDIF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS) +FIND_PROGRAM(FAKEROOT_EXECUTABLE fakeroot) +IF(FAKEROOT_EXECUTABLE) + SET(CPACK_DEBIAN_FAKEROOT_EXECUTABLE ${FAKEROOT_EXECUTABLE}) +ENDIF(FAKEROOT_EXECUTABLE) + IF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS) # dpkg-shlibdeps is a Debian utility for generating dependency list FIND_PROGRAM(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index fa4bb05..51c8eac 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -132,24 +132,32 @@ # CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE # Mandatory : NO # Default : - -# May be used to embbed a pre (un)installation script in the spec file. +# May be used to embed a pre (un)installation script in the spec file. # The refered script file(s) will be read and directly # put after the %pre or %preun section +# If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for +# each component can be overriden with +# CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE and +# CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE # One may verify which scriptlet has been included with # rpm -qp --scripts package.rpm # CPACK_RPM_POST_INSTALL_SCRIPT_FILE # CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE # Mandatory : NO # Default : - -# May be used to embbed a post (un)installation script in the spec file. +# May be used to embed a post (un)installation script in the spec file. # The refered script file(s) will be read and directly # put after the %post or %postun section +# If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for +# each component can be overriden with +# CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE and +# CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE # One may verify which scriptlet has been included with # rpm -qp --scripts package.rpm # CPACK_RPM_CHANGELOG_FILE # Mandatory : NO # Default : - -# May be used to embbed a changelog in the spec file. +# May be used to embed a changelog in the spec file. # The refered file will be read and directly put after the %changelog # section. @@ -237,6 +245,17 @@ IF(ALIEN_EXECUTABLE) MESSAGE(STATUS "alien found, we may be on a Debian based distro.") ENDIF(ALIEN_EXECUTABLE) +# Are we packaging components ? +IF(CPACK_RPM_PACKAGE_COMPONENT) + SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") + SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}") + SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}") +ELSE(CPACK_RPM_PACKAGE_COMPONENT) + SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "") + SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "") + SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}") +ENDIF(CPACK_RPM_PACKAGE_COMPONENT) + # # Use user-defined RPM specific variables value # or generate reasonable default value from @@ -396,47 +415,77 @@ IF(CPACK_RPM_SPEC_INSTALL_POST) SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}") ENDIF(CPACK_RPM_SPEC_INSTALL_POST) -# CPACK_RPM_POST_INSTALL_SCRIPT_FILE -# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE -# May be used to embbed a post (un)installation script in the spec file. +# CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE) +# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE) +# May be used to embed a post (un)installation script in the spec file. # The refered script file(s) will be read and directly # put after the %post or %postun section -if(CPACK_RPM_POST_INSTALL_SCRIPT_FILE) - if(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) - file(READ ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTINSTALL) - else(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) - message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}> does not exists - ignoring") - endif(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) -endif(CPACK_RPM_POST_INSTALL_SCRIPT_FILE) - -if(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE) - if(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) - file(READ ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTUNINSTALL) - else(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) - message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring") - endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) -endif(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE) - -# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE -# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE +if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE) + set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE}) + else() + set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) + endif() + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE) + set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE}) + else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE) + set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) + endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE) +else(CPACK_RPM_PACKAGE_COMPONENT) + set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) + set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) +endif(CPACK_RPM_PACKAGE_COMPONENT) +if(CPACK_RPM_POST_INSTALL_READ_FILE) + if(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE}) + file(READ ${CPACK_RPM_POST_INSTALL_READ_FILE} CPACK_RPM_SPEC_POSTINSTALL) + else(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE}) + message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_READ_FILE}> does not exists - ignoring") + endif(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE}) +endif(CPACK_RPM_POST_INSTALL_READ_FILE) + +if(CPACK_RPM_POST_UNINSTALL_READ_FILE) + if(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE}) + file(READ ${CPACK_RPM_POST_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_POSTUNINSTALL) + else(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE}) + message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_READ_FILE}> does not exists - ignoring") + endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE}) +endif(CPACK_RPM_POST_UNINSTALL_READ_FILE) + +# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE) +# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE) # May be used to embed a pre (un)installation script in the spec file. # The refered script file(s) will be read and directly # put after the %pre or %preun section -if(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE) - if(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) - file(READ ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREINSTALL) - else(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) - message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}> does not exists - ignoring") - endif(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) -endif(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE) - -if(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE) - if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) - file(READ ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREUNINSTALL) - else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) - message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring") - endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) -endif(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE) +if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE) + set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE}) + else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE) + set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) + endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE) + set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE}) + else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE) + set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) + endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE) +else(CPACK_RPM_PACKAGE_COMPONENT) + set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) + set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) +endif(CPACK_RPM_PACKAGE_COMPONENT) +if(CPACK_RPM_PRE_INSTALL_READ_FILE) + if(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE}) + file(READ ${CPACK_RPM_PRE_INSTALL_READ_FILE} CPACK_RPM_SPEC_PREINSTALL) + else(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE}) + message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_READ_FILE}> does not exists - ignoring") + endif(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE}) +endif(CPACK_RPM_PRE_INSTALL_READ_FILE) + +if(CPACK_RPM_PRE_UNINSTALL_READ_FILE) + if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE}) + file(READ ${CPACK_RPM_PRE_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_PREUNINSTALL) + else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE}) + message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_READ_FILE}> does not exists - ignoring") + endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE}) +endif(CPACK_RPM_PRE_UNINSTALL_READ_FILE) # CPACK_RPM_CHANGELOG_FILE # May be used to embed a changelog in the spec file. @@ -478,17 +527,6 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") #STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") - -# Are we packaging components ? -IF(CPACK_RPM_PACKAGE_COMPONENT) - SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") - SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}") - SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}") -ELSE(CPACK_RPM_PACKAGE_COMPONENT) - SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "") - SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "") - SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}") -ENDIF(CPACK_RPM_PACKAGE_COMPONENT) # Use files tree to construct files command (spec file) # We should not forget to include symlinks (thus -o -type l) # We should include directory as well (thus -type d) diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 885762a..eb10cbc 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -2,7 +2,7 @@ # # This module provides the macros feature_summary(), set_package_properties() and # add_feature_info(). -# For compatiblity it also still provides set_package_info(), set_feature_info(), +# For compatibility it also still provides set_package_info(), set_feature_info(), # print_enabled_features() and print_disabled_features(). # # These macros can be used to generate a summary of enabled and disabled @@ -130,13 +130,13 @@ # PURPOSE "Enables odt-export in MyWordProcessor") # # find_package(DBUS) -# set_package_properties(LibXml2 PROPERTIES TYPE RUNTIME +# set_package_properties(DBUS PROPERTIES TYPE RUNTIME # PURPOSE "Necessary to disable the screensaver during a presentation" ) # # ADD_FEATURE_INFO(<name> <enabled> <description>) # Use this macro to add information about a feature with the given <name>. # <enabled> contains whether this feature is enabled or not, <description> -# is a text descibing the feature. +# is a text describing the feature. # The information can be displayed using feature_summary() for ENABLED_FEATURES # and DISABLED_FEATURES respectively. # @@ -209,7 +209,7 @@ FUNCTION(SET_PACKAGE_PROPERTIES _name _props) IF(_SPP_DESCRIPTION) GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION) - IF(_info) + IF(_info AND NOT "${_info}" STREQUAL "${_SPP_DESCRIPTION}") MESSAGE(STATUS "Warning: Property DESCRIPTION for package ${_name} already set to \"${_info}\", overriding it with \"${_SPP_DESCRIPTION}\"") ENDIF() @@ -219,7 +219,7 @@ FUNCTION(SET_PACKAGE_PROPERTIES _name _props) IF(_SPP_URL) GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_name}_URL) - IF(_info) + IF(_info AND NOT "${_info}" STREQUAL "${_SPP_URL}") MESSAGE(STATUS "Warning: Property URL already set to \"${_info}\", overriding it with \"${_SPP_URL}\"") ENDIF() @@ -344,7 +344,7 @@ FUNCTION(FEATURE_SUMMARY) ENDIF() IF(NOT _FS_WHAT) - MESSAGE(FATAL_ERROR "The call to FEATURE_SUMMAY() doesn't set the required WHAT argument.") + MESSAGE(FATAL_ERROR "The call to FEATURE_SUMMARY() doesn't set the required WHAT argument.") ENDIF() SET(validWhatParts "ENABLED_FEATURES" diff --git a/Modules/FindBullet.cmake b/Modules/FindBullet.cmake index cebb828..aea9158 100644 --- a/Modules/FindBullet.cmake +++ b/Modules/FindBullet.cmake @@ -59,13 +59,13 @@ find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h # Find the libraries _FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics) -_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_d) +_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d) _FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision) -_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_d) -_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY LinearMath BulletMath) -_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG LinearMath_d BulletMath_d) +_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d) +_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath) +_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_d) _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody) -_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d) +_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d) # handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake index 3cc3da5..6a70b40 100644 --- a/Modules/FindFLEX.cmake +++ b/Modules/FindFLEX.cmake @@ -5,6 +5,7 @@ # FLEX_EXECUTABLE - the path to the flex executable # FLEX_VERSION - the version of flex # FLEX_LIBRARIES - The flex libraries +# FLEX_INCLUDE_DIRS - The path to the flex headers # # The minimum required version of flex can be specified using the # standard syntax, e.g. FIND_PACKAGE(FLEX 2.5.13) @@ -66,8 +67,14 @@ FIND_PROGRAM(FLEX_EXECUTABLE flex DOC "path to the flex executable") MARK_AS_ADVANCED(FLEX_EXECUTABLE) FIND_LIBRARY(FL_LIBRARY NAMES fl - DOC "path to the fl library") -MARK_AS_ADVANCED(FL_LIBRARY) + DOC "Path to the fl library") + +FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h + DOC "Path to the flex headers") + +MARK_AS_ADVANCED(FL_LIBRARY FLEX_INCLUDE_DIR) + +SET(FLEX_INCLUDE_DIRS ${FLEX_INCLUDE_DIR}) SET(FLEX_LIBRARIES ${FL_LIBRARY}) IF(FLEX_EXECUTABLE) diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 21614fb..a6c2df8 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -23,7 +23,6 @@ INCLUDE (CheckIncludeFiles) INCLUDE (CheckLibraryExists) -INCLUDE (CheckSymbolExists) SET(Threads_FOUND FALSE) # Do we have sproc? @@ -45,41 +44,33 @@ ELSE() # SET(CMAKE_HAVE_THREADS_LIBRARY) IF(NOT THREADS_HAVE_PTHREAD_ARG) - # Check if pthread functions are in normal C library - CHECK_SYMBOL_EXISTS(pthread_create pthread.h CMAKE_HAVE_LIBC_CREATE) - IF(CMAKE_HAVE_LIBC_CREATE) - SET(CMAKE_THREAD_LIBS_INIT "") + + # Do we have -lpthreads + CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE) + IF(CMAKE_HAVE_PTHREADS_CREATE) + SET(CMAKE_THREAD_LIBS_INIT "-lpthreads") SET(CMAKE_HAVE_THREADS_LIBRARY 1) SET(Threads_FOUND TRUE) ENDIF() - IF(NOT CMAKE_HAVE_THREADS_LIBRARY) - # Do we have -lpthreads - CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE) - IF(CMAKE_HAVE_PTHREADS_CREATE) - SET(CMAKE_THREAD_LIBS_INIT "-lpthreads") - SET(CMAKE_HAVE_THREADS_LIBRARY 1) - SET(Threads_FOUND TRUE) - ENDIF() + # Ok, how about -lpthread + CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE) + IF(CMAKE_HAVE_PTHREAD_CREATE) + SET(CMAKE_THREAD_LIBS_INIT "-lpthread") + SET(Threads_FOUND TRUE) + SET(CMAKE_HAVE_THREADS_LIBRARY 1) + ENDIF() - # Ok, how about -lpthread - CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE) - IF(CMAKE_HAVE_PTHREAD_CREATE) - SET(CMAKE_THREAD_LIBS_INIT "-lpthread") + IF(CMAKE_SYSTEM MATCHES "SunOS.*") + # On sun also check for -lthread + CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE) + IF(CMAKE_HAVE_THR_CREATE) + SET(CMAKE_THREAD_LIBS_INIT "-lthread") SET(CMAKE_HAVE_THREADS_LIBRARY 1) SET(Threads_FOUND TRUE) ENDIF() + ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*") - IF(CMAKE_SYSTEM MATCHES "SunOS.*") - # On sun also check for -lthread - CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE) - IF(CMAKE_HAVE_THR_CREATE) - SET(CMAKE_THREAD_LIBS_INIT "-lthread") - SET(CMAKE_HAVE_THREADS_LIBRARY 1) - SET(Threads_FOUND TRUE) - ENDIF() - ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*") - ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY) ENDIF(NOT THREADS_HAVE_PTHREAD_ARG) IF(NOT CMAKE_HAVE_THREADS_LIBRARY) @@ -120,7 +111,7 @@ ELSE() ENDIF(CMAKE_HAVE_PTHREAD_H) ENDIF() -IF(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE) +IF(CMAKE_THREAD_LIBS_INIT) SET(CMAKE_USE_PTHREADS_INIT 1) SET(Threads_FOUND TRUE) ENDIF() diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt index 052dd59..e969f24 100644 --- a/Modules/FortranCInterface/Verify/CMakeLists.txt +++ b/Modules/FortranCInterface/Verify/CMakeLists.txt @@ -24,7 +24,9 @@ include(FortranCInterface) FortranCInterface_HEADER(VerifyFortran.h SYMBOLS VerifyFortran) include_directories(${VerifyFortranC_BINARY_DIR}) -add_executable(VerifyFortranC main.c VerifyC.c VerifyFortran.f ${VerifyCXX}) +add_library(VerifyFortran STATIC VerifyFortran.f) +add_executable(VerifyFortranC main.c VerifyC.c ${VerifyCXX}) +target_link_libraries(VerifyFortranC VerifyFortran) if(NOT VERIFY_CXX) # The entry point (main) is defined in C; link with the C compiler. diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 4eb67b5..7df274e 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -21,11 +21,15 @@ # ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] ) # # By default GENERATE_EXPORT_HEADER() generates macro names in a file name -# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS macro -# adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on Windows -# which does not need extra compiler flags for exporting support. +# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS function +# adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on +# Windows which does not need extra compiler flags for exporting support. You +# may optionally pass a single argument to ADD_COMPILER_EXPORT_FLAGS that will +# be populated with the required CXX_FLAGS required to enable visibility support +# for the compiler/architecture in use. # -# This means that in the simplest case, users of these functions will be equivalent to: +# This means that in the simplest case, users of these functions will be +# equivalent to: # # add_compiler_export_flags() # add_library(somelib someclass.cpp) @@ -43,8 +47,8 @@ # ... # }; # -# The CMake fragment will generate a file in the ${CMAKE_CURRENT_BUILD_DIR} called -# somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT, +# The CMake fragment will generate a file in the ${CMAKE_CURRENT_BUILD_DIR} +# called somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT, # SOMELIB_DEPRECATED, SOMELIB_DEPRECATED_EXPORT and SOMELIB_DEPRECATED_NO_EXPORT. # The resulting file should be installed with other headers in the library. # @@ -86,11 +90,14 @@ # add_library(shared_variant SHARED ${lib_SRCS}) # add_library(static_variant ${lib_SRCS}) # generate_export_header(shared_variant BASE_NAME libshared_and_static) -# set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE) +# set_target_properties(static_variant PROPERTIES +# COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE) # -# This will cause the export macros to expand to nothing when building the static library. +# This will cause the export macros to expand to nothing when building the +# static library. # -# If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED will be defined +# If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED +# will be defined # This macro can be used to remove deprecated code from preprocessor output. # # option(EXCLUDE_DEPRECATED "Exclude deprecated parts of the library" FALSE) @@ -122,7 +129,6 @@ # # Generates the macros VTK_SOMELIB_EXPORT etc. - #============================================================================= # Copyright 2011 Stephen Kelly <steveire@gmail.com> # @@ -139,10 +145,10 @@ include(CMakeParseArguments) include(CheckCXXCompilerFlag) - # TODO: Install this macro separately? macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT) - check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; } int main() { return somefunc();}" ${_RESULT} + check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; } + int main() { return somefunc();}" ${_RESULT} # Some compilers do not fail with a bad flag FAIL_REGEX "unrecognized .*option" # GNU FAIL_REGEX "ignoring unknown option" # MSVC @@ -155,13 +161,16 @@ endmacro() macro(_test_compiler_hidden_visibility) - if (CMAKE_COMPILER_IS_GNUCXX) - exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info) - string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") + if(CMAKE_COMPILER_IS_GNUCXX) + exec_program(${CMAKE_C_COMPILER} ARGS --version + OUTPUT_VARIABLE _gcc_version_info) + string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]" + _gcc_version "${_gcc_version_info}") # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the # patch level, handle this here: if(NOT _gcc_version) - string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}") + string(REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" + _gcc_version "${_gcc_version_info}") endif() if(${_gcc_version} VERSION_LESS "4.2") @@ -171,8 +180,10 @@ macro(_test_compiler_hidden_visibility) endif() if(CMAKE_CXX_COMPILER_ID MATCHES Intel) - exec_program(${CMAKE_CXX_COMPILER} ARGS -V OUTPUT_VARIABLE _intel_version_info) - string (REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1" _intel_version "${_intel_version_info}") + exec_program(${CMAKE_CXX_COMPILER} ARGS -V + OUTPUT_VARIABLE _intel_version_info) + string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1" + _intel_version "${_intel_version_info}") if(${_intel_version} VERSION_LESS "12.0") set(_INTEL_TOO_OLD TRUE) @@ -184,7 +195,7 @@ macro(_test_compiler_hidden_visibility) # Exclude XL here because it misinterprets -fvisibility=hidden even though # the check_cxx_compiler_flag passes # http://www.cdash.org/CDash/testDetails.php?test=109109951&build=1419259 - if (NOT GCC_TOO_OLD + if(NOT GCC_TOO_OLD AND NOT _INTEL_TOO_OLD AND NOT WIN32 AND NOT CYGWIN @@ -192,8 +203,10 @@ macro(_test_compiler_hidden_visibility) AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom) check_cxx_compiler_flag(-fvisibility=hidden COMPILER_HAS_HIDDEN_VISIBILITY) - check_cxx_compiler_flag(-fvisibility-inlines-hidden COMPILER_HAS_HIDDEN_INLINE_VISIBILITY) - option(USE_COMPILER_HIDDEN_VISIBILITY "Use HIDDEN visibility support if available." ON) + check_cxx_compiler_flag(-fvisibility-inlines-hidden + COMPILER_HAS_HIDDEN_INLINE_VISIBILITY) + option(USE_COMPILER_HIDDEN_VISIBILITY + "Use HIDDEN visibility support if available." ON) mark_as_advanced(USE_COMPILER_HIDDEN_VISIBILITY) endif() endmacro() @@ -204,18 +217,23 @@ macro(_test_compiler_has_deprecated) OR GCC_TOO_OLD OR "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom) - set(COMPILER_HAS_DEPRECATED "" CACHE INTERNAL "Compiler support for a deprecated attribute") + set(COMPILER_HAS_DEPRECATED "" CACHE INTERNAL + "Compiler support for a deprecated attribute") else() - _check_cxx_compiler_attribute("__attribute__((__deprecated__))" COMPILER_HAS_DEPRECATED_ATTR) + _check_cxx_compiler_attribute("__attribute__((__deprecated__))" + COMPILER_HAS_DEPRECATED_ATTR) if(COMPILER_HAS_DEPRECATED_ATTR) - set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_ATTR}" CACHE INTERNAL "Compiler support for a deprecated attribute") + set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_ATTR}" + CACHE INTERNAL "Compiler support for a deprecated attribute") else() - _check_cxx_compiler_attribute("__declspec(deprecated)" COMPILER_HAS_DEPRECATED) + _check_cxx_compiler_attribute("__declspec(deprecated)" + COMPILER_HAS_DEPRECATED) endif() endif() endmacro() -get_filename_component(_GENERATE_EXPORT_HEADER_MODULE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_GENERATE_EXPORT_HEADER_MODULE_DIR + "${CMAKE_CURRENT_LIST_FILE}" PATH) macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY) set(DEFINE_DEPRECATED) @@ -246,10 +264,13 @@ endmacro() macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) # Option overrides set(options DEFINE_NO_DEPRECATED) - set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE NO_DEPRECATED_MACRO_NAME) + set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME + DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE + NO_DEPRECATED_MACRO_NAME) set(multiValueArgs) - cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}" + ${ARGN}) set(BASE_NAME "${TARGET_LIBRARY}") @@ -266,7 +287,8 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME_LOWER}_export.h") set(DEPRECATED_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_DEPRECATED") set(STATIC_DEFINE "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_STATIC_DEFINE") - set(NO_DEPRECATED_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_DEPRECATED") + set(NO_DEPRECATED_MACRO_NAME + "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_DEPRECATED") if(_GEH_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unknown keywords given to GENERATE_EXPORT_HEADER(): \"${_GEH_UNPARSED_ARGUMENTS}\"") @@ -292,23 +314,25 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) set(STATIC_DEFINE ${_GEH_PREFIX_NAME}${_GEH_STATIC_DEFINE}) endif() - if (_GEH_DEFINE_NO_DEPRECATED) + if(_GEH_DEFINE_NO_DEPRECATED) set(DEFINE_NO_DEPRECATED TRUE) endif() - if (_GEH_NO_DEPRECATED_MACRO_NAME) - set(NO_DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME}) + if(_GEH_NO_DEPRECATED_MACRO_NAME) + set(NO_DEPRECATED_MACRO_NAME + ${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME}) endif() set(INCLUDE_GUARD_NAME "${EXPORT_MACRO_NAME}_H") get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL) - if (NOT EXPORT_IMPORT_CONDITION) + if(NOT EXPORT_IMPORT_CONDITION) set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS) endif() - configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in" "${EXPORT_FILE_NAME}" @ONLY) + configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in" + "${EXPORT_FILE_NAME}" @ONLY) endmacro() function(GENERATE_EXPORT_HEADER TARGET_LIBRARY) @@ -333,7 +357,7 @@ function(add_compiler_export_flags) _test_compiler_has_deprecated() if(NOT (USE_COMPILER_HIDDEN_VISIBILITY AND COMPILER_HAS_HIDDEN_VISIBILITY)) - message(WARNING "Compiler doesn't have hidden visibility") + # Just return if there are no flags to add. return() endif() @@ -342,5 +366,12 @@ function(add_compiler_export_flags) if(COMPILER_HAS_HIDDEN_INLINE_VISIBILITY) set (EXTRA_FLAGS "${EXTRA_FLAGS} -fvisibility-inlines-hidden") endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE) + + # Either return the extra flags needed in the supplied argument, or to the + # CMAKE_CXX_FLAGS if no argument is supplied. + if(ARGV0) + set(${ARGV0} "${EXTRA_FLAGS}" PARENT_SCOPE) + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE) + endif() endfunction() diff --git a/Modules/IntelVSImplicitPath/CMakeLists.txt b/Modules/IntelVSImplicitPath/CMakeLists.txt new file mode 100644 index 0000000..96dc4e6 --- /dev/null +++ b/Modules/IntelVSImplicitPath/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required (VERSION 2.8) +project(IntelFortranImplicit Fortran) +add_custom_command( + OUTPUT output.cmake + COMMAND ${CMAKE_COMMAND} -P ${IntelFortranImplicit_SOURCE_DIR}/detect.cmake + ) +add_library(FortranLib hello.f output.cmake) diff --git a/Modules/IntelVSImplicitPath/detect.cmake b/Modules/IntelVSImplicitPath/detect.cmake new file mode 100644 index 0000000..20753be --- /dev/null +++ b/Modules/IntelVSImplicitPath/detect.cmake @@ -0,0 +1,9 @@ +# look at each path and try to find ifconsol.lib +set(LIB "$ENV{LIB}") +foreach(dir ${LIB}) + file(TO_CMAKE_PATH "${dir}" dir) + if(EXISTS "${dir}/ifconsol.lib") + file(WRITE output.cmake "list(APPEND implicit_dirs \"${dir}\")\n") + break() + endif() +endforeach() diff --git a/Modules/IntelVSImplicitPath/hello.f b/Modules/IntelVSImplicitPath/hello.f new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Modules/IntelVSImplicitPath/hello.f diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake index d101e61..3db9e43 100644 --- a/Modules/UsePkgConfig.cmake +++ b/Modules/UsePkgConfig.cmake @@ -1,13 +1,14 @@ -# - obsolete pkg-config module for CMake +# - Osolete pkg-config module for CMake, use FindPkgConfig instead. # -# Defines the following macros: +# This module defines the following macro: # # PKGCONFIG(package includedir libdir linkflags cflags) # # Calling PKGCONFIG will fill the desired information into the 4 given arguments, # e.g. PKGCONFIG(libart-2.0 LIBART_INCLUDE_DIR LIBART_LINK_DIR LIBART_LINK_FLAGS LIBART_CFLAGS) # if pkg-config was NOT found or the specified software package doesn't exist, the -# variable will be empty when the function returns, otherwise they will contain the respective information +# variable will be empty when the function returns, otherwise they will contain +# the respective information # #============================================================================= @@ -27,7 +28,7 @@ FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config ) MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) MESSAGE(STATUS - "WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig") + "WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig") # reset the variables at the beginning SET(${_include_DIR}) SET(${_link_DIR}) @@ -42,20 +43,20 @@ MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) # and if the package of interest also exists for pkg-config, then get the information IF(NOT _return_VALUE) - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir OUTPUT_VARIABLE ${_include_DIR} ) STRING(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}") - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir OUTPUT_VARIABLE ${_link_DIR} ) STRING(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}") - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs OUTPUT_VARIABLE ${_link_FLAGS} ) STRING(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}") - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags OUTPUT_VARIABLE ${_cflags} ) STRING(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}") @@ -64,10 +65,10 @@ MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) MESSAGE(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)") ENDIF(NOT _return_VALUE) - + # if pkg-config has NOT been found, INFORM the user ELSE(PKGCONFIG_EXECUTABLE) - + MESSAGE(STATUS "WARNING: PKGCONFIG() indicates that the tool pkg-config has not been found on your system. You should install it.") ENDIF(PKGCONFIG_EXECUTABLE) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 96b3ea0..ba41d98 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -324,6 +324,10 @@ IF (WIN32) cmGlobalVisualStudio10Win64Generator.cxx cmGlobalVisualStudio10IA64Generator.h cmGlobalVisualStudio10IA64Generator.cxx + cmGlobalVisualStudio11Generator.h + cmGlobalVisualStudio11Generator.cxx + cmGlobalVisualStudio11Win64Generator.h + cmGlobalVisualStudio11Win64Generator.cxx cmGlobalVisualStudioGenerator.cxx cmGlobalVisualStudioGenerator.h cmGlobalWatcomWMakeGenerator.cxx diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 8c19bbd..b707e96 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -392,7 +392,10 @@ int cmCPackDebGenerator::createDeb() } std::string cmd; - cmd = "\""; + if (NULL != this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE")) { + cmd += this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE"); + } + cmd += " \""; cmd += cmakeExecutable; cmd += "\" -E tar cfz data.tar.gz "; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 3b63906..f933666 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2753,6 +2753,10 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args) ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); check_curl_result(res, "DOWNLOAD cannot set url: "); + // enable HTTP ERROR parsing + res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); + check_curl_result(res, "DOWNLOAD cannot set http failure option: "); + res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cmWriteToFileCallback); check_curl_result(res, "DOWNLOAD cannot set write function: "); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 8573670..18b483d 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -79,7 +79,6 @@ protected: virtual const char* GetIDEVersion() { return "10.0"; } std::string PlatformToolset; -private: bool ExpressEdition; }; #endif diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx new file mode 100644 index 0000000..a70427a --- /dev/null +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -0,0 +1,45 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2011 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmGlobalVisualStudio11Generator.h" +#include "cmMakefile.h" + +//---------------------------------------------------------------------------- +cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator() +{ + this->FindMakeProgramFile = "CMakeVS11FindMake.cmake"; + this->ExpressEdition = false; // TODO: VS 11 Express support + this->PlatformToolset = "v110"; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio11Generator::AddPlatformDefinitions(cmMakefile* mf) +{ + mf->AddDefinition("MSVC11", "1"); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout) +{ + fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; + fout << "# Visual Studio 2011\n"; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio11Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio 11 project files."; + entry.Full = ""; +} diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h new file mode 100644 index 0000000..14019a7 --- /dev/null +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -0,0 +1,43 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2011 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmGlobalVisualStudio11Generator_h +#define cmGlobalVisualStudio11Generator_h + +#include "cmGlobalVisualStudio10Generator.h" + + +/** \class cmGlobalVisualStudio11Generator */ +class cmGlobalVisualStudio11Generator: + public cmGlobalVisualStudio10Generator +{ +public: + cmGlobalVisualStudio11Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio11Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio11Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 11";} + virtual void AddPlatformDefinitions(cmMakefile* mf); + + virtual void WriteSLNHeader(std::ostream& fout); + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + /** TODO: VS 11 user macro support. */ + virtual std::string GetUserMacrosDirectory() { return ""; } +protected: + virtual const char* GetIDEVersion() { return "11.0"; } +}; +#endif diff --git a/Source/cmGlobalVisualStudio11Win64Generator.cxx b/Source/cmGlobalVisualStudio11Win64Generator.cxx new file mode 100644 index 0000000..10c9027 --- /dev/null +++ b/Source/cmGlobalVisualStudio11Win64Generator.cxx @@ -0,0 +1,33 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2011 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmGlobalVisualStudio11Win64Generator.h" +#include "cmMakefile.h" +#include "cmake.h" + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio11Win64Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio 11 Win64 project files."; + entry.Full = ""; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio11Win64Generator +::AddPlatformDefinitions(cmMakefile* mf) +{ + this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf); + mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64"); +} diff --git a/Source/cmGlobalVisualStudio11Win64Generator.h b/Source/cmGlobalVisualStudio11Win64Generator.h new file mode 100644 index 0000000..53f1953 --- /dev/null +++ b/Source/cmGlobalVisualStudio11Win64Generator.h @@ -0,0 +1,37 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2011 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmGlobalVisualStudio11Win64Generator_h +#define cmGlobalVisualStudio11Win64Generator_h + +#include "cmGlobalVisualStudio11Generator.h" + +class cmGlobalVisualStudio11Win64Generator : + public cmGlobalVisualStudio11Generator +{ +public: + cmGlobalVisualStudio11Win64Generator() {} + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio11Win64Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio11Win64Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 11 Win64";} + + virtual const char* GetPlatformName() const {return "x64";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + virtual void AddPlatformDefinitions(cmMakefile* mf); +}; +#endif diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index feead00..320378d 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -92,7 +92,7 @@ public: "If not set here then it is set to target_EXPORTS by default " "(with some substitutions if the target is not a valid C " "identifier). This is useful for headers to know whether they are " - "being included from inside their library our outside to properly " + "being included from inside their library or outside to properly " "setup dllexport/dllimport decorations. " "The COMPILE_FLAGS property sets additional compiler flags used " "to build sources within the target. It may also be used to pass " diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 41c67e2..05699da 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -68,6 +68,8 @@ # include "cmGlobalVisualStudio10Generator.h" # include "cmGlobalVisualStudio10IA64Generator.h" # include "cmGlobalVisualStudio10Win64Generator.h" +# include "cmGlobalVisualStudio11Generator.h" +# include "cmGlobalVisualStudio11Win64Generator.h" # include "cmGlobalVisualStudio8Win64Generator.h" # include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h" @@ -2580,6 +2582,10 @@ void cmake::AddDefaultGenerators() &cmGlobalVisualStudio10IA64Generator::New; this->Generators[cmGlobalVisualStudio10Win64Generator::GetActualName()] = &cmGlobalVisualStudio10Win64Generator::New; + this->Generators[cmGlobalVisualStudio11Generator::GetActualName()] = + &cmGlobalVisualStudio11Generator::New; + this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] = + &cmGlobalVisualStudio11Win64Generator::New; this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] = &cmGlobalVisualStudio71Generator::New; this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] = diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 29d31bd..3a76525 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) SET(KWSYS_DATE_STAMP_MONTH 09) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 13) +SET(KWSYS_DATE_STAMP_DAY 30) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 949df00..78db39d 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -368,6 +368,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ dash2win64_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyMac dashmacmini2_release.cmake) + ADD_NIGHTLY_BUILD_TEST(CMakeNightlyMac64 + dashmacmini5_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux magrathea_release.cmake) ENDIF(CMAKE_BUILD_NIGHTLY_RELEASES) @@ -1926,29 +1928,36 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) ENDIF() - # fortran does not work for IDE builds because - # CMAKE_STANDARD_LIBRARIES needs to be per language - IF(CMAKE_TEST_GENERATOR MATCHES "Make|KDevelop") - IF(CMAKE_Fortran_COMPILER) - ADD_TEST(Fortran ${CMAKE_CTEST_COMMAND} + IF(CMAKE_Fortran_COMPILER) + ADD_TEST(Fortran ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/Fortran" + "${CMake_BINARY_DIR}/Tests/Fortran" + --build-generator ${CMAKE_TEST_GENERATOR} + --build-project testf + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-two-config + --test-command testf) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Fortran") + + # FortranCInterface tests. + IF(UNIX) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/FortranC/Flags.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/FortranC/Flags.cmake @ONLY) + ADD_TEST(FortranC.Flags ${CMAKE_CMAKE_COMMAND} -P + ${CMAKE_CURRENT_BINARY_DIR}/FortranC/Flags.cmake) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/FortranC/Flags") + ELSE() + ADD_TEST(FortranC ${CMAKE_CTEST_COMMAND} --build-and-test - "${CMake_SOURCE_DIR}/Tests/Fortran" - "${CMake_BINARY_DIR}/Tests/Fortran" + "${CMake_SOURCE_DIR}/Tests/FortranC" + "${CMake_BINARY_DIR}/Tests/FortranC" --build-generator ${CMAKE_TEST_GENERATOR} - --build-project testf + --build-project FortranC --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-two-config - --test-command testf) - LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Fortran") - - # FortranCInterface tests. - IF(UNIX) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/FortranC/Flags.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/FortranC/Flags.cmake @ONLY) - ADD_TEST(FortranC.Flags ${CMAKE_CMAKE_COMMAND} -P - ${CMAKE_CURRENT_BINARY_DIR}/FortranC/Flags.cmake) - LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/FortranC/Flags") - ENDIF() + --test-command CMakeFiles/FortranCInterface/FortranCInterface) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/FortranC") ENDIF() ENDIF() diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt index 8095a1c..8b279a5 100644 --- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt +++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt @@ -34,6 +34,9 @@ endif() if(DEFINED MSVC10) math(EXPR msvc_total "${msvc_total} + 1") endif() +if(DEFINED MSVC11) + math(EXPR msvc_total "${msvc_total} + 1") +endif() echo_var(MSVC) echo_var(MSVC60) @@ -42,6 +45,7 @@ echo_var(MSVC71) echo_var(MSVC80) echo_var(MSVC90) echo_var(MSVC10) +echo_var(MSVC11) if(MSVC) # diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt index b4ec17c..1ed7b83 100644 --- a/Tests/Preprocess/CMakeLists.txt +++ b/Tests/Preprocess/CMakeLists.txt @@ -37,6 +37,9 @@ endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio") if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10") set(PP_VS100 1) endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10") +if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11") + set(PP_VS110 1) +endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11") # Some tests below check the PP_* variables set above. They are meant # to test the case that the build tool is at fault. Other tests below @@ -52,7 +55,7 @@ endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10") # must not have it escaped inside the configured header. set(STRING_EXTRA "") -if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100) +if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100 AND NOT PP_VS110) # Borland, VS70 IDE: ; # The Borland compiler will simply not accept a non-escaped semicolon # on the command line. If it is escaped \; then the escape character diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index 1e68968..a2fd619 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -6,7 +6,7 @@ IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") SET(PROJECT_EXT vcproj) ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") -IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 10") +IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01]") SET(PROJECT_EXT vcxproj) ENDIF() @@ -46,7 +46,7 @@ ADD_DEPENDENCIES(VSExternalInclude lib2) # and the sln file can no longer be the only source # of that depend. So, for VS 10 make the executable # depend on lib1 and lib2 -IF(MSVC10) +IF(MSVC10 OR MSVC11) ADD_DEPENDENCIES(VSExternalInclude lib1) ENDIF() diff --git a/Utilities/Release/dashmacmini2_release.cmake b/Utilities/Release/dashmacmini2_release.cmake index 2668d38..115181d 100644 --- a/Utilities/Release/dashmacmini2_release.cmake +++ b/Utilities/Release/dashmacmini2_release.cmake @@ -6,7 +6,6 @@ set(HOST dashmacmini2) set(MAKE_PROGRAM "make") set(MAKE "${MAKE_PROGRAM} -j2") set(CPACK_BINARY_GENERATORS "PackageMaker TGZ TZ") -set(CPACK_SOURCE_GENERATORS "TGZ TZ") set(INITIAL_CACHE " CMAKE_BUILD_TYPE:STRING=Release CMAKE_OSX_ARCHITECTURES:STRING=ppc;i386 diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index 92eebd7..9bb3a98 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -14,7 +14,7 @@ CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CPACK_SYSTEM_NAME:STRING=Darwin64-universal BUILD_QtDialog:BOOL=TRUE -QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.6.4/install/bin/qmake +QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.7.4/install/bin/qmake ") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) include(${path}/release_cmake.cmake) diff --git a/Utilities/cmlibarchive/libarchive/archive.h b/Utilities/cmlibarchive/libarchive/archive.h index 9b918a8..8bc612f 100644 --- a/Utilities/cmlibarchive/libarchive/archive.h +++ b/Utilities/cmlibarchive/libarchive/archive.h @@ -52,7 +52,7 @@ /* These should match the types used in 'struct stat' */ #if defined(_WIN32) && !defined(__CYGWIN__) #define __LA_INT64_T __int64 -# if defined(_SSIZE_T_DEFINED) +# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_) # define __LA_SSIZE_T ssize_t # elif defined(_WIN64) # define __LA_SSIZE_T __int64 |
