diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | ChangeLog.manual | 25 | ||||
-rw-r--r-- | Modules/CheckFortranFunctionExists.cmake | 5 | ||||
-rw-r--r-- | Modules/FindBLAS.cmake | 596 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 208 | ||||
-rw-r--r-- | Modules/FindMPI.cmake | 13 | ||||
-rw-r--r-- | Modules/FindwxWidgets.cmake | 23 | ||||
-rw-r--r-- | Source/CPack/cmCPackBundleGenerator.cxx | 238 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 41 | ||||
-rw-r--r-- | Source/cmDocumentVariables.cxx | 106 | ||||
-rw-r--r-- | Source/cmDocumentation.cxx | 4 | ||||
-rw-r--r-- | Source/cmDocumentationFormatter.cxx | 4 | ||||
-rw-r--r-- | Source/cmDocumentationFormatterHTML.cxx | 45 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 |
14 files changed, 867 insertions, 447 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dd18dbb2a1..8378b0dcc9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES) SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 6) SET(CMake_VERSION_PATCH 1) -SET(CMake_VERSION_RC 11) +SET(CMake_VERSION_RC 12) # CVS versions are odd, if this is an odd minor version # then set the CMake_VERSION_DATE variable IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$") diff --git a/ChangeLog.manual b/ChangeLog.manual index 6d4f7cb3e1..c56dfc6acc 100644 --- a/ChangeLog.manual +++ b/ChangeLog.manual @@ -1,3 +1,26 @@ +Changes in CMake 2.6.1 RC 12 +- Fix issue with .lib being seen as .obj with VS due to a full path + to a library given without the file extension. This only worked + with the VS generator, but some projects had worked around it with + if statements. It now issues a warning, but should link. +- Update cpack stuff for beta OSX bundle generator for CPack +- CheckFortranFunctionExists.cmake now calls the function. +- FindBLAS.cmake, FindLAPACK.cmake modules were redesigned so + now you have three new variables BLA_VENDOR (you can specify the VENDOR), + BLA_STATIC (gets the static version of libs), BLA_F95 + (gets the fortran 95 interface). BLA_VENDOR can be specified as + an environment variable. Intel mkls libs need FindThreads to + be found correctly so you will need to enable the C/CXX +- FindMPI: Use the HINTS feature of find_library to find the right + libraries for MPI, and act a bit more intelligently when MPI cannot be found. +- Improved support for finding wxWidgets in MinGW environment. +- CMAKE[_SYSTEM]_(LIBRARY|PROGRAM|INCLUDE|PREFIX)_PATH variables + moved CMAKE_CROSSCOMPILING from "Variables that modify behaviour" to + "variables that Provide Information" +- handle HTML documentation for single items better: no warning about + ComputeSectionLinkPrefix, don't create an index for only one item. +- Better error messages in CPackBundleGenerator + Changes in CMake 2.6.1 RC 11 - Fix curl build issue with Xcode 3.1 Changes in CMake 2.6.1 RC 10 @@ -6,7 +29,7 @@ Changes in CMake 2.6.1 RC 10 - Remove bad test for bug # 7316 Changes in CMake 2.6.1 RC 9 - Fix bug # 7316 Xcode double escaped define strings -- FindBoost can now find the upcoming Boost 1.46 +- FindBoost can now find the upcoming Boost 1.36 Changes in CMake 2.6.1 RC 8 - Fix build problem with missing cpack file diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake index 4106a06932..49858812f6 100644 --- a/Modules/CheckFortranFunctionExists.cmake +++ b/Modules/CheckFortranFunctionExists.cmake @@ -8,7 +8,6 @@ # modify the way the check is run: # # CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT DEFINED ${VARIABLE}) @@ -24,7 +23,8 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) " program TESTFortran external ${FUNCTION} - end + call ${FUNCTION}() + end program TESTFortran " ) try_compile(${VARIABLE} @@ -33,6 +33,7 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" OUTPUT_VARIABLE OUTPUT ) +# message(STATUS "${OUTPUT}") if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") message(STATUS "Looking for Fortran ${FUNCTION} - found") diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 58d0967ce0..b821a23253 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -1,6 +1,6 @@ # - Find BLAS library -# This module finds an installed fortran library that implements the BLAS -# linear-algebra interface (see http://www.netlib.org/blas/). +# This module finds an installed fortran library that implements the BLAS +# linear-algebra interface (see http://www.netlib.org/blas/). # The list of libraries searched for is taken # from the autoconf macro file, acx_blas.m4 (distributed at # http://ac-archive.sourceforge.net/ac-archive/acx_blas.html). @@ -10,332 +10,444 @@ # is found # BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l # and -L). -# BLAS_LIBRARIES - uncached list of libraries (using full path name) to +# BLAS_LIBRARIES - uncached list of libraries (using full path name) to # link against to use BLAS -# BLAS95_LIBRARIES - uncached list of libraries (using full path name) # to link against to use BLAS95 interface -# +# BLAS95_LIBRARIES - uncached list of libraries (using full path name) +# to link against to use BLAS95 interface +# BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface +# is found +# BLA_STATIC if set on this determines what kind of linkage we do (static) +# BLA_VENDOR if set checks only the specified vendor, if not set checks +# all the posibilities +# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK +########## +### List of vendors (BLA_VENDOR) valid in this module +## ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model), +## Intel( older versions of mkl 32 and 64 bit), ACML,Apple, NAS, Generic +# C/CXX should be enabled to use Intel mkl +get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) +if(NOT _LANGUAGES_ MATCHES Fortran) + if(BLAS_FIND_REQUIRED) + message(FATAL_ERROR "FindBLAS is Fortran-only so Fortran must be enabled.") + else(BLAS_FIND_REQUIRED) + message(STATUS "Looking for BLAS... - NOT found (Fortran not enabled)") # + return() + endif(BLAS_FIND_REQUIRED) +endif(NOT _LANGUAGES_ MATCHES Fortran) include(CheckFortranFunctionExists) -macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list) +macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads) # This macro checks for the existence of the combination of fortran libraries -# given by _list. If the combination is found, this macro checks (using the +# given by _list. If the combination is found, this macro checks (using the # Check_Fortran_Function_Exists macro) whether can link against that library # combination using the name of a routine given by _name using the linker # flags given by _flags. If the combination of libraries is found and passes # the link test, LIBRARIES is set to the list of complete library paths that # have been found. Otherwise, LIBRARIES is set to FALSE. - + # N.B. _prefix is the prefix applied to the names of all cached variables that # are generated internally and marked advanced by this macro. - set(_libraries_work TRUE) - set(${LIBRARIES}) - set(_combined_name) - foreach(_library ${_list}) - set(_combined_name ${_combined_name}_${_library}) - - if(_libraries_work) - - if ( WIN32 ) - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS ENV LIB - ) - endif ( WIN32 ) - - if ( APPLE ) - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH - ) - - else ( APPLE ) - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH - ) - endif( APPLE ) - mark_as_advanced(${_prefix}_${_library}_LIBRARY) - set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) - set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) - endif(_libraries_work) - endforeach(_library ${_list}) +set(_libraries_work TRUE) +set(${LIBRARIES}) +set(_combined_name) +foreach(_library ${_list}) + set(_combined_name ${_combined_name}_${_library}) + if(_libraries_work) - # Test this combination of libraries. - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}}) - #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) - if(_LANGUAGES_ MATCHES Fortran) - check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) - endif(_LANGUAGES_ MATCHES Fortran) - set(CMAKE_REQUIRED_LIBRARIES) - mark_as_advanced(${_prefix}${_combined_name}_WORKS) - set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) + if ( WIN32 ) + if(BLA_STATIC) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") + endif(BLA_STATIC) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS ENV LIB + ) + endif ( WIN32 ) + + if ( APPLE ) + if(BLA_STATIC) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") + endif(BLA_STATIC) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH + ) + + else ( APPLE ) + if(BLA_STATIC) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so") + endif(BLA_STATIC) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH + ) + endif( APPLE ) + mark_as_advanced(${_prefix}_${_library}_LIBRARY) + set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) + set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) endif(_libraries_work) - if(NOT _libraries_work) - set(${LIBRARIES} FALSE) - endif(NOT _libraries_work) - #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") +endforeach(_library ${_list}) +if(_libraries_work) + # Test this combination of libraries. + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads}) +# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) + set(CMAKE_REQUIRED_LIBRARIES) + mark_as_advanced(${_prefix}${_combined_name}_WORKS) + set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) +endif(_libraries_work) +if(NOT _libraries_work) + set(${LIBRARIES} FALSE) +endif(NOT _libraries_work) +#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") endmacro(Check_Fortran_Libraries) set(BLAS_LINKER_FLAGS) set(BLAS_LIBRARIES) set(BLAS95_LIBRARIES) - - - -if(NOT BLAS_LIBRARIES) +if ($ENV{BLA_VENDOR} MATCHES ".+") + set(BLA_VENDOR $ENV{BLA_VENDOR}) +else ($ENV{BLA_VENDOR} MATCHES ".+") + if(NOT BLA_VENDOR) + set(BLA_VENDOR "All") + endif(NOT BLA_VENDOR) +endif ($ENV{BLA_VENDOR} MATCHES ".+") + +if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - cblas_dgemm - "" - "cblas;f77blas;atlas" - ) -endif(NOT BLAS_LIBRARIES) + BLAS_LIBRARIES + BLAS + cblas_dgemm + "" + "cblas;f77blas;atlas" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) -if(NOT BLAS_LIBRARIES) +if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "sgemm;dgemm;blas" - ) -endif(NOT BLAS_LIBRARIES) + BLAS_LIBRARIES + BLAS + sgemm + "" + "sgemm;dgemm;blas" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") # BLAS in Alpha CXML library? -if(NOT BLAS_LIBRARIES) +if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "cxml" - ) -endif(NOT BLAS_LIBRARIES) + BLAS_LIBRARIES + BLAS + sgemm + "" + "cxml" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") # BLAS in Alpha DXML library? (now called CXML, see above) -if(NOT BLAS_LIBRARIES) +if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "dxml" - ) -endif(NOT BLAS_LIBRARIES) + BLAS_LIBRARIES + BLAS + sgemm + "" + "dxml" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") # BLAS in Sun Performance library? -if(NOT BLAS_LIBRARIES) +if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "-xlic_lib=sunperf" - "sunperf;sunmath" - ) + BLAS_LIBRARIES + BLAS + sgemm + "-xlic_lib=sunperf" + "sunperf;sunmath" + "" + ) if(BLAS_LIBRARIES) set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf") endif(BLAS_LIBRARIES) - -endif(NOT BLAS_LIBRARIES) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") # BLAS in SCSL library? (SGI/Cray Scientific Library) -if(NOT BLAS_LIBRARIES) +if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "scsl" - ) -endif(NOT BLAS_LIBRARIES) + BLAS_LIBRARIES + BLAS + sgemm + "" + "scsl" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") # BLAS in SGIMATH library? -if(NOT BLAS_LIBRARIES) +if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "complib.sgimath" - ) -endif(NOT BLAS_LIBRARIES) + BLAS_LIBRARIES + BLAS + sgemm + "" + "complib.sgimath" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") # BLAS in IBM ESSL library? (requires generic BLAS lib, too) -if(NOT BLAS_LIBRARIES) +if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "essl;blas" - ) -endif(NOT BLAS_LIBRARIES) - - - + BLAS_LIBRARIES + BLAS + sgemm + "" + "essl;blas" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") + +#BLAS in acml library? +if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "acml" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") -#BLAS in intel mkl 10 library? (em64t 64bit) +# Apple BLAS library? +if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) check_fortran_libraries( + BLAS_LIBRARIES + BLAS + cblas_dgemm + "" + "Accelerate" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") + +if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") + if ( NOT BLAS_LIBRARIES ) + check_fortran_libraries( BLAS_LIBRARIES BLAS - sgemm + cblas_dgemm "" - "mkl_intel_lp64;mkl_intel_thread;mkl_core;guide;pthread" - ) -endif(NOT BLAS_LIBRARIES) -if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm + "vecLib" "" - "mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide;pthread" ) -endif(NOT BLAS95_LIBRARIES) - -### windows version of intel mkl 10 - -if(NOT BLAS_LIBRARIES) + endif ( NOT BLAS_LIBRARIES ) +endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") +# Generic BLAS library? +if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) check_fortran_libraries( - BLAS_LIBRARIES - BLAS - SGEMM - "" - "mkl_c_dll;mkl_intel_thread_dll;mkl_core_dll;libguide40" - ) -endif(NOT BLAS_LIBRARIES) + BLAS_LIBRARIES + BLAS + sgemm + "" + "blas" + "" + ) + endif(NOT BLAS_LIBRARIES) +endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") -if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( +#BLAS in intel mkl 10 library? (em64t 64bit) +if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") + if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) + if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) + find_package(Threads) + else(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) + find_package(Threads REQUIRED) + endif(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) + if (WIN32) + if(BLA_F95) + if(NOT BLAS95_LIBRARIES) + check_fortran_libraries( BLAS95_LIBRARIES BLAS sgemm "" "mkl_blas95;mkl_intel_c;mkl_intel_thread;mkl_core;libguide40" - ) -endif(NOT BLAS95_LIBRARIES) - - -# linux 32 bit -if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm "" - "mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide;pthread" ) -endif(NOT BLAS95_LIBRARIES) - - -#older vesions of intel mkl libs - -# BLAS in intel mkl library? (shared) -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( + endif(NOT BLAS95_LIBRARIES) + else(BLA_F95) + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( BLAS_LIBRARIES BLAS - sgemm + SGEMM "" - "mkl;guide;pthread" - ) -endif(NOT BLAS_LIBRARIES) - - -#BLAS in intel mkl library? (static, 32bit) -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm + "mkl_c_dll;mkl_intel_thread_dll;mkl_core_dll;libguide40" "" - "mkl_ia32;guide;pthread" ) -endif(NOT BLAS_LIBRARIES) - -#BLAS in intel mkl library? (static, em64t 64bit) -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( + endif(NOT BLAS_LIBRARIES) + endif(BLA_F95) + else(WIN32) + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + if(BLA_F95) + if(NOT BLAS95_LIBRARIES) + check_fortran_libraries( + BLAS95_LIBRARIES + BLAS + sgemm + "" + "mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide" + "${CMAKE_THREAD_LIBS_INIT}" + ) + endif(NOT BLAS95_LIBRARIES) + else(BLA_F95) + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "mkl_intel;mkl_intel_thread;mkl_core;guide" + "${CMAKE_THREAD_LIBS_INIT}" + ) + endif(NOT BLAS_LIBRARIES) + endif(BLA_F95) + endif (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + if(BLA_F95) + if(NOT BLAS95_LIBRARIES) + check_fortran_libraries( + BLAS95_LIBRARIES + BLAS + sgemm + "" + "mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide" + "${CMAKE_THREAD_LIBS_INIT}" + ) + endif(NOT BLAS95_LIBRARIES) + else(BLA_F95) + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "mkl_intel_lp64;mkl_intel_thread;mkl_core;guide" + "${CMAKE_THREAD_LIBS_INIT}" + ) + endif(NOT BLAS_LIBRARIES) + endif(BLA_F95) + endif (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + endif (WIN32) + #older vesions of intel mkl libs + # BLAS in intel mkl library? (shared) + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( BLAS_LIBRARIES BLAS sgemm "" - "mkl_em64t;guide;pthread" + "mkl;guide" + "${CMAKE_THREAD_LIBS_INIT}" ) -endif(NOT BLAS_LIBRARIES) - - -#BLAS in acml library? -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( + endif(NOT BLAS_LIBRARIES) + #BLAS in intel mkl library? (static, 32bit) + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( BLAS_LIBRARIES BLAS sgemm "" - "acml" + "mkl_ia32;guide" + "${CMAKE_THREAD_LIBS_INIT}" ) -endif(NOT BLAS_LIBRARIES) - -# Apple BLAS library? -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - cblas_dgemm - "" - "Accelerate" - ) - -endif(NOT BLAS_LIBRARIES) - -if ( NOT BLAS_LIBRARIES ) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - cblas_dgemm - "" - "vecLib" - ) -endif ( NOT BLAS_LIBRARIES ) - - -# Generic BLAS library? -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( + endif(NOT BLAS_LIBRARIES) + #BLAS in intel mkl library? (static, em64t 64bit) + if(NOT BLAS_LIBRARIES) + check_fortran_libraries( BLAS_LIBRARIES BLAS sgemm "" - "blas" + "mkl_em64t;guide" + "${CMAKE_THREAD_LIBS_INIT}" ) -endif(NOT BLAS_LIBRARIES) - - -if(BLAS_LIBRARIES) + endif(NOT BLAS_LIBRARIES) + endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) +endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") + + +if(BLA_F95) + if(BLAS95_LIBRARIES) + set(BLAS95_FOUND TRUE) + else(BLAS95_LIBRARIES) + set(BLAS95_FOUND FALSE) + endif(BLAS95_LIBRARIES) + + if(NOT BLAS_FIND_QUIETLY) + if(BLAS95_FOUND) + message(STATUS "A library with BLAS95 API found.") + else(BLAS95_FOUND) + if(BLAS_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with BLAS95 API not found. Please specify library location.") + else(BLAS_FIND_REQUIRED) + message(STATUS + "A library with BLAS95 API not found. Please specify library location.") + endif(BLAS_FIND_REQUIRED) + endif(BLAS95_FOUND) + endif(NOT BLAS_FIND_QUIETLY) set(BLAS_FOUND TRUE) -else(BLAS_LIBRARIES) - set(BLAS_FOUND FALSE) -endif(BLAS_LIBRARIES) + set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") +else(BLA_F95) + if(BLAS_LIBRARIES) + set(BLAS_FOUND TRUE) + else(BLAS_LIBRARIES) + set(BLAS_FOUND FALSE) + endif(BLAS_LIBRARIES) -if(NOT BLAS_FIND_QUIETLY) - if(BLAS_FOUND) - message(STATUS "A library with BLAS API found.") - else(BLAS_FOUND) - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR + if(NOT BLAS_FIND_QUIETLY) + if(BLAS_FOUND) + message(STATUS "A library with BLAS API found.") + else(BLAS_FOUND) + if(BLAS_FIND_REQUIRED) + message(FATAL_ERROR "A required library with BLAS API not found. Please specify library location." ) - else(BLAS_FIND_REQUIRED) - message(STATUS + else(BLAS_FIND_REQUIRED) + message(STATUS "A library with BLAS API not found. Please specify library location." ) - endif(BLAS_FIND_REQUIRED) - endif(BLAS_FOUND) -endif(NOT BLAS_FIND_QUIETLY) + endif(BLAS_FIND_REQUIRED) + endif(BLAS_FOUND) + endif(NOT BLAS_FIND_QUIETLY) +endif(BLA_F95) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 5d9b278e7a..ca727af3a4 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -10,25 +10,42 @@ # is found # LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l # and -L). -# LAPACK_LIBRARIES - uncached list of libraries (using full path name) to +# LAPACK_LIBRARIES - uncached list of libraries (using full path name) to # link against to use LAPACK -# LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to +# LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to # link against to use LAPACK95 +# LAPACK95_FOUND - set to true if a library implementing the LAPACK f95 +# interface is found +# BLA_STATIC if set on this determines what kind of linkage we do (static) +# BLA_VENDOR if set checks only the specified vendor, if not set checks +# all the posibilities +# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK +### List of vendors (BLA_VENDOR) valid in this module +## Intel(mkl), ACML,Apple, NAS, Generic +get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) +if(NOT _LANGUAGES_ MATCHES Fortran) + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "FindLAPACK is Fortran-only so Fortran must be enabled.") + else(LAPACK_FIND_REQUIRED) + message(STATUS "Looking for LAPACK... - NOT found (Fortran not enabled)") + return() + endif(LAPACK_FIND_REQUIRED) +endif(NOT _LANGUAGES_ MATCHES Fortran) -# - include(CheckFortranFunctionExists) set(LAPACK_FOUND FALSE) +set(LAPACK95_FOUND FALSE) -macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas) +macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads) # This macro checks for the existence of the combination of fortran libraries -# given by _list. If the combination is found, this macro checks (using the +# given by _list. If the combination is found, this macro checks (using the # Check_Fortran_Function_Exists macro) whether can link against that library # combination using the name of a routine given by _name using the linker # flags given by _flags. If the combination of libraries is found and passes # the link test, LIBRARIES is set to the list of complete library paths that # have been found. Otherwise, LIBRARIES is set to FALSE. - + # N.B. _prefix is the prefix applied to the names of all cached variables that # are generated internally and marked advanced by this macro. @@ -39,20 +56,29 @@ foreach(_library ${_list}) set(_combined_name ${_combined_name}_${_library}) if(_libraries_work) -IF (WIN32) + IF (WIN32) + if(BLA_STATIC) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") + endif(BLA_STATIC) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} - PATHS ENV LIB + PATHS ENV LIB ) -ENDIF (WIN32) + ENDIF (WIN32) if(APPLE) + if(BLA_STATIC) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib") + endif(BLA_STATIC) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH ) else(APPLE) - find_library(${_prefix}_${_library}_LIBRARY + if(BLA_STATIC) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so") + endif(BLA_STATIC) + find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH ) @@ -66,8 +92,12 @@ endforeach(_library ${_list}) if(_libraries_work) # Test this combination of libraries. - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas}) - #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + if(UNIX AND BLA_STATIC) + set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group ${${LIBRARIES}} ${_blas};-Wl,--end-group" ${_threads}) + else(UNIX AND BLA_STATIC) + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads}) + endif(UNIX AND BLA_STATIC) +# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) set(CMAKE_REQUIRED_LIBRARIES) mark_as_advanced(${_prefix}${_combined_name}_WORKS) @@ -75,9 +105,11 @@ if(_libraries_work) #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") endif(_libraries_work) -if(NOT _libraries_work) - set(${LIBRARIES} FALSE) -endif(NOT _libraries_work) + if(_libraries_work) + set(${LIBRARIES} ${${LIBRARIES}} ${_blas}) + else(_libraries_work) + set(${LIBRARIES} FALSE) + endif(_libraries_work) endmacro(Check_Lapack_Libraries) @@ -93,49 +125,34 @@ else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) find_package(BLAS REQUIRED) endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + if(BLAS_FOUND) set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) - -#intel lapack - if(NOT LAPACK_LIBRARIES) - - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "mkl_lapack" - "${BLAS_LIBRARIES}" - ) - endif(NOT LAPACK_LIBRARIES) - - if(NOT LAPACK95_LIBRARIES) - check_lapack_libraries( - LAPACK95_LIBRARIES - LAPACK - cheev - "" - "mkl_lapack95" - "${BLAS_LIBRARIES}" - ) - endif(NOT LAPACK95_LIBRARIES) - + if ($ENV{BLA_VENDOR} MATCHES ".+") + set(BLA_VENDOR $ENV{BLA_VENDOR}) + else ($ENV{BLA_VENDOR} MATCHES ".+") + if(NOT BLA_VENDOR) + set(BLA_VENDOR "All") + endif(NOT BLA_VENDOR) + endif ($ENV{BLA_VENDOR} MATCHES ".+") #acml lapack + if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") if(NOT LAPACK_LIBRARIES) - - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "acml" - "${BLAS_LIBRARIES}" - ) -endif(NOT LAPACK_LIBRARIES) - + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "acml" + "" + "" + ) + endif(NOT LAPACK_LIBRARIES) + endif (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") # Apple LAPACK library? -if(NOT LAPACK_LIBRARIES) +if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) check_lapack_libraries( LAPACK_LIBRARIES LAPACK @@ -143,9 +160,11 @@ if(NOT LAPACK_LIBRARIES) "" "Accelerate" "${BLAS_LIBRARIES}" + "" ) - endif(NOT LAPACK_LIBRARIES) - + endif(NOT LAPACK_LIBRARIES) +endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") +if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") if ( NOT LAPACK_LIBRARIES ) check_lapack_libraries( LAPACK_LIBRARIES @@ -154,10 +173,12 @@ if(NOT LAPACK_LIBRARIES) "" "vecLib" "${BLAS_LIBRARIES}" + "" ) endif ( NOT LAPACK_LIBRARIES ) - +endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") # Generic LAPACK library? +if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") if ( NOT LAPACK_LIBRARIES ) check_lapack_libraries( LAPACK_LIBRARIES @@ -166,25 +187,85 @@ if(NOT LAPACK_LIBRARIES) "" "lapack" "${BLAS_LIBRARIES}" + "" ) endif ( NOT LAPACK_LIBRARIES ) - +endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") +#intel lapack + if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") + if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) + if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_PACKAGE(Threads) + else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_package(Threads REQUIRED) + endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + if (BLA_F95) + if(NOT LAPACK95_LIBRARIES) + check_lapack_libraries( + LAPACK95_LIBRARIES + LAPACK + cheev + "" + "mkl_lapack95" + "${BLAS95_LIBRARIES}" + "${CMAKE_THREAD_LIBS_INIT}" + ) + endif(NOT LAPACK95_LIBRARIES) + else(BLA_F95) + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "mkl_lapack" + "${BLAS_LIBRARIES}" + "${CMAKE_THREAD_LIBS_INIT}" + ) + endif(NOT LAPACK_LIBRARIES) + endif(BLA_F95) + endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) + endif(BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") else(BLAS_FOUND) message(STATUS "LAPACK requires BLAS") endif(BLAS_FOUND) -if(LAPACK_LIBRARIES) +if(BLA_F95) + if(LAPACK95_LIBRARIES) + set(LAPACK95_FOUND TRUE) + else(LAPACK95_LIBRARIES) + set(LAPACK95_FOUND FALSE) + endif(LAPACK95_LIBRARIES) + if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK95_FOUND) + message(STATUS "A library with LAPACK95 API found.") + else(LAPACK95_FOUND) + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK95 API not found. Please specify library location." + ) + else(LAPACK_FIND_REQUIRED) + message(STATUS + "A library with LAPACK95 API not found. Please specify library location." + ) + endif(LAPACK_FIND_REQUIRED) + endif(LAPACK95_FOUND) + endif(NOT LAPACK_FIND_QUIETLY) + set(LAPACK_FOUND "${LAPACK95_FOUND}") + set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}") +else(BLA_F95) + if(LAPACK_LIBRARIES) set(LAPACK_FOUND TRUE) -else(LAPACK_LIBRARIES) + else(LAPACK_LIBRARIES) set(LAPACK_FOUND FALSE) -endif(LAPACK_LIBRARIES) + endif(LAPACK_LIBRARIES) -if(NOT LAPACK_FIND_QUIETLY) + if(NOT LAPACK_FIND_QUIETLY) if(LAPACK_FOUND) message(STATUS "A library with LAPACK API found.") else(LAPACK_FOUND) if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR + message(FATAL_ERROR "A required library with LAPACK API not found. Please specify library location." ) else(LAPACK_FIND_REQUIRED) @@ -193,4 +274,5 @@ if(NOT LAPACK_FIND_QUIETLY) ) endif(LAPACK_FIND_REQUIRED) endif(LAPACK_FOUND) -endif(NOT LAPACK_FIND_QUIETLY) + endif(NOT LAPACK_FIND_QUIETLY) +endif(BLA_F95) diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index d568c94d50..03e95ef714 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -210,11 +210,11 @@ elseif (MPI_COMPILE_CMDLINE) foreach(LIB ${MPI_LIBNAMES}) string(REGEX REPLACE "^-l" "" LIB ${LIB}) set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - find_library(MPI_LIB ${LIB} PATHS ${MPI_LINK_PATH}) + find_library(MPI_LIB ${LIB} HINTS ${MPI_LINK_PATH}) if (MPI_LIB) list(APPEND MPI_LIBRARIES ${MPI_LIB}) else (MPI_LIB) - status(ERROR "Unable to find MPI library ${LIB}") + message(SEND_ERROR "Unable to find MPI library ${LIB}") endif (MPI_LIB) endforeach(LIB) set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI detection" FORCE) @@ -222,12 +222,13 @@ elseif (MPI_COMPILE_CMDLINE) # Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and # MPI_EXTRA_LIBRARY. list(LENGTH MPI_LIBRARIES MPI_NUMLIBS) - if (MPI_NUMLIBS GREATER 0) + list(LENGTH MPI_LIBNAMES MPI_NUMLIBS_EXPECTED) + if (MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED) list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK) set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE) - else (MPI_NUMLIBS GREATER 0) - set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE STRING "MPI library to link against" FORCE) - endif (MPI_NUMLIBS GREATER 0) + else (MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED) + set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE FILEPATH "MPI library to link against" FORCE) + endif (MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED) if (MPI_NUMLIBS GREATER 1) set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES}) list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0) diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index bee42a8b12..ec82b520c9 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -395,6 +395,11 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") D:/ $ENV{ProgramFiles} PATH_SUFFIXES + wxWidgets-2.9.4 + wxWidgets-2.9.3 + wxWidgets-2.9.2 + wxWidgets-2.9.1 + wxWidgets-2.9.0 wxWidgets-2.8.8 wxWidgets-2.8.7 wxWidgets-2.8.6 @@ -410,6 +415,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") wxWidgest-2.7.1 wxWidgets-2.7.0 wxWidgets-2.7.0-1 + wxWidgets-2.6.4 wxWidgets-2.6.3 wxWidgets-2.6.2 wxWidgets-2.6.1 @@ -433,21 +439,26 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") # Select one default tree inside the already determined wx tree. # Prefer static/shared order usually consistent with build # settings. + IF(MINGW) + SET(WX_LIB_DIR_PREFIX gcc) + ELSE(MINGW) + SET(WX_LIB_DIR_PREFIX vc) + ENDIF(MINGW) IF(BUILD_SHARED_LIBS) FIND_PATH(wxWidgets_LIB_DIR - NAMES wxpng.lib wxpngd.lib + NAMES msw/build.cfg mswd/build.cfg PATHS - ${WX_ROOT_DIR}/lib/vc_dll # prefer shared - ${WX_ROOT_DIR}/lib/vc_lib + ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared + ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib DOC "Path to wxWidgets libraries?" NO_DEFAULT_PATH ) ELSE(BUILD_SHARED_LIBS) FIND_PATH(wxWidgets_LIB_DIR - NAMES wxpng.lib wxpngd.lib + NAMES msw/build.cfg mswd/build.cfg PATHS - ${WX_ROOT_DIR}/lib/vc_lib # prefer static - ${WX_ROOT_DIR}/lib/vc_dll + ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static + ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll DOC "Path to wxWidgets libraries?" NO_DEFAULT_PATH ) diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx index 88a295ca2d..066efc85bc 100644 --- a/Source/CPack/cmCPackBundleGenerator.cxx +++ b/Source/CPack/cmCPackBundleGenerator.cxx @@ -36,7 +36,8 @@ int cmCPackBundleGenerator::InitializeInternal() std::vector<std::string>(), false); if(hdiutil_path.empty()) { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate hdiutil command" + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot locate hdiutil command" << std::endl); return 0; } @@ -46,7 +47,8 @@ int cmCPackBundleGenerator::InitializeInternal() std::vector<std::string>(1, "/Developer/Tools"), false); if(setfile_path.empty()) { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate SetFile command" + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot locate SetFile command" << std::endl); return 0; } @@ -77,13 +79,57 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, { (void) files; + // Get required arguments ... + const std::string cpack_bundle_name = this->GetOption("CPACK_BUNDLE_NAME") ? this->GetOption("CPACK_BUNDLE_NAME") : ""; + if(cpack_bundle_name.empty()) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_BUNDLE_NAME must be set." + << std::endl); + + return 0; + } + + const std::string cpack_bundle_plist = this->GetOption("CPACK_BUNDLE_PLIST") ? this->GetOption("CPACK_BUNDLE_PLIST") : ""; + if(cpack_bundle_plist.empty()) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_BUNDLE_PLIST must be set." + << std::endl); + + return 0; + } + + const std::string cpack_bundle_icon = this->GetOption("CPACK_BUNDLE_ICON") ? this->GetOption("CPACK_BUNDLE_ICON") : ""; + if(cpack_bundle_icon.empty()) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_BUNDLE_ICON must be set." + << std::endl); + + return 0; + } + + const std::string cpack_bundle_startup_command = this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") ? this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") : ""; + if(cpack_bundle_startup_command.empty()) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_BUNDLE_STARTUP_COMMAND must be set." + << std::endl); + + return 0; + } + + // Get optional arguments ... + const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON") ? this->GetOption("CPACK_PACKAGE_ICON") : ""; + // The staging directory contains everything that will end-up inside the // final disk image ... cmOStringStream staging; staging << toplevel; cmOStringStream contents; - contents << staging.str() << "/" << this->GetOption("CPACK_BUNDLE_NAME") + contents << staging.str() << "/" << cpack_bundle_name << ".app/" << "Contents"; cmOStringStream application; @@ -92,56 +138,57 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, cmOStringStream resources; resources << contents.str() << "/" << "Resources"; - // Install a user-provided bundle metadata file ... - if(this->GetOption("CPACK_BUNDLE_PLIST")) - { - cmOStringStream plist_source; - plist_source << this->GetOption("CPACK_BUNDLE_PLIST"); + // Install a required, user-provided bundle metadata file ... + cmOStringStream plist_source; + plist_source << cpack_bundle_plist; - cmOStringStream plist_target; - plist_target << contents.str() << "/" << "Info.plist"; + cmOStringStream plist_target; + plist_target << contents.str() << "/" << "Info.plist"; - if(!this->CopyFile(plist_source, plist_target)) - { - return 0; - } + if(!this->CopyFile(plist_source, plist_target)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying plist. Check the value of CPACK_BUNDLE_PLIST." + << std::endl); + + return 0; } // Install a user-provided bundle icon ... - if(this->GetOption("CPACK_BUNDLE_ICON")) - { - cmOStringStream icon_source; - icon_source << this->GetOption("CPACK_BUNDLE_ICON"); + cmOStringStream icon_source; + icon_source << cpack_bundle_icon; - cmOStringStream icon_target; - icon_target << resources.str() << "/" - << this->GetOption("CPACK_BUNDLE_NAME") << ".icns"; + cmOStringStream icon_target; + icon_target << resources.str() << "/" << cpack_bundle_name << ".icns"; - if(!this->CopyFile(icon_source, icon_target)) - { - return 0; - } + if(!this->CopyFile(icon_source, icon_target)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying bundle icon. Check the value of CPACK_BUNDLE_ICON." + << std::endl); + + return 0; } // Install a user-provided startup command (could be an executable or a // script) ... - if(this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND")) - { - cmOStringStream command_source; - command_source << this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND"); + cmOStringStream command_source; + command_source << cpack_bundle_startup_command; - cmOStringStream command_target; - command_target << application.str() << "/" - << this->GetOption("CPACK_BUNDLE_NAME"); + cmOStringStream command_target; + command_target << application.str() << "/" << cpack_bundle_name; - if(!this->CopyFile(command_source, command_target)) - { - return 0; - } + if(!this->CopyFile(command_source, command_target)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying startup command. Check the value of CPACK_BUNDLE_STARTUP_COMMAND." + << std::endl); - cmSystemTools::SetPermissions(command_target.str().c_str(), 0777); + return 0; } + cmSystemTools::SetPermissions(command_target.str().c_str(), 0777); + // Add a symlink to /Applications so users can drag-and-drop the bundle // into it cmOStringStream application_link; @@ -150,16 +197,20 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, application_link.str().c_str()); // Optionally add a custom volume icon ... - if(this->GetOption("CPACK_PACKAGE_ICON")) + if(!cpack_package_icon.empty()) { cmOStringStream package_icon_source; - package_icon_source << this->GetOption("CPACK_PACKAGE_ICON"); + package_icon_source << cpack_package_icon; cmOStringStream package_icon_destination; package_icon_destination << staging.str() << "/.VolumeIcon.icns"; if(!this->CopyFile(package_icon_source, package_icon_destination)) { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying disk volume icon. Check the value of CPACK_PACKAGE_ICON." + << std::endl); + return 0; } } @@ -180,11 +231,15 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, if(!this->RunCommand(temp_image_command)) { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error generating temporary disk image." + << std::endl); + return 0; } // Optionally set the custom icon flag for the image ... - if(this->GetOption("CPACK_PACKAGE_ICON")) + if(!cpack_package_icon.empty()) { cmOStringStream temp_mount; temp_mount << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/mnt"; @@ -198,6 +253,10 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, if(!this->RunCommand(attach_command)) { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error attaching temporary disk image." + << std::endl); + return 0; } @@ -208,6 +267,10 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, if(!this->RunCommand(setfile_command)) { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error assigning custom icon to temporary disk image." + << std::endl); + return 0; } @@ -218,6 +281,10 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, if(!this->RunCommand(detach_command)) { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error detaching temporary disk image." + << std::endl); + return 0; } } @@ -233,63 +300,12 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, if(!this->RunCommand(final_image_command)) { - return 0; - } - -/* - // Disk image directories - std::string diskImageDirectory = toplevel; - std::string diskImageBackgroundImageDir = diskImageDirectory - + "/.background"; - - // App bundle directories - std::string packageDirFileName = toplevel; - packageDirFileName += "/"; - packageDirFileName += this->GetOption("CPACK_PACKAGE_FILE_NAME"); - packageDirFileName += ".app"; - std::string contentsDirectory = packageDirFileName + "/Contents"; - std::string resourcesDirectory = contentsDirectory + "/Resources"; - std::string appDirectory = contentsDirectory + "/MacOS"; - - const char* dir = resourcesDirectory.c_str(); - const char* appdir = appDirectory.c_str(); - const char* contDir = contentsDirectory.c_str(); - const char* iconFile = this->GetOption("CPACK_PACKAGE_ICON"); - if ( iconFile ) - { - std::string iconFileName = cmsys::SystemTools::GetFilenameName(iconFile); - if ( !cmSystemTools::FileExists(iconFile) ) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find icon file: " - << iconFile << ". Please check CPACK_PACKAGE_ICON setting." - << std::endl); - return 0; - } - std::string destFileName = resourcesDirectory + "/" + iconFileName; - this->ConfigureFile(iconFile, destFileName.c_str(), true); - this->SetOptionIfNotSet("CPACK_APPLE_GUI_ICON", iconFileName.c_str()); - } - - if ( - !this->CopyResourcePlistFile("VolumeIcon.icns", - diskImageDirectory.c_str(), - ".VolumeIcon.icns", true ) || - !this->CopyResourcePlistFile("DS_Store", diskImageDirectory.c_str(), - ".DS_Store", true ) || - !this->CopyResourcePlistFile("background.png", - diskImageBackgroundImageDir.c_str(), "background.png", true ) || - !this->CopyResourcePlistFile("RuntimeScript", dir) || - !this->CopyResourcePlistFile("Bundle.Info.plist", contDir, - "Info.plist" ) || - !this->CopyResourcePlistFile("OSXScriptLauncher", appdir, - this->GetOption("CPACK_PACKAGE_FILE_NAME"), true) - ) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files" + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error compressing disk image." << std::endl); + return 0; } -*/ return 1; } @@ -298,8 +314,21 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName, bool cmCPackBundleGenerator::CopyFile(cmOStringStream& source, cmOStringStream& target) { - return cmSystemTools::CopyFileIfDifferent(source.str().c_str(), - target.str().c_str()); + if(!cmSystemTools::CopyFileIfDifferent( + source.str().c_str(), + target.str().c_str())) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying " + << source.str() + << " to " + << target.str() + << std::endl); + + return false; + } + + return true; } //---------------------------------------------------------------------- @@ -308,12 +337,21 @@ bool cmCPackBundleGenerator::RunCommand(cmOStringStream& command) std::string output; int exit_code = 1; - bool result = cmSystemTools::RunSingleCommand(command.str().c_str(), - &output, &exit_code, 0, this->GeneratorVerbose, 0); + bool result = cmSystemTools::RunSingleCommand( + command.str().c_str(), + &output, + &exit_code, + 0, + this->GeneratorVerbose, + 0); + if(!result || exit_code) { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running command: " - << command.str().c_str() << std::endl); + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error executing: " + << command.str() + << std::endl); + return false; } diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index b133e3570b..87157a7e40 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1078,8 +1078,47 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item) this->Items.push_back(Item(this->LibLinkFileFlag, false)); } + // Full path libraries should have an extension. CMake 2.4 would + // add the extension after splitting the file off of the directory. + // Some existing projects depended on this to build correctly + // because they left off the extension of an otherwise full-path + // library. This worked with CMake 2.4 but only for VS IDE builds + // because the file-level dependency added to the Makefile would not + // be found. Nevertheless, some projects have this mistake but work + // because they build only with the VS IDE. We need to support them + // here by adding the missing extension. + std::string final_item = item; + if(strstr(this->GlobalGenerator->GetName(), "Visual Studio") && + this->Makefile->NeedBackwardsCompatibility(2,4) && + !cmSystemTools::ComparePath( + cmSystemTools::GetFilenameLastExtension(item).c_str(), + this->LibLinkSuffix.c_str())) + { + // Issue the warning at most once. + std::string wid = "VSIDE-LINK-EXT-"; + wid += item; + if(!this->Target->GetPropertyAsBool(wid.c_str())) + { + this->Target->SetProperty(wid.c_str(), "1"); + cmOStringStream w; + w << "Target \"" << this->Target->GetName() << "\" links to " + << "full-path item\n" + << " " << item << "\n" + << "which does not have the proper link extension \"" + << this->LibLinkSuffix << "\". " + << "CMake is adding the missing extension because compatibility " + << "with CMake 2.4 is currently enabled and this case worked " + << "accidentally in that version. " + << "The link extension should be added by the project developer."; + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + } + + // Add the missing extension. + final_item += this->LibLinkSuffix; + } + // Now add the full path to the library. - this->Items.push_back(Item(item, true)); + this->Items.push_back(Item(final_item, true)); } //---------------------------------------------------------------------------- diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index a644749d49..cf228f1c08 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -79,6 +79,13 @@ void cmDocumentVariables::DefineVariables(cmake* cm) " on the final build environment. ", false, "Variables that Provide Information"); cm->DefineProperty + ("CMAKE_CROSSCOMPILING", cmProperty::VARIABLE, + "Is CMake currently cross compiling.", + "This variable will be set to true by CMake if CMake is cross " + "compiling. Specifically if the build platform is different " + "from the target platform.", false, + "Variables that Provide Information"); + cm->DefineProperty ("CMAKE_CACHEFILE_DIR", cmProperty::VARIABLE, "The directory with the CMakeCache.txt file.", "This is the full path to the directory that has the " @@ -418,14 +425,6 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Variables That Change Behavior"); cm->DefineProperty - ("CMAKE_CROSSCOMPILING", cmProperty::VARIABLE, - "Is CMake currently cross compiling.", - "This variable will be set to true by CMake if CMake is cross " - "compiling. Specifically if the build platform is different " - "from the target platform.", false, - "Variables That Change Behavior"); - - cm->DefineProperty ("CMAKE_INSTALL_PREFIX", cmProperty::VARIABLE, "Install directory used by install.", "If \"make install\" is invoked or INSTALL is built" @@ -444,6 +443,97 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Variables That Change Behavior"); cm->DefineProperty + ("CMAKE_PREFIX_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_XXX(), with appropriate suffixes added.", + "Specifies a path which will be used by the FIND_XXX() commands. It " + "contains the \"base\" directories, the FIND_XXX() commands append " + "appropriate subdirectories to the base directories. So FIND_PROGRAM() " + "adds /bin to each of the directories in the path, FIND_LIBRARY() " + "appends /lib to each of the directories, and FIND_PATH() and " + "FIND_FILE() append /include . By default it is empty, it is intended " + "to be set by the project. See also CMAKE_SYSTEM_PREFIX_PATH, " + "CMAKE_INCLUDE_PATH, CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_INCLUDE_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_FILE() and FIND_PATH().", + "Specifies a path which will be used both by FIND_FILE() and " + "FIND_PATH(). Both commands will check each of the contained directories " + "for the existence of the file which is currently searched. By default " + "it is empty, it is intended to be set by the project. See also " + "CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_PREFIX_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_LIBRARY_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_LIBRARY().", + "Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() " + "will check each of the contained directories for the existence of the " + "library which is currently searched. By default it is empty, it is " + "intended to be set by the project. See also CMAKE_SYSTEM_LIBRARY_PATH, " + "CMAKE_PREFIX_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_PROGRAM_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_PROGRAM().", + "Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() " + "will check each of the contained directories for the existence of the " + "program which is currently searched. By default it is empty, it is " + "intended to be set by the project. See also CMAKE_SYSTEM_PROGRAM_PATH, " + " CMAKE_PREFIX_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_SYSTEM_PREFIX_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_XXX(), with appropriate suffixes added.", + "Specifies a path which will be used by the FIND_XXX() commands. It " + "contains the \"base\" directories, the FIND_XXX() commands append " + "appropriate subdirectories to the base directories. So FIND_PROGRAM() " + "adds /bin to each of the directories in the path, FIND_LIBRARY() " + "appends /lib to each of the directories, and FIND_PATH() and " + "FIND_FILE() append /include . By default this contains the standard " + "directories for the current system. It is NOT intended " + "to be modified by the project, use CMAKE_PREFIX_PATH for this. See also " + "CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_SYSTEM_LIBRARY_PATH, " + "CMAKE_SYSTEM_PROGRAM_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_SYSTEM_INCLUDE_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_FILE() and FIND_PATH().", + "Specifies a path which will be used both by FIND_FILE() and " + "FIND_PATH(). Both commands will check each of the contained directories " + "for the existence of the file which is currently searched. By default " + "it contains the standard directories for the current system. It is " + "NOT intended to be modified by the project, use CMAKE_INCLUDE_PATH " + "for this. See also CMAKE_SYSTEM_PREFIX_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_SYSTEM_LIBRARY_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_LIBRARY().", + "Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() " + "will check each of the contained directories for the existence of the " + "library which is currently searched. By default it contains the " + "standard directories for the current system. It is NOT intended to be " + "modified by the project, use CMAKE_SYSTEM_LIBRARY_PATH for this. See " + "also CMAKE_SYSTEM_PREFIX_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_SYSTEM_PROGRAM_PATH", cmProperty::VARIABLE, + "Path used for searching by FIND_PROGRAM().", + "Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() " + "will check each of the contained directories for the existence of the " + "program which is currently searched. By default it contains the " + "standard directories for the current system. It is NOT intended to be " + "modified by the project, use CMAKE_PROGRAM_PATH for this. See also " + "CMAKE_SYSTEM_PREFIX_PATH.", false, + "Variables That Change Behavior"); + + cm->DefineProperty ("CMAKE_USER_MAKE_RULES_OVERRIDE", cmProperty::VARIABLE, "Specify a file that can change the build rule variables.", "If this variable is set, it should to point to a " diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 3b3dab736c..72a819225f 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -1350,7 +1350,9 @@ void cmDocumentation ::PrintDocumentationCommand(std::ostream& os, const cmDocumentationEntry &entry) { - cmDocumentationSection *sec = new cmDocumentationSection("",""); + // the string "SingleItem" will be used in a few places to detect the case + // that only the documentation for a single item is printed + cmDocumentationSection *sec = new cmDocumentationSection("SingleItem",""); sec->Append(entry); this->AllSections["temp"] = sec; this->ClearSections(); diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 9c633232c0..97180476f9 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -146,6 +146,10 @@ cmDocumentationFormatter::ComputeSectionLinkPrefix(std::string const& name) { return "see"; } + else if(name.find("SingleItem") != name.npos) + { + return "single_item"; + } else { std::cerr diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx index a40ce99c62..0f7cc704d0 100644 --- a/Source/cmDocumentationFormatterHTML.cxx +++ b/Source/cmDocumentationFormatterHTML.cxx @@ -117,30 +117,37 @@ void cmDocumentationFormatterHTML const cmDocumentationSection §ion, const char* name) { - if(name) - { - os << "<h2><a name=\"section_" << name << "\"/>" << name << "</h2>\n"; - } - std::string prefix = this->ComputeSectionLinkPrefix(name); const std::vector<cmDocumentationEntry> &entries = section.GetEntries(); - os << "<ul>\n"; - for(std::vector<cmDocumentationEntry>::const_iterator op - = entries.begin(); op != entries.end(); ++ op ) + // skip the index if the help for only a single item (--help-command, + // --help-policy, --help-property, --help-module) is printed + bool isSingleItemHelp = ((name!=0) && (strcmp(name, "SingleItem")==0)); + + if (!isSingleItemHelp) { - if(op->Name.size()) + if (name) { - os << " <li><a href=\"#" << prefix << ":"; - cmDocumentationPrintHTMLId(os, op->Name.c_str()); - os << "\"><b><code>"; - this->PrintHTMLEscapes(os, op->Name.c_str()); - os << "</code></b></a></li>"; + os << "<h2><a name=\"section_" << name << "\"/>" << name << "</h2>\n"; } + + os << "<ul>\n"; + for(std::vector<cmDocumentationEntry>::const_iterator op + = entries.begin(); op != entries.end(); ++ op ) + { + if(op->Name.size()) + { + os << " <li><a href=\"#" << prefix << ":"; + cmDocumentationPrintHTMLId(os, op->Name.c_str()); + os << "\"><b><code>"; + this->PrintHTMLEscapes(os, op->Name.c_str()); + os << "</code></b></a></li>"; + } + } + os << "</ul>\n" ; } - os << "</ul>\n" ; for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin(); op != entries.end();) @@ -240,6 +247,14 @@ void cmDocumentationFormatterHTML ::PrintIndex(std::ostream& os, std::vector<const cmDocumentationSection *>& sections) { + // skip the index if only the help for a single item is printed + if ((sections.size() == 1) + && (sections[0]->GetName(this->GetForm()) != 0 ) + && (std::string(sections[0]->GetName(this->GetForm())) == "SingleItem")) + { + return; + } + os << "<h2><a name=\"section_Index\"/>Master Index</h2>\n"; os << "<ul>\n"; for(unsigned int i=0; i < sections.size(); ++i) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5a2a6c65c4..1c6df15298 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2365,7 +2365,9 @@ cmLocalGenerator // Avoid full paths by removing leading slashes. std::string::size_type pos = 0; - for(;pos < ssin.size() && ssin[pos] == '/'; ++pos); + for(;pos < ssin.size() && ssin[pos] == '/'; ++pos) + { + } ssin = ssin.substr(pos); // Avoid full paths by removing colons. |