summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CTestCustom.cmake.in19
-rw-r--r--Modules/CMakeASMInformation.cmake35
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake2
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake7
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in4
-rw-r--r--Modules/CMakeTestCCompiler.cmake1
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake1
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake1
-rw-r--r--Modules/CMakeVS10FindMake.cmake1
-rw-r--r--Modules/DartConfiguration.tcl.in4
-rw-r--r--Modules/FindCurses.cmake9
-rw-r--r--Modules/FindJava.cmake57
-rw-r--r--Modules/FindKDE4.cmake2
-rw-r--r--Modules/FindLibXml2.cmake2
-rw-r--r--Modules/FindOpenAL.cmake9
-rw-r--r--Modules/FindPkgConfig.cmake27
-rw-r--r--Modules/FindZLIB.cmake2
-rw-r--r--Modules/FindwxWidgets.cmake7
-rw-r--r--Modules/Platform/Windows-cl.cmake27
-rw-r--r--Modules/Platform/Windows-cl.cmake.in1
-rw-r--r--Modules/UseQt4.cmake5
-rw-r--r--Source/CTest/cmCTestBZR.cxx2
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx1
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx33
-rw-r--r--Source/CTest/cmCTestGIT.cxx14
-rw-r--r--Source/CTest/cmCTestGIT.h1
-rw-r--r--Source/CTest/cmCTestHG.cxx2
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx1
-rw-r--r--Source/CTest/cmCTestVC.cxx1
-rw-r--r--Source/CTest/cmCTestVC.h1
-rw-r--r--Source/QtDialog/CMakeSetup.cxx19
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx42
-rw-r--r--Source/QtDialog/CMakeSetupDialog.h3
-rw-r--r--Source/QtDialog/CMakeSetupDialog.ui240
-rw-r--r--Source/cmComputeLinkInformation.cxx6
-rw-r--r--Source/cmData.h38
-rw-r--r--Source/cmDocumentVariables.cxx2
-rw-r--r--Source/cmDocumentation.cxx26
-rw-r--r--Source/cmDocumentationFormatterText.cxx2
-rw-r--r--Source/cmELF.cxx2
-rw-r--r--Source/cmFindCommon.cxx14
-rw-r--r--Source/cmFindCommon.h2
-rw-r--r--Source/cmGetFilenameComponentCommand.h12
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx1
-rw-r--r--Source/cmIncludeExternalMSProjectCommand.h5
-rw-r--r--Source/cmLocalGenerator.cxx16
-rw-r--r--Source/cmLocalGenerator.h2
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx8
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmMakefile.cxx57
-rw-r--r--Source/cmMakefile.h8
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx2
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx15
-rw-r--r--Source/cmStandardIncludes.h1
-rw-r--r--Source/cmSystemTools.cxx3
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
-rw-r--r--Source/cmWin32ProcessExecution.cxx10
-rw-r--r--Source/kwsys/Configure.h.in4
-rw-r--r--Source/kwsys/ProcessUNIX.c2
-rw-r--r--Source/kwsys/SystemTools.cxx7
-rw-r--r--Source/kwsys/hashtable.hxx.in16
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake4
-rw-r--r--Source/kwsys/testAutoPtr.cxx2
-rw-r--r--Tests/CMakeLists.txt6
-rw-r--r--Tests/CTestTest2/test.cmake.in8
-rw-r--r--Tests/CTestTest3/test.cmake.in8
-rw-r--r--Tests/CTestTestScheduler/CMakeLists.txt4
-rw-r--r--Tests/CTestTestScheduler/sleep.c4
-rw-r--r--Tests/CTestUpdateBZR.cmake.in7
-rw-r--r--Tests/CTestUpdateCommon.cmake4
-rw-r--r--Tests/CTestUpdateGIT.cmake.in69
-rw-r--r--Tests/CheckCompilerRelatedVariables/CMakeLists.txt85
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_endian.h3
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_copy_bhfi.c1
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_compression_program.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c8
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_windows.h16
-rw-r--r--Utilities/cmlibarchive/libarchive/config_windows.h7
-rw-r--r--Utilities/cmzlib/deflate.c8
81 files changed, 662 insertions, 444 deletions
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index b0486b4..6174002 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -26,16 +26,18 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
"remark\\(1209"
"LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF"
"LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF"
- "Warning: LINN32: Last line 3538 (DD2h) is less than first line 3538 (DD2h) for symbol .*cmsys::System.*"
- "Warning: library was too large for page size, rebuilt with page size 1024"
- "Warning: library was too large for page size, rebuilt with page size 4096"
- "Warning: LINN32: Last line 3538 (DD2h) is less than first line 3538 (DD2h) for symbol.*cmsys::System.*"
- "Warning: public.*_archive_read_open_file.*in module.*archive_read_open_filename.c.*clashes with prior module.*archive_read_open_file.c.*"
- "Warning: public.*BZ2_bzread.*in module.*bzlib.*clashes with prior module.*bzlib.*"
+ "Warning: library was too large for page size.*"
+ "Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*"
+ "Warning: public.*BZ2_bz.*in module.*bzlib.*clashes with prior module.*bzlib.*"
+ "Warning: public.*_archive.*clashes with prior module.*"
+ "Warning: LINN32: Last line.*is less.*"
+ "warning.*directory name.*CMake-Xcode.*/bin/.*does not exist.*"
"stl_deque.h:1051"
"(Lexer|Parser).*warning.*conversion.*may (alter its value|change the sign)"
"[Qq]t([Cc]ore|[Gg]ui).*warning.*conversion.*may alter its value"
"Parser.cxx.*warning.*2111-D.*statement is unreachable"
+ "warning:.*is.*very unsafe.*consider using.*"
+ "warning:.*is.*misused, please use.*"
"CMakeSetupManifest.xml.*manifest authoring warning.*Unrecognized Element"
)
@@ -66,8 +68,3 @@ SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude Qt source files from coverage results:
"[A-Za-z]./[Qq]t/qt-.+-opensource-src"
)
-
-SET(CTEST_EXTRA_COVERAGE_GLOB
- *.txx
- *.cxx
-)
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index c495810..0fad25d 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -42,10 +42,45 @@ IF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL)
ENDIF(NOT _INCLUDED_FILE)
+# Set default assembler file extensions:
IF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
+
+# Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends:
+SET(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}")
+# avoid just having a space as the initial value for the cache
+IF(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
+ SET(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)
+ENDIF(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
+SET (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE STRING
+ "Flags used by the assembler during all build types.")
+
+IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+# default build type is none
+ IF(NOT CMAKE_NO_BUILD_TYPE)
+ SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
+ "Choose the type of build, options are: None, Debug Release RelWithDebInfo MinSizeRel.")
+ ENDIF(NOT CMAKE_NO_BUILD_TYPE)
+ SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG "${CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG_INIT}" CACHE STRING
+ "Flags used by the assembler during debug builds.")
+ SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL "${CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ "Flags used by the assembler during release minsize builds.")
+ SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE_INIT}" CACHE STRING
+ "Flags used by the assembler during release builds.")
+ SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ "Flags used by the assembler during Release with Debug Info builds.")
+ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+
+MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_FLAGS
+ CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG
+ CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL
+ CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE
+ CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO
+ )
+
+
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index c8f4c99..aa4733b 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -49,12 +49,10 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
IF(ABI_SIZEOF_DPTR)
SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
- SET(CMAKE_SIZEOF_VOID_P "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
ENDIF(ABI_SIZEOF_DPTR)
IF(ABI_NAME)
SET(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE)
- SET(CMAKE_INTERNAL_PLATFORM_ABI "${ABI_NAME}" PARENT_SCOPE)
ENDIF(ABI_NAME)
# Parse implicit linker information for this language, if available.
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 0637d20..34477a1 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -49,6 +49,7 @@ IF(NOT CMAKE_Fortran_COMPILER)
# gfortran: putative GNU Fortran 95+ compiler (in progress)
# fort77: native F77 compiler under HP-UX (and some older Crays)
# frt: Fujitsu F77 compiler
+ # pathf90/pathf95/pathf2003: PathScale Fortran compiler
# pgf77/pgf90/pgf95: Portland Group F77/F90/F95 compilers
# xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
# lf95: Lahey-Fujitsu F95 compiler
@@ -63,14 +64,16 @@ IF(NOT CMAKE_Fortran_COMPILER)
# then 77 or older compilers, gnu is always last in the group,
# so if you paid for a compiler it is picked by default.
SET(CMAKE_Fortran_COMPILER_LIST
- ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran gfortran-4 g95 f90
- pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
+ ifort ifc efc f95 pathf2003 pathf95 pgf95 lf95 xlf95 fort
+ gfortran gfortran-4 g95 f90 pathf90 pgf90 xlf90 epcf90 fort77
+ frt pgf77 xlf fl32 af77 g77 f77
)
# Vendor-specific compiler names.
SET(_Fortran_COMPILER_NAMES_GNU gfortran gfortran-4 g95 g77)
SET(_Fortran_COMPILER_NAMES_Intel ifort ifc efc)
SET(_Fortran_COMPILER_NAMES_PGI pgf95 pgf90 pgf77)
+ SET(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90)
SET(_Fortran_COMPILER_NAMES_XL xlf)
SET(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index ba2b46d..5558651 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -34,9 +34,9 @@ ENDIF(UNIX)
SET(CMAKE_Fortran_SIZEOF_DATA_PTR "@CMAKE_Fortran_SIZEOF_DATA_PTR@")
SET(CMAKE_Fortran_COMPILER_ABI "@CMAKE_Fortran_COMPILER_ABI@")
-IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
+IF(CMAKE_Fortran_SIZEOF_DATA_PTR AND NOT CMAKE_SIZEOF_VOID_P)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
-ENDIF(CMAKE_Fortran_SIZEOF_DATA_PTR)
+ENDIF()
IF(CMAKE_Fortran_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}")
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index eeaff7d..bac9932 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -74,6 +74,7 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
+ INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake)
ENDIF(CMAKE_C_COMPILER_FORCED)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 72bb8f2..06ef301 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -67,5 +67,6 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
+ INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake)
ENDIF(CMAKE_CXX_COMPILER_FORCED)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index 6f419c2..61d6336 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -90,5 +90,6 @@ ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
+ INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake)
ENDIF(CMAKE_Fortran_COMPILER_FORCED)
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
diff --git a/Modules/CMakeVS10FindMake.cmake b/Modules/CMakeVS10FindMake.cmake
index 360476c..460de25 100644
--- a/Modules/CMakeVS10FindMake.cmake
+++ b/Modules/CMakeVS10FindMake.cmake
@@ -16,6 +16,7 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0;CLR Version]/"
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 0b05865..85b4138 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -46,6 +46,10 @@ CVSUpdateOptions: @CVS_UPDATE_OPTIONS@
SVNCommand: @SVNCOMMAND@
SVNUpdateOptions: @SVN_UPDATE_OPTIONS@
+# Git options
+GITCommand: @GITCOMMAND@
+GITUpdateOptions: @GIT_UPDATE_OPTIONS@
+
# Generic update command
UpdateCommand: @UPDATE_COMMAND@
UpdateOptions: @UPDATE_OPTIONS@
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index fa68190..791e6a9 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -33,6 +33,15 @@ SET(CURSES_USE_NCURSES FALSE)
IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
SET(CURSES_USE_NCURSES TRUE)
ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
+# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html
+# cygwin ncurses stopped providing curses.h symlinks see above
+# message. Cygwin is an ncurses package, so force ncurses on
+# cygwin if the curses.h is missing
+IF(CYGWIN)
+ IF(NOT EXISTS /usr/include/curses.h)
+ SET(CURSES_USE_NCURSES TRUE)
+ ENDIF()
+ENDIF()
# Not sure the logic is correct here.
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 7eb6d900c..4cd4389 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -24,9 +24,18 @@
# and
# Java_VERSION = 1.6.0
#
-# NOTE: At the moment this script will look for javac and jar component,
-# which means it will fail if javac or jar is not found.:w
-# See Bug #9840
+# For these components the following variables are set:
+#
+# Java_FOUND - TRUE if all components are found.
+# Java_INCLUDE_DIRS - Full paths to all include dirs.
+# Java_LIBRARIES - Full paths to all libraries.
+# Java_<component>_FOUND - TRUE if <component> is found.
+#
+# Example Usages:
+# FIND_PACKAGE(Java)
+# FIND_PACKAGE(Java COMPONENTS Runtime)
+# FIND_PACKAGE(Java COMPONENTS Development)
+#
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
@@ -82,7 +91,11 @@ IF(Java_JAVA_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
IF( res )
- MESSAGE( FATAL_ERROR "Error executing java -version" )
+ IF(${Java_FIND_REQUIRED})
+ MESSAGE( FATAL_ERROR "Error executing java -version" )
+ ELSE()
+ MESSAGE( STATUS "Warning, could not run java --version")
+ ENDIF()
ELSE()
# extract major/minor version and patch level from "java -version" output
# Tested on linux using
@@ -148,12 +161,36 @@ FIND_PROGRAM(Java_JAVAC_EXECUTABLE
)
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Java DEFAULT_MSG
- Java_JAVA_EXECUTABLE
- Java_JAR_EXECUTABLE
- Java_JAVAC_EXECUTABLE
- _java_version_acceptable
-)
+if(Java_FIND_COMPONENTS)
+ foreach(component ${Java_FIND_COMPONENTS})
+ # User just want to execute some Java byte-compiled
+ if(component STREQUAL "Runtime")
+ find_package_handle_standard_args(Java DEFAULT_MSG
+ Java_JAVA_EXECUTABLE
+ _java_version_acceptable
+ )
+ elseif(component STREQUAL "Development")
+ find_package_handle_standard_args(Java DEFAULT_MSG
+ Java_JAVA_EXECUTABLE
+ Java_JAR_EXECUTABLE
+ Java_JAVAC_EXECUTABLE
+ _java_version_acceptable
+ )
+ else()
+ message(FATAL_ERROR "Comp: ${component} is not handled")
+ endif()
+ set(Java_${component}_FOUND TRUE)
+ endforeach(component)
+else()
+ # Check for everything
+ find_package_handle_standard_args(Java DEFAULT_MSG
+ Java_JAVA_EXECUTABLE
+ Java_JAR_EXECUTABLE
+ Java_JAVAC_EXECUTABLE
+ _java_version_acceptable
+ )
+endif()
+
MARK_AS_ADVANCED(
Java_JAVA_EXECUTABLE
diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake
index 12fd304..42a1530 100644
--- a/Modules/FindKDE4.cmake
+++ b/Modules/FindKDE4.cmake
@@ -73,7 +73,7 @@ IF(NOT KDE4_DATA_DIR)
EXECUTE_PROCESS(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
FILE(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
# then check the data dirs for FindKDE4Internal.cmake
- FIND_PATH(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake ${_data_DIR})
+ FIND_PATH(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake HINTS ${_data_DIR})
ENDIF(KDE4_KDECONFIG_EXECUTABLE)
ENDIF(CMAKE_CROSSCOMPILING)
ENDIF(NOT KDE4_DATA_DIR)
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index e18dc2e..67db321 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -24,7 +24,7 @@
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
+PKG_CHECK_MODULES(PC_LIBXML libxml-2.0 QUIET)
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake
index b9b7078..f42a69a 100644
--- a/Modules/FindOpenAL.cmake
+++ b/Modules/FindOpenAL.cmake
@@ -95,8 +95,9 @@ FIND_LIBRARY(OPENAL_LIBRARY
)
-SET(OPENAL_FOUND "NO")
-IF(OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
- SET(OPENAL_FOUND "YES")
-ENDIF(OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
+# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
+MARK_AS_ADVANCED(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 6e6b802..3cbb7af 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -1,15 +1,17 @@
# - a pkg-config module for CMake
#
# Usage:
-# pkg_check_modules(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*)
+# pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
# checks for all the given modules
#
-# pkg_search_module(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*)
+# pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
# checks for given modules and uses the first working one
#
# When the 'REQUIRED' argument was set, macros will fail with an error
# when module(s) could not be found
#
+# When the 'QUIET' argument is set, no status messages will be printed.
+#
# It sets the following variables:
# PKG_CONFIG_FOUND ... true if pkg-config works on the system
# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program
@@ -138,17 +140,22 @@ macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp)
endmacro(_pkgconfig_invoke_dyn)
# Splits given arguments into options and a package list
-macro(_pkgconfig_parse_options _result _is_req)
+macro(_pkgconfig_parse_options _result _is_req _is_silent)
set(${_is_req} 0)
+ set(${_is_silent} 0)
foreach(_pkg ${ARGN})
if (_pkg STREQUAL "REQUIRED")
set(${_is_req} 1)
endif (_pkg STREQUAL "REQUIRED")
+ if (_pkg STREQUAL "QUIET")
+ set(${_is_silent} 1)
+ endif (_pkg STREQUAL "QUIET")
endforeach(_pkg ${ARGN})
set(${_result} ${ARGN})
list(REMOVE_ITEM ${_result} "REQUIRED")
+ list(REMOVE_ITEM ${_result} "QUIET")
endmacro(_pkgconfig_parse_options)
###
@@ -279,7 +286,9 @@ macro(_pkg_check_modules_internal _is_required _is_silent _prefix)
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir )
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir )
- message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}")
+ if (NOT ${_is_silent})
+ message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}")
+ endif (NOT ${_is_silent})
endforeach(_pkg_check_modules_pkg)
# set variables which are combined for multiple modules
@@ -307,8 +316,8 @@ endmacro(_pkg_check_modules_internal)
macro(pkg_check_modules _prefix _module0)
# check cached value
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
- _pkgconfig_parse_options (_pkg_modules _pkg_is_required "${_module0}" ${ARGN})
- _pkg_check_modules_internal("${_pkg_is_required}" 0 "${_prefix}" ${_pkg_modules})
+ _pkgconfig_parse_options (_pkg_modules _pkg_is_required _pkg_is_silent "${_module0}" ${ARGN})
+ _pkg_check_modules_internal("${_pkg_is_required}" "${_pkg_is_silent}" "${_prefix}" ${_pkg_modules})
_pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
@@ -319,9 +328,11 @@ macro(pkg_search_module _prefix _module0)
# check cached value
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
set(_pkg_modules_found 0)
- _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN})
+ _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required _pkg_is_silent "${_module0}" ${ARGN})
- message(STATUS "checking for one of the modules '${_pkg_modules_alt}'")
+ if (NOT ${_pkg_is_silent})
+ message(STATUS "checking for one of the modules '${_pkg_modules_alt}'")
+ endif (NOT ${_pkg_is_silent})
# iterate through all modules and stop at the first working one.
foreach(_pkg_alt ${_pkg_modules_alt})
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 499ae77..b437e6b 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -36,7 +36,7 @@ FIND_LIBRARY(ZLIB_LIBRARY
)
MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-IF (ZLIB_INCLUDE_DIR)
+IF (ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
FILE(READ "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H)
STRING(REGEX REPLACE ".*#define ZLIB_VERSION \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\".*" "\\1.\\2.\\3" ZLIB_VERSION_STRING "${ZLIB_H}")
ENDIF()
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 05c6625..85c6568 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -723,10 +723,13 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
- # parse definitions from cxxflags; drop -D* from CXXFLAGS and the -D prefix
+ # parse definitions from cxxflags;
+ # drop -D* from CXXFLAGS and the -D prefix
STRING(REGEX MATCHALL "-D[^;]+"
wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}")
- STRING(REGEX REPLACE "-D[^;]+;" ""
+ STRING(REGEX REPLACE "-D[^;]+(;|$)" ""
+ wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
+ STRING(REGEX REPLACE ";$" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
STRING(REPLACE "-D" ""
wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index e369ac1..7463c62 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -23,19 +23,15 @@ ENDIF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
SET(CMAKE_COMPILER_2005 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 9")
- SET(CMAKE_COMPILER_2005 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 9")
-
# make sure to enable languages after setting configuration types
ENABLE_LANGUAGE(RC)
SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
-# for nmake we need to compute some information about the compiler
+# for nmake we need to compute some information about the compiler
# that is being used.
# the compiler may be free command line, 6, 7, or 71, and
-# each have properties that must be determined.
+# each have properties that must be determined.
# to avoid running these tests with each cmake run, the
# test results are saved in CMakeCPlatform.cmake, a file
# that is automatically copied into try_compile directories
@@ -87,25 +83,12 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(MSVC80 1)
SET(CMAKE_COMPILER_2005 1)
ENDIF("${compilerVersion}" EQUAL 1400)
- IF("${compilerVersion}" GREATER 1400)
- SET(MSVC80 1)
- SET(CMAKE_COMPILER_2005 1)
- ENDIF("${compilerVersion}" GREATER 1400)
- IF("${compilerVersion}" GREATER 1400)
- SET(MSVC80 1)
- SET(CMAKE_COMPILER_2005 1)
- ENDIF("${compilerVersion}" GREATER 1400)
IF("${compilerVersion}" EQUAL 1500)
SET(MSVC90 1)
- SET(MSVC80 0)
ENDIF("${compilerVersion}" EQUAL 1500)
- IF("${compilerVersion}" GREATER 1500)
- SET(MSVC90 1)
- SET(MSVC80 0)
- ENDIF("${compilerVersion}" GREATER 1500)
IF("${compilerVersion}" EQUAL 1600)
SET(MSVC10 1)
- ENDIF()
+ ENDIF("${compilerVersion}" EQUAL 1600)
SET(MSVC_VERSION "${compilerVersion}")
ELSE(NOT CMAKE_COMPILER_RETURN)
MESSAGE(STATUS "Check for CL compiler version - failed")
@@ -224,7 +207,7 @@ ENDIF(NOT _MACHINE_ARCH_FLAG)
SET (CMAKE_EXE_LINKER_FLAGS_INIT
"${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
-# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp
+# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
# on versions that support it
SET( MSVC_INCREMENTAL_YES_FLAG "")
IF(NOT MSVC_INCREMENTAL_DEFAULT)
@@ -256,7 +239,6 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELW
SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
-
# save computed information for this platform
IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
@@ -267,4 +249,3 @@ IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE)
ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
-
diff --git a/Modules/Platform/Windows-cl.cmake.in b/Modules/Platform/Windows-cl.cmake.in
index 1a889f2..82a0e59 100644
--- a/Modules/Platform/Windows-cl.cmake.in
+++ b/Modules/Platform/Windows-cl.cmake.in
@@ -8,6 +8,7 @@ SET(MSVC70 @MSVC70@)
SET(MSVC71 @MSVC71@)
SET(MSVC80 @MSVC80@)
SET(MSVC90 @MSVC90@)
+SET(MSVC10 @MSVC10@)
SET(MSVC_IDE @MSVC_IDE@)
SET(MSVC_VERSION @MSVC_VERSION@)
SET(WIN32 1)
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index baa0571..63a0919 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -65,11 +65,12 @@ SET(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
SET(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE)
SET(QT_QTWEBKIT_MODULE_DEPENDS QTXMLPATTERNS QTGUI QTCORE)
SET(QT_QTDECLARATIVE_MODULE_DEPENDS QTWEBKIT QTSCRIPT QTSVG QTSQL QTXMLPATTERNS QTXML QTOPENGL QTGUI QTNETWORK QTCORE)
+SET(QT_QTMULTIMEDIA_MODULE_DEPENDS QTGUI QTCORE)
# Qt modules (in order of dependence)
FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
- QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP
- QTWEBKIT PHONON QTSCRIPTTOOLS QTGUI QTTEST QTDBUS QTXML QTSQL
+ QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP
+ QTWEBKIT PHONON QTSCRIPTTOOLS QTMULTIMEDIA QTGUI QTTEST QTDBUS QTXML QTSQL
QTXMLPATTERNS QTNETWORK QTCORE)
IF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index 55b8d5b..36302df 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -292,7 +292,7 @@ private:
if(this->EmailRegex.find(this->Rev.Author))
{
this->Rev.Author = this->EmailRegex.match(1);
- //email = email_regex.match(2);
+ this->Rev.EMail = this->EmailRegex.match(2);
}
}
else if(strcmp(name, "timestamp") == 0 && !this->CData.empty())
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index a125459..bc02fbc 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -551,6 +551,7 @@ class cmCTestBuildHandler::FragmentCompare
{
public:
FragmentCompare(cmFileTimeComparison* ftc): FTC(ftc) {}
+ FragmentCompare(): FTC(0) {}
bool operator()(std::string const& l, std::string const& r)
{
// Order files by modification time. Use lexicographic order
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 172e1c4..da5aed0 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -582,16 +582,18 @@ int cmCTestCoverageHandler::ProcessHandler()
for(std::set<std::string>::iterator i = uncovered.begin();
i != uncovered.end(); ++i)
{
- std::string shortFileName = this->CTest->GetShortPathToFile(i->c_str());
- covLogFile << "\t<File Name=\"" << cmXMLSafe(i->c_str())
- << "\" FullPath=\"" << cmXMLSafe(shortFileName) << "\">\n"
+ std::string fileName = cmSystemTools::GetFilenameName(*i);
+ std::string fullPath = cont.SourceDir + "/" + *i;
+
+ covLogFile << "\t<File Name=\"" << cmXMLSafe(fileName)
+ << "\" FullPath=\"" << cmXMLSafe(*i) << "\">\n"
<< "\t\t<Report>" << std::endl;
- std::ifstream ifs(i->c_str());
+ std::ifstream ifs(fullPath.c_str());
if (!ifs)
{
cmOStringStream ostr;
- ostr << "Cannot open source file: " << i->c_str();
+ ostr << "Cannot open source file: " << fullPath.c_str();
errorsWhileAccumulating.push_back(ostr.str());
error ++;
continue;
@@ -609,14 +611,14 @@ int cmCTestCoverageHandler::ProcessHandler()
covLogFile << "\t\t</Report>\n\t</File>" << std::endl;
total_untested += untested;
- covSumFile << "\t<File Name=\"" << cmXMLSafe(i->c_str())
- << "\" FullPath=\"" << cmXMLSafe(shortFileName.c_str())
+ covSumFile << "\t<File Name=\"" << cmXMLSafe(fileName)
+ << "\" FullPath=\"" << cmXMLSafe(i->c_str())
<< "\" Covered=\"true\">\n"
<< "\t\t<LOCTested>0</LOCTested>\n"
<< "\t\t<LOCUnTested>" << untested << "</LOCUnTested>\n"
<< "\t\t<PercentCoverage>0</PercentCoverage>\n"
<< "\t\t<CoverageMetric>0</CoverageMetric>\n";
- this->WriteXMLLabels(covSumFile, shortFileName);
+ this->WriteXMLLabels(covSumFile, *i);
covSumFile << "\t</File>" << std::endl;
}
@@ -626,7 +628,7 @@ int cmCTestCoverageHandler::ProcessHandler()
{
cmCTestLog(this->CTest, ERROR_MESSAGE, std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Error(s) while acumulating results:" << std::endl);
+ "Error(s) while accumulating results:" << std::endl);
std::vector<std::string>::iterator erIt;
for ( erIt = errorsWhileAccumulating.begin();
erIt != errorsWhileAccumulating.end();
@@ -2026,10 +2028,15 @@ std::set<std::string> cmCTestCoverageHandler::FindUncoveredFiles(
cmsys::Glob gl;
gl.RecurseOn();
gl.RecurseThroughSymlinksOff();
- std::string glob = cont->BinaryDir + "/" + *i;
+ std::string glob = cont->SourceDir + "/" + *i;
gl.FindFiles(glob);
std::vector<std::string> files = gl.GetFiles();
- extraMatches.insert(files.begin(), files.end());
+ for(std::vector<std::string>::iterator f = files.begin();
+ f != files.end(); ++f)
+ {
+ extraMatches.insert(this->CTest->GetShortPathToFile(
+ f->c_str()));
+ }
}
if(extraMatches.size())
@@ -2037,7 +2044,9 @@ std::set<std::string> cmCTestCoverageHandler::FindUncoveredFiles(
for(cmCTestCoverageHandlerContainer::TotalCoverageMap::iterator i =
cont->TotalCoverage.begin(); i != cont->TotalCoverage.end(); ++i)
{
- extraMatches.erase(i->first);
+ std::string shortPath = this->CTest->GetShortPathToFile(
+ i->first.c_str());
+ extraMatches.erase(shortPath);
}
}
return extraMatches;
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 6d5bf65..156a938 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -87,9 +87,11 @@ void cmCTestGIT::NoteNewRevision()
//----------------------------------------------------------------------------
bool cmCTestGIT::UpdateImpl()
{
+ const char* git = this->CommandLineTool.c_str();
+
// Use "git pull" to update the working tree.
std::vector<char const*> git_pull;
- git_pull.push_back(this->CommandLineTool.c_str());
+ git_pull.push_back(git);
git_pull.push_back("pull");
// TODO: if(this->CTest->GetTestModel() == cmCTest::NIGHTLY)
@@ -112,7 +114,14 @@ bool cmCTestGIT::UpdateImpl()
OutputLogger out(this->Log, "pull-out> ");
OutputLogger err(this->Log, "pull-err> ");
- return this->RunUpdateCommand(&git_pull[0], &out, &err);
+ if(this->RunUpdateCommand(&git_pull[0], &out, &err))
+ {
+ char const* git_submodule[] = {git, "submodule", "update", 0};
+ OutputLogger out2(this->Log, "submodule-out> ");
+ OutputLogger err2(this->Log, "submodule-err> ");
+ return this->RunChild(git_submodule, &out, &err);
+ }
+ return false;
}
//----------------------------------------------------------------------------
@@ -338,6 +347,7 @@ private:
Person author;
this->ParsePerson(this->Line.c_str()+7, author);
this->Rev.Author = author.Name;
+ this->Rev.EMail = author.EMail;
// Convert the time to a human-readable format that is also easy
// to machine-parse: "CCYY-MM-DD hh:mm:ss".
diff --git a/Source/CTest/cmCTestGIT.h b/Source/CTest/cmCTestGIT.h
index 2561ed4..0b6ad2e 100644
--- a/Source/CTest/cmCTestGIT.h
+++ b/Source/CTest/cmCTestGIT.h
@@ -35,6 +35,7 @@ private:
void LoadRevisions();
void LoadModifications();
+public: // needed by older Sun compilers
// Parsing helper classes.
class OneLineParser;
class DiffParser;
diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx
index b263677..86a7617 100644
--- a/Source/CTest/cmCTestHG.cxx
+++ b/Source/CTest/cmCTestHG.cxx
@@ -220,7 +220,7 @@ private:
}
else if ( strcmp(name, "email") == 0 && !this->CData.empty())
{
- // this->Rev.Email.assign(&this->CData[0], this->CData.size());
+ this->Rev.EMail.assign(&this->CData[0], this->CData.size());
}
else if(strcmp(name, "date") == 0 && !this->CData.empty())
{
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index f87b37c..9eae3f3 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -306,6 +306,7 @@ int cmCTestUpdateHandler::ProcessHandler()
}
if(!updated)
{
+ os << "Update command failed:\n" << vc->GetUpdateCommandLine();
cmCTestLog(this->CTest, ERROR_MESSAGE, " Update command failed: "
<< vc->GetUpdateCommandLine() << "\n");
}
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx
index 35f567a..f9ad79a 100644
--- a/Source/CTest/cmCTestVC.cxx
+++ b/Source/CTest/cmCTestVC.cxx
@@ -227,6 +227,7 @@ void cmCTestVC::WriteXMLEntry(std::ostream& xml,
<< "\t\t\t<FullName>" << cmXMLSafe(full) << "</FullName>\n"
<< "\t\t\t<CheckinDate>" << cmXMLSafe(rev.Date) << "</CheckinDate>\n"
<< "\t\t\t<Author>" << cmXMLSafe(rev.Author) << "</Author>\n"
+ << "\t\t\t<Email>" << cmXMLSafe(rev.EMail) << "</Email>\n"
<< "\t\t\t<Log>" << cmXMLSafe(rev.Log) << "</Log>\n"
<< "\t\t\t<Revision>" << cmXMLSafe(rev.Rev) << "</Revision>\n"
<< "\t\t\t<PriorRevision>" << cmXMLSafe(prior) << "</PriorRevision>\n"
diff --git a/Source/CTest/cmCTestVC.h b/Source/CTest/cmCTestVC.h
index e6ea76d..d36bc8f 100644
--- a/Source/CTest/cmCTestVC.h
+++ b/Source/CTest/cmCTestVC.h
@@ -73,6 +73,7 @@ protected:
std::string Rev;
std::string Date;
std::string Author;
+ std::string EMail;
std::string Log;
};
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index e613a78..fc61709 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -11,7 +11,6 @@
============================================================================*/
#include "QCMake.h" // include to disable MS warnings
#include <QApplication>
-#include <QFileInfo>
#include <QDir>
#include <QTranslator>
#include <QLocale>
@@ -21,6 +20,7 @@
#include "cmake.h"
#include "cmVersion.h"
#include <cmsys/CommandLineArguments.hxx>
+#include <cmsys/SystemTools.hxx>
//----------------------------------------------------------------------------
static const char * cmDocumentationName[][3] =
@@ -164,16 +164,19 @@ int main(int argc, char** argv)
QStringList args = app.arguments();
if(args.count() == 2)
{
- QFileInfo buildFileInfo(args[1], "CMakeCache.txt");
- QFileInfo srcFileInfo(args[1], "CMakeLists.txt");
- if(buildFileInfo.exists())
+ cmsys_stl::string filePath = cmSystemTools::CollapseFullPath("..");
+ cmsys_stl::string buildFilePath =
+ cmSystemTools::CollapseFullPath("CMakeCache.txt", filePath.c_str());
+ cmsys_stl::string srcFilePath =
+ cmSystemTools::CollapseFullPath("CMakeLists.txt", filePath.c_str());
+ if(cmSystemTools::FileExists(buildFilePath.c_str()))
{
- dialog.setBinaryDirectory(buildFileInfo.absolutePath());
+ dialog.setBinaryDirectory(filePath.c_str());
}
- else if(srcFileInfo.exists())
+ else if(cmSystemTools::FileExists(srcFilePath.c_str()))
{
- dialog.setSourceDirectory(srcFileInfo.absolutePath());
- dialog.setBinaryDirectory(QDir::currentPath());
+ dialog.setSourceDirectory(filePath.c_str());
+ dialog.setBinaryDirectory(cmSystemTools::CollapseFullPath(".").c_str());
}
}
}
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index eb82f2a..74a3d35 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -81,11 +81,8 @@ CMakeSetupDialog::CMakeSetupDialog()
this->Splitter->restoreState(p);
bool groupView = settings.value("GroupView", false).toBool();
- if(groupView)
- {
- this->setViewType(2);
- this->ViewType->setCurrentIndex(2);
- }
+ this->setGroupedView(groupView);
+ this->groupedCheck->setCheckState(groupView ? Qt::Checked : Qt::Unchecked);
QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache"));
@@ -217,8 +214,10 @@ void CMakeSetupDialog::initialize()
SIGNAL(outputMessage(QString)),
this, SLOT(message(QString)));
- QObject::connect(this->ViewType, SIGNAL(currentIndexChanged(int)),
- this, SLOT(setViewType(int)));
+ QObject::connect(this->groupedCheck, SIGNAL(toggled(bool)),
+ this, SLOT(setGroupedView(bool)));
+ QObject::connect(this->advancedCheck, SIGNAL(toggled(bool)),
+ this, SLOT(setAdvancedView(bool)));
QObject::connect(this->Search, SIGNAL(textChanged(QString)),
this, SLOT(setSearchFilter(QString)));
@@ -950,33 +949,22 @@ void CMakeSetupDialog::setDebugOutput(bool flag)
"setDebugOutput", Qt::QueuedConnection, Q_ARG(bool, flag));
}
-void CMakeSetupDialog::setViewType(int v)
+void CMakeSetupDialog::setGroupedView(bool v)
{
- if(v == 0) // simple view
- {
- this->CacheValues->cacheModel()->setViewType(QCMakeCacheModel::FlatView);
- this->CacheValues->setRootIsDecorated(false);
- this->CacheValues->setShowAdvanced(false);
- }
- else if(v == 1) // advanced view
- {
- this->CacheValues->cacheModel()->setViewType(QCMakeCacheModel::FlatView);
- this->CacheValues->setRootIsDecorated(false);
- this->CacheValues->setShowAdvanced(true);
- }
- else if(v == 2) // grouped view
- {
- this->CacheValues->cacheModel()->setViewType(QCMakeCacheModel::GroupView);
- this->CacheValues->setRootIsDecorated(true);
- this->CacheValues->setShowAdvanced(true);
- }
+ this->CacheValues->cacheModel()->setViewType(v ? QCMakeCacheModel::GroupView : QCMakeCacheModel::FlatView);
+ this->CacheValues->setRootIsDecorated(v);
QSettings settings;
settings.beginGroup("Settings/StartPath");
- settings.setValue("GroupView", v == 2);
+ settings.setValue("GroupView", v);
}
+void CMakeSetupDialog::setAdvancedView(bool v)
+{
+ this->CacheValues->setShowAdvanced(v);
+}
+
void CMakeSetupDialog::showUserChanges()
{
QSet<QCMakeProperty> changes =
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index de7922a..0e3caec 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -70,7 +70,8 @@ protected slots:
void addCacheEntry();
void startSearch();
void setDebugOutput(bool);
- void setViewType(int);
+ void setAdvancedView(bool);
+ void setGroupedView(bool);
void showUserChanges();
void setSearchFilter(const QString& str);
diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui
index ae0dca2..dc8ee3f 100644
--- a/Source/QtDialog/CMakeSetupDialog.ui
+++ b/Source/QtDialog/CMakeSetupDialog.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>CMakeSetupDialog</class>
- <widget class="QWidget" name="CMakeSetupDialog" >
- <property name="geometry" >
+ <widget class="QWidget" name="CMakeSetupDialog">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,115 +10,111 @@
<height>582</height>
</rect>
</property>
- <layout class="QGridLayout" >
- <property name="margin" >
+ <layout class="QGridLayout">
+ <property name="margin">
<number>9</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>6</number>
</property>
- <item row="0" column="0" >
- <layout class="QGridLayout" >
- <property name="margin" >
+ <item row="0" column="0">
+ <layout class="QGridLayout">
+ <property name="margin">
<number>0</number>
</property>
- <property name="spacing" >
+ <property name="spacing">
<number>6</number>
</property>
- <item row="0" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Where is the source code:</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="SourceDirectory" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="SourceDirectory"/>
</item>
- <item row="0" column="2" >
- <widget class="QPushButton" name="BrowseSourceDirectoryButton" >
- <property name="text" >
+ <item row="0" column="2">
+ <widget class="QPushButton" name="BrowseSourceDirectoryButton">
+ <property name="text">
<string>Browse &amp;Source...</string>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
<string>Where to build the binaries:</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QComboBox" name="BinaryDirectory" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Ignored" >
+ <item row="1" column="1">
+ <widget class="QComboBox" name="BinaryDirectory">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="editable" >
+ <property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
- <item row="1" column="2" >
- <widget class="QPushButton" name="BrowseBinaryDirectoryButton" >
- <property name="text" >
+ <item row="1" column="2">
+ <widget class="QPushButton" name="BrowseBinaryDirectoryButton">
+ <property name="text">
<string>Browse &amp;Build...</string>
</property>
</widget>
</item>
</layout>
</item>
- <item row="1" column="0" >
- <widget class="QSplitter" name="Splitter" >
- <property name="orientation" >
+ <item row="1" column="0">
+ <widget class="QSplitter" name="Splitter">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <widget class="QFrame" name="frame" >
- <property name="frameShape" >
+ <widget class="QFrame" name="frame">
+ <property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
- <property name="frameShadow" >
+ <property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <widget class="QLabel" name="label_4" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
+ <widget class="QLabel" name="label_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string>Search:</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="Search" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
+ <widget class="QLineEdit" name="Search">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -125,33 +122,14 @@
</widget>
</item>
<item>
- <widget class="QComboBox" name="ViewType" >
- <item>
- <property name="text" >
- <string>Simple View</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Advanced View</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Grouped View</string>
- </property>
- </item>
- </widget>
- </item>
- <item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>23</height>
@@ -160,33 +138,49 @@
</spacer>
</item>
<item>
- <widget class="QToolButton" name="AddEntry" >
- <property name="toolTip" >
+ <widget class="QCheckBox" name="groupedCheck">
+ <property name="text">
+ <string>Grouped</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="advancedCheck">
+ <property name="text">
+ <string>Advanced</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="AddEntry">
+ <property name="toolTip">
<string>Add New Entry</string>
</property>
- <property name="text" >
+ <property name="text">
<string>&amp;Add Entry</string>
</property>
- <property name="icon" >
- <iconset resource="CMakeSetup.qrc" >:/Icons/Plus16.png</iconset>
+ <property name="icon">
+ <iconset resource="CMakeSetup.qrc">
+ <normaloff>:/Icons/Plus16.png</normaloff>:/Icons/Plus16.png</iconset>
</property>
- <property name="toolButtonStyle" >
+ <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
- <widget class="QToolButton" name="RemoveEntry" >
- <property name="toolTip" >
+ <widget class="QToolButton" name="RemoveEntry">
+ <property name="toolTip">
<string>Remove Selected Entries</string>
</property>
- <property name="text" >
+ <property name="text">
<string>&amp;Remove Entry</string>
</property>
- <property name="icon" >
- <iconset resource="CMakeSetup.qrc" >:/Icons/Delete16.png</iconset>
+ <property name="icon">
+ <iconset resource="CMakeSetup.qrc">
+ <normaloff>:/Icons/Delete16.png</normaloff>:/Icons/Delete16.png</iconset>
</property>
- <property name="toolButtonStyle" >
+ <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
@@ -194,69 +188,69 @@
</layout>
</item>
<item>
- <widget class="QCMakeCacheView" name="CacheValues" >
- <property name="alternatingRowColors" >
+ <widget class="QCMakeCacheView" name="CacheValues">
+ <property name="alternatingRowColors">
<bool>true</bool>
</property>
- <property name="selectionMode" >
+ <property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
- <property name="selectionBehavior" >
+ <property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_3" >
- <property name="text" >
+ <widget class="QLabel" name="label_3">
+ <property name="text">
<string>Press Configure to update and display new values in red, then press Generate to generate selected build files.</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
+ <layout class="QHBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <widget class="QPushButton" name="ConfigureButton" >
- <property name="text" >
+ <widget class="QPushButton" name="ConfigureButton">
+ <property name="text">
<string>&amp;Configure</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="GenerateButton" >
- <property name="text" >
+ <widget class="QPushButton" name="GenerateButton">
+ <property name="text">
<string>&amp;Generate</string>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="Generator" >
- <property name="text" >
+ <widget class="QLabel" name="Generator">
+ <property name="text">
<string>Current Generator:</string>
</property>
</widget>
</item>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>121</width>
<height>27</height>
@@ -265,23 +259,23 @@
</spacer>
</item>
<item>
- <widget class="QProgressBar" name="ProgressBar" >
- <property name="minimum" >
+ <widget class="QProgressBar" name="ProgressBar">
+ <property name="minimum">
<number>0</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>100</number>
</property>
- <property name="value" >
+ <property name="value">
<number>0</number>
</property>
- <property name="textVisible" >
+ <property name="textVisible">
<bool>false</bool>
</property>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="textDirection" >
+ <property name="textDirection">
<enum>QProgressBar::BottomToTop</enum>
</property>
</widget>
@@ -290,11 +284,11 @@
</item>
</layout>
</widget>
- <widget class="QTextEdit" name="Output" >
- <property name="lineWrapMode" >
+ <widget class="QTextEdit" name="Output">
+ <property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
- <property name="readOnly" >
+ <property name="readOnly">
<bool>true</bool>
</property>
</widget>
@@ -310,7 +304,7 @@
</customwidget>
</customwidgets>
<resources>
- <include location="CMakeSetup.qrc" />
+ <include location="CMakeSetup.qrc"/>
</resources>
<connections/>
</ui>
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 9236ad572..1cabed2 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1326,10 +1326,8 @@ void cmComputeLinkInformation::AddFrameworkItem(std::string const& item)
//----------------------------------------------------------------------------
void cmComputeLinkInformation::AddDirectoryItem(std::string const& item)
{
- std::string systemName =
- this->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME");
- if(systemName == "Darwin" && cmSystemTools::IsPathToFramework(item.c_str()))
- if(cmSystemTools::IsPathToFramework(item.c_str()))
+ if(this->Makefile->IsOn("APPLE")
+ && cmSystemTools::IsPathToFramework(item.c_str()))
{
this->AddFrameworkItem(item);
}
diff --git a/Source/cmData.h b/Source/cmData.h
deleted file mode 100644
index 3ae32f5..0000000
--- a/Source/cmData.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*============================================================================
- CMake - Cross Platform Makefile Generator
- Copyright 2000-2009 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 cmData_h
-#define cmData_h
-
-#include "cmStandardIncludes.h"
-
-/** \class cmData
- * \brief Hold extra data on a cmMakefile instance for a command.
- *
- * When CMake commands need to store extra information in a cmMakefile
- * instance, but the information is not needed by the makefile generators,
- * it can be held in a subclass of cmData. The cmMakefile class has a map
- * from std::string to cmData*. On its destruction, it destroys all the
- * extra data through the virtual destructor of cmData.
- */
-class cmData
-{
-public:
- cmData(const char* name): Name(name) {}
- virtual ~cmData() {}
-
- const std::string& GetName() const
- { return this->Name; }
-protected:
- std::string Name;
-};
-
-#endif
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 883a757..e77119f 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -608,7 +608,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"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 "
+ "modified by the project, use CMAKE_LIBRARY_PATH for this. See "
"also CMAKE_SYSTEM_PREFIX_PATH.", false,
"Variables That Change Behavior");
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 1dfc784..bfe11c1 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -606,20 +606,22 @@ bool cmDocumentation::CreateSingleModule(const char* fname,
}
else
{
- if(text.length() < 2 && brief.length() == 1)
- {
- return false;
- }
- char* pname = strcpy(new char[strlen(moduleName)+1], moduleName);
- char* ptext = strcpy(new char[text.length()+1], text.c_str());
- this->ModuleStrings.push_back(pname);
- this->ModuleStrings.push_back(ptext);
- char* pbrief = strcpy(new char[brief.length()+1], brief.c_str());
- this->ModuleStrings.push_back(pbrief);
- moduleSection.Append(pname, pbrief, ptext);
- return true;
+ break;
}
}
+
+ if(text.length() < 2 && brief.length() == 1)
+ {
+ return false;
+ }
+
+ char* pname = strcpy(new char[strlen(moduleName)+1], moduleName);
+ char* ptext = strcpy(new char[text.length()+1], text.c_str());
+ this->ModuleStrings.push_back(pname);
+ this->ModuleStrings.push_back(ptext);
+ char* pbrief = strcpy(new char[brief.length()+1], brief.c_str());
+ this->ModuleStrings.push_back(pbrief);
+ moduleSection.Append(pname, pbrief, ptext);
return true;
}
diff --git a/Source/cmDocumentationFormatterText.cxx b/Source/cmDocumentationFormatterText.cxx
index 078b890..0b04b73 100644
--- a/Source/cmDocumentationFormatterText.cxx
+++ b/Source/cmDocumentationFormatterText.cxx
@@ -96,7 +96,7 @@ void cmDocumentationFormatterText::PrintColumn(std::ostream& os,
{
// Print text arranged in an indented column of fixed witdh.
const char* l = text;
- int column = 0;
+ long column = 0;
bool newSentence = false;
bool firstLine = true;
int width = this->TextWidth - static_cast<int>(strlen(this->TextIndent));
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 763fdd8..147f6ac 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -687,7 +687,7 @@ cmELFInternalImpl<Types>::GetDynamicSectionString(int tag)
// The value has been read successfully. Report it.
se.Position = static_cast<unsigned long>(strtab.sh_offset + first);
se.Size = last - first;
- se.IndexInSection = di - this->DynamicSectionEntries.begin();
+ se.IndexInSection = static_cast<int>(di - this->DynamicSectionEntries.begin());
return &se;
}
}
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index f4c0064..f352172 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -423,3 +423,17 @@ void cmFindCommon::AddTrailingSlashes(std::vector<std::string>& paths)
}
}
}
+
+//----------------------------------------------------------------------------
+void cmFindCommon::SetMakefile(cmMakefile* makefile)
+{
+ cmCommand::SetMakefile(makefile);
+
+ // If we are building for Apple (OSX or also iphone), make sure
+ // that frameworks and bundles are searched first.
+ if(this->Makefile->IsOn("APPLE"))
+ {
+ this->SearchFrameworkFirst = true;
+ this->SearchAppBundleFirst = true;
+ }
+}
diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h
index 08d2158..2ffbd00 100644
--- a/Source/cmFindCommon.h
+++ b/Source/cmFindCommon.h
@@ -61,6 +61,8 @@ protected:
PathType pathType);
void AddPathInternal(std::string const& in_path, PathType pathType);
+ void SetMakefile(cmMakefile* makefile);
+
bool NoDefaultPath;
bool NoCMakePath;
bool NoCMakeEnvironmentPath;
diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h
index c85b296..aff4d7e 100644
--- a/Source/cmGetFilenameComponentCommand.h
+++ b/Source/cmGetFilenameComponentCommand.h
@@ -62,10 +62,10 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " get_filename_component(VarName FileName\n"
+ " get_filename_component(<VAR> FileName\n"
" PATH|ABSOLUTE|NAME|EXT|NAME_WE|REALPATH\n"
" [CACHE])\n"
- "Set VarName to be the path (PATH), file name (NAME), file "
+ "Set <VAR> to be the path (PATH), file name (NAME), file "
"extension (EXT), file name without extension (NAME_WE) of FileName, "
"the full path (ABSOLUTE), or the full path with all symlinks "
"resolved (REALPATH). "
@@ -73,14 +73,14 @@ public:
"trailing slashes. The longest file extension is always considered. "
"If the optional CACHE argument is specified, the result variable is "
"added to the cache.\n"
- " get_filename_component(VarName FileName\n"
- " PROGRAM [PROGRAM_ARGS ArgVar]\n"
+ " get_filename_component(<VAR> FileName\n"
+ " PROGRAM [PROGRAM_ARGS <ARG_VAR>]\n"
" [CACHE])\n"
"The program in FileName will be found in the system search path or "
"left as a full path. If PROGRAM_ARGS is present with PROGRAM, then "
"any command-line arguments present in the FileName string are split "
- "from the program name and stored in ArgVar. This is used to separate "
- "a program name from its arguments in a command line string.";
+ "from the program name and stored in <ARG_VAR>. This is used to "
+ "separate a program name from its arguments in a command line string.";
}
cmTypeMacro(cmGetFilenameComponentCommand, cmCommand);
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index d608aac..1191575 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -37,6 +37,7 @@ cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator()
void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf)
{
this->cmGlobalVisualStudio7Generator::AddPlatformDefinitions(mf);
+ mf->RemoveDefinition("MSVC70");
mf->AddDefinition("MSVC71", "1");
}
diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h
index d14d564..5269041 100644
--- a/Source/cmIncludeExternalMSProjectCommand.h
+++ b/Source/cmIncludeExternalMSProjectCommand.h
@@ -62,9 +62,8 @@ public:
" dep1 dep2 ...)\n"
"Includes an external Microsoft project in the generated workspace "
"file. Currently does nothing on UNIX. This will create a "
- "target named INCLUDE_EXTERNAL_MSPROJECT_[projectname]. This can "
- "be used in the add_dependencies command to make things depend "
- "on the external project.";
+ "target named [projectname]. This can be used in the add_dependencies "
+ "command to make things depend on the external project.";
}
cmTypeMacro(cmIncludeExternalMSProjectCommand, cmCommand);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 851e34f..fd3508e 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -712,9 +712,7 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target)
std::string langFlags;
this->AddLanguageFlags(langFlags, llang, 0);
-#ifdef __APPLE__
this->AddArchitectureFlags(langFlags, &target, llang, 0);
-#endif /* __APPLE__ */
vars.LanguageCompileFlags = langFlags.c_str();
cmCustomCommandLines commandLines;
@@ -1272,8 +1270,8 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
#endif
for(i = includes.begin(); i != includes.end(); ++i)
{
-#ifdef __APPLE__
- if(cmSystemTools::IsPathToFramework(i->c_str()))
+ if(this->Makefile->IsOn("APPLE")
+ && cmSystemTools::IsPathToFramework(i->c_str()))
{
std::string frameworkDir = *i;
frameworkDir += "/../";
@@ -1288,7 +1286,7 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
}
continue;
}
-#endif
+
std::string include = *i;
if(!flagUsed || repeatFlag)
{
@@ -1766,12 +1764,17 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
//----------------------------------------------------------------------------
-#ifdef __APPLE__
void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
cmTarget* target,
const char *lang,
const char* config)
{
+ // Only add Mac OS X specific flags on Darwin platforms (OSX and iphone):
+ if(!this->Makefile->IsOn("APPLE"))
+ {
+ return;
+ }
+
if(this->EmitUniversalBinaryFlags)
{
std::vector<std::string> archs;
@@ -1828,7 +1831,6 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
}
}
}
-#endif /* __APPLE__ */
//----------------------------------------------------------------------------
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index becdfff..4c2fc22 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -133,10 +133,8 @@ public:
std::vector<cmLocalGenerator*>& GetChildren() { return this->Children; };
-#ifdef __APPLE__
void AddArchitectureFlags(std::string& flags, cmTarget* target,
const char *lang, const char* config);
-#endif /* __APPLE__ */
void AddLanguageFlags(std::string& flags, const char* lang,
const char* config);
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 2cf840d..89bfd05 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1420,7 +1420,7 @@ void cmLocalVisualStudio6Generator
outputNameDebug.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELEASE",
outputNameRelease.c_str());
- cmSystemTools::ReplaceString(line, "OUTPUT_NAME_MINSIZEREL",
+ cmSystemTools::ReplaceString(line, "OUTPUT_NAME_MINSIZEREL",
outputNameMinSizeRel.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELWITHDEBINFO",
outputNameRelWithDebInfo.c_str());
@@ -1431,7 +1431,7 @@ void cmLocalVisualStudio6Generator
optionsDebug.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELEASE",
optionsRelease.c_str());
- cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_MINSIZEREL",
+ cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_MINSIZEREL",
optionsMinSizeRel.c_str());
cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO",
optionsRelWithDebInfo.c_str());
@@ -1619,7 +1619,7 @@ void cmLocalVisualStudio6Generator
// There are not separate CXX and C template files, so we use the same
// variable names. The previous code sets up flags* variables to contain
// the correct C or CXX flags
- cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL",
+ cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL",
flagsMinSize.c_str());
cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG",
flagsDebug.c_str());
@@ -1629,7 +1629,7 @@ void cmLocalVisualStudio6Generator
flagsRelease.c_str());
cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS", flags.c_str());
- cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_MINSIZE",
+ cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_MINSIZEREL",
minsizeDefines.c_str());
cmSystemTools::ReplaceString(line, "COMPILE_DEFINITIONS_DEBUG",
debugDefines.c_str());
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 8249d9e..2d8197c 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -980,7 +980,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
temp = target.GetDirectory(configName);
temp += "/";
temp += targetNamePDB;
- fout << "\t\t\t\tProgramDataBaseFile=\"" <<
+ fout << "\t\t\t\tProgramDatabaseFile=\"" <<
this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
if(isDebug)
{
@@ -1055,7 +1055,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
fout << "\"\n";
std::string path = this->ConvertToXMLOutputPathSingle(
target.GetDirectory(configName).c_str());
- fout << "\t\t\t\tProgramDataBaseFile=\""
+ fout << "\t\t\t\tProgramDatabaseFile=\""
<< path << "/" << targetNamePDB
<< "\"\n";
if(isDebug)
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e51ee65..8eece6b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -124,7 +124,6 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->LocalGenerator = mf.LocalGenerator;
this->FunctionBlockers = mf.FunctionBlockers;
- this->DataMap = mf.DataMap;
this->MacrosMap = mf.MacrosMap;
this->SubDirectoryOrder = mf.SubDirectoryOrder;
this->Properties = mf.Properties;
@@ -200,14 +199,6 @@ cmMakefile::~cmMakefile()
{
delete this->UsedCommands[i];
}
- for(DataMapType::const_iterator d = this->DataMap.begin();
- d != this->DataMap.end(); ++d)
- {
- if(d->second)
- {
- delete d->second;
- }
- }
std::vector<cmFunctionBlocker*>::iterator pos;
for (pos = this->FunctionBlockers.begin();
pos != this->FunctionBlockers.end(); ++pos)
@@ -2591,54 +2582,6 @@ void cmMakefile::SetHomeOutputDirectory(const char* lib)
}
}
-
-/**
- * Register the given cmData instance with its own name.
- */
-void cmMakefile::RegisterData(cmData* data)
-{
- std::string name = data->GetName();
- DataMapType::const_iterator d = this->DataMap.find(name);
- if((d != this->DataMap.end()) && (d->second != 0) && (d->second != data))
- {
- delete d->second;
- }
- this->DataMap[name] = data;
-}
-
-
-/**
- * Register the given cmData instance with the given name. This can be used
- * to register a NULL pointer.
- */
-void cmMakefile::RegisterData(const char* name, cmData* data)
-{
- DataMapType::const_iterator d = this->DataMap.find(name);
- if((d != this->DataMap.end()) && (d->second != 0) && (d->second != data))
- {
- delete d->second;
- }
- this->DataMap[name] = data;
-}
-
-
-/**
- * Lookup a cmData instance previously registered with the given name. If
- * the instance cannot be found, return NULL.
- */
-cmData* cmMakefile::LookupData(const char* name) const
-{
- DataMapType::const_iterator d = this->DataMap.find(name);
- if(d != this->DataMap.end())
- {
- return d->second;
- }
- else
- {
- return 0;
- }
-}
-
//----------------------------------------------------------------------------
cmSourceFile* cmMakefile::GetSource(const char* sourceName)
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 63f81b8..4fae7ee 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -13,7 +13,6 @@
#define cmMakefile_h
#include "cmCacheManager.h"
-#include "cmData.h"
#include "cmExecutionStatus.h"
#include "cmListFileCache.h"
#include "cmPolicies.h"
@@ -692,10 +691,6 @@ public:
std::vector<cmSourceGroup> &groups);
#endif
- void RegisterData(cmData*);
- void RegisterData(const char*, cmData*);
- cmData* LookupData(const char*) const;
-
/**
* Execute a single CMake command. Returns true if the command
* succeeded or false if it failed.
@@ -916,9 +911,6 @@ private:
void PushFunctionBlockerBarrier();
void PopFunctionBlockerBarrier(bool reportError = true);
- typedef std::map<cmStdString, cmData*> DataMapType;
- DataMapType DataMap;
-
typedef std::map<cmStdString, cmStdString> StringStringMap;
StringStringMap MacrosMap;
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index e7c4a7d..93c981a 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -229,10 +229,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// Add language feature flags.
this->AddFeatureFlags(flags, linkLanguage);
-#ifdef __APPLE__
this->LocalGenerator->AddArchitectureFlags(flags, this->Target,
linkLanguage, this->ConfigName);
-#endif /* __APPLE__ */
// Add target-specific linker flags.
this->LocalGenerator->AppendFlags
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index f351174..d3e6e11 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -682,10 +682,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
std::string langFlags;
this->AddFeatureFlags(langFlags, linkLanguage);
-#ifdef __APPLE__
this->LocalGenerator->AddArchitectureFlags(langFlags, this->Target,
linkLanguage, this->ConfigName);
-#endif /* __APPLE__ */
// remove any language flags that might not work with the
// particular os
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index dd45950..ac727ac 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -294,10 +294,8 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
// Add language feature flags.
this->AddFeatureFlags(flags, lang);
-#ifdef __APPLE__
this->LocalGenerator->AddArchitectureFlags(flags, this->Target,
lang, this->ConfigName);
-#endif /* __APPLE__ */
// Fortran-specific flags computed for this target.
if(*l == "Fortran")
@@ -1439,11 +1437,15 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule(const char* main_output,
//----------------------------------------------------------------------------
std::string cmMakefileTargetGenerator::GetFrameworkFlags()
{
-#ifndef __APPLE__
- return std::string();
-#else
- std::set<cmStdString> emitted;
+ if(!this->Makefile->IsOn("APPLE"))
+ {
+ return std::string();
+ }
+
+ std::set<cmStdString> emitted;
+#ifdef __APPLE__ /* don't insert this when crosscompiling e.g. to iphone */
emitted.insert("/System/Library/Frameworks");
+#endif
std::vector<std::string> includes;
this->LocalGenerator->GetIncludeDirectories(includes);
std::vector<std::string>::iterator i;
@@ -1475,7 +1477,6 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags()
}
}
return flags;
-#endif
}
//----------------------------------------------------------------------------
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 5db0200..9b9cb3b 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -45,6 +45,7 @@
// This is a hack to prevent warnings about these functions being
// declared but not referenced.
#if defined(__sgi) && !defined(__GNUC__)
+# pragma set woff 3970 /* conversion from pointer to same-sized */
# include <sys/termios.h>
class cmStandardIncludesHack
{
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index d176987..d914203 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2048,12 +2048,13 @@ bool extract_tar(const char* outFileName, bool verbose,
if (verbose && extract)
{
cmSystemTools::Stdout("x ");
+ cmSystemTools::Stdout(archive_entry_pathname(entry));
}
if(verbose && !extract)
{
list_item_verbose(stdout, entry);
}
- else
+ else if(!extract)
{
cmSystemTools::Stdout(archive_entry_pathname(entry));
}
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4a8e161..9f64473 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -441,6 +441,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
path += this->Name;
path += ".vcxproj.filters";
cmGeneratedFileStream fout(path.c_str());
+ fout.SetCopyIfDifferent(true);
char magic[] = {0xEF,0xBB, 0xBF};
fout.write(magic, 3);
cmGeneratedFileStream* save = this->BuildFileStream;
@@ -484,9 +485,14 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
this->WriteString("</Project>\n", 0);
// restore stream pointer
this->BuildFileStream = save;
+
+ if (fout.Close())
+ {
+ this->GlobalGenerator->FileReplacedDuringGenerate(path);
+ }
}
-void
+void
cmVisualStudio10TargetGenerator::
WriteGroupSources(const char* name,
std::vector<cmSourceFile*> const& sources,
diff --git a/Source/cmWin32ProcessExecution.cxx b/Source/cmWin32ProcessExecution.cxx
index c8b4ae4..d9bd26c 100644
--- a/Source/cmWin32ProcessExecution.cxx
+++ b/Source/cmWin32ProcessExecution.cxx
@@ -22,7 +22,8 @@
#if defined(__BORLANDC__)
# define STRICMP stricmp
# define TO_INTPTR(x) ((long)(x))
-#else // Visual studio
+#endif // Borland
+#if defined(_MSC_VER) // Visual studio
# if ( _MSC_VER >= 1300 )
# include <stddef.h>
# define TO_INTPTR(x) ((intptr_t)(x))
@@ -30,7 +31,12 @@
# define TO_INTPTR(x) ((long)(x))
# endif // Visual studio .NET
# define STRICMP _stricmp
-#endif // Borland
+#endif // Visual Studio
+#if defined(__MINGW32__)
+# include <stdint.h>
+# define TO_INTPTR(x) ((intptr_t)(x))
+# define STRICMP _stricmp
+#endif // MinGW
#define POPEN_1 1
#define POPEN_2 2
diff --git a/Source/kwsys/Configure.h.in b/Source/kwsys/Configure.h.in
index 97b2c5d..15986cf 100644
--- a/Source/kwsys/Configure.h.in
+++ b/Source/kwsys/Configure.h.in
@@ -28,6 +28,10 @@
# if defined(__INTEL_COMPILER)
# pragma warning (disable: 1572) /* floating-point equality test */
# endif
+# if defined(__sgi) && !defined(__GNUC__)
+# pragma set woff 3970 /* pointer to int conversion */
+# pragma set woff 3968 /* 64 bit conversion */
+# endif
#endif
/* Whether kwsys namespace is "kwsys". */
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index b368901..9cb787a 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -2374,7 +2374,7 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
corresponding parsing format string. The parsing format should
have two integers to store: the pid and then the ppid. */
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
- || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
+ || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__)
# define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
# define KWSYSPE_PS_FORMAT "%d %d\n"
#elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 9ab0fdf..afc7240 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -9,6 +9,13 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
+
+#ifdef __osf__
+# define _OSF_SOURCE
+# define _POSIX_C_SOURCE 199506L
+# define _XOPEN_SOURCE_EXTENDED
+#endif
+
#include "kwsysPrivate.h"
#include KWSYS_HEADER(RegularExpression.hxx)
#include KWSYS_HEADER(SystemTools.hxx)
diff --git a/Source/kwsys/hashtable.hxx.in b/Source/kwsys/hashtable.hxx.in
index b36c975..db52fc8 100644
--- a/Source/kwsys/hashtable.hxx.in
+++ b/Source/kwsys/hashtable.hxx.in
@@ -38,6 +38,7 @@
# pragma warn -8027 /* 'for' not inlined. */
# pragma warn -8026 /* 'exception' not inlined. */
#endif
+
#ifndef @KWSYS_NAMESPACE@_hashtable_hxx
#define @KWSYS_NAMESPACE@_hashtable_hxx
@@ -57,6 +58,9 @@
# pragma warning (disable:4786)
# pragma warning (disable:4512) /* no assignment operator for class */
#endif
+#if defined(__sgi) && !defined(__GNUC__)
+# pragma set woff 3970 /* pointer to int conversion */ 3321 3968
+#endif
#if @KWSYS_NAMESPACE@_STL_HAS_ALLOCATOR_TEMPLATE
# define @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(T) @KWSYS_NAMESPACE@_stl::allocator< T >
@@ -388,6 +392,10 @@ struct _Hashtable_const_iterator {
// Note: assumes long is at least 32 bits.
enum { _stl_num_primes = 31 };
+// create a function with a static local to that function that returns
+// the static
+inline const unsigned long* get_stl_prime_list() {
+
static const unsigned long _stl_prime_list[_stl_num_primes] =
{
5ul, 11ul, 23ul,
@@ -399,10 +407,12 @@ static const unsigned long _stl_prime_list[_stl_num_primes] =
1610612741ul, 3221225473ul, 4294967291ul
};
+return &_stl_prime_list[0]; }
+
inline size_t _stl_next_prime(size_t __n)
{
- const unsigned long* __first = _stl_prime_list;
- const unsigned long* __last = _stl_prime_list + (int)_stl_num_primes;
+ const unsigned long* __first = get_stl_prime_list();
+ const unsigned long* __last = get_stl_prime_list() + (int)_stl_num_primes;
const unsigned long* pos = @KWSYS_NAMESPACE@_stl::lower_bound(__first, __last, __n);
return pos == __last ? *(__last - 1) : *pos;
}
@@ -587,7 +597,7 @@ public:
size_type bucket_count() const { return _M_buckets.size(); }
size_type max_bucket_count() const
- { return _stl_prime_list[(int)_stl_num_primes - 1]; }
+ { return get_stl_prime_list()[(int)_stl_num_primes - 1]; }
size_type elems_in_bucket(size_type __bucket) const
{
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 17be0c0..c754cdd 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2010)
# KWSys version date month component. Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 04)
+SET(KWSYS_DATE_STAMP_MONTH 05)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 23)
+SET(KWSYS_DATE_STAMP_DAY 17)
diff --git a/Source/kwsys/testAutoPtr.cxx b/Source/kwsys/testAutoPtr.cxx
index 747d869..ed75ff4 100644
--- a/Source/kwsys/testAutoPtr.cxx
+++ b/Source/kwsys/testAutoPtr.cxx
@@ -25,7 +25,7 @@
#define ASSERT(x,y) if (!(x)) { printf("FAIL: " y "\n"); status = 1; }
-static int instances = 0;
+int instances = 0; // don't declare as static
struct A
{
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 6e3e094..330cf9f 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -159,7 +159,7 @@ IF(BUILD_TESTING)
IF(CTEST_TEST_OSX_ARCH)
ADD_TEST_MACRO(Architecture Architecture)
SET_TESTS_PROPERTIES(Architecture PROPERTIES
- PASS_REGULAR_EXPRESSION "(file is not of required architecture|does not match cputype)")
+ PASS_REGULAR_EXPRESSION "(file is not of required architecture|does not match cputype|not the architecture being linked)")
ENDIF(CTEST_TEST_OSX_ARCH)
LIST(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
@@ -980,6 +980,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
ADD_TEST_MACRO(ModuleDefinition example_exe)
ENDIF(CMAKE_TEST_MSVC)
+ ADD_TEST_MACRO(CheckCompilerRelatedVariables CheckCompilerRelatedVariables)
+
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile")
ADD_TEST(MakeClean ${CMAKE_CTEST_COMMAND}
--build-and-test
@@ -1303,7 +1305,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--output-log "${CMake_BINARY_DIR}/Tests/CTestTestScheduler/testOutput.log"
)
SET_TESTS_PROPERTIES(CTestTestScheduler PROPERTIES
- PASS_REGULAR_EXPRESSION "Start 1.*Start 2.*Start 3.*Start 4.*Start 5.*Start 5.*Start 4.*Start 3.*Start 2.*Start 1")
+ PASS_REGULAR_EXPRESSION "Start 1.*Start 2.*Start 3.*Start 4.*Start 4.*Start 3.*Start 2.*Start 1")
CONFIGURE_FILE(
"${CMake_SOURCE_DIR}/Tests/CTestTestStopTime/test.cmake.in"
diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in
index cccd8c1..f6ec198 100644
--- a/Tests/CTestTest2/test.cmake.in
+++ b/Tests/CTestTest2/test.cmake.in
@@ -15,6 +15,14 @@ SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
+# for unix purify has to be used as a linker, and
+# will not work with ctest. So disable it so
+# that it is not attempted.
+IF(UNIX)
+ IF("${CTEST_MEMORYCHECK_COMMAND}" MATCHES purify)
+ SET(CTEST_MEMORYCHECK_COMMAND)
+ ENDIF()
+ENDIF()
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
diff --git a/Tests/CTestTest3/test.cmake.in b/Tests/CTestTest3/test.cmake.in
index 1cf5a88..1e8ea50 100644
--- a/Tests/CTestTest3/test.cmake.in
+++ b/Tests/CTestTest3/test.cmake.in
@@ -25,6 +25,14 @@ SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
+# for unix purify has to be used as a linker, and
+# will not work with ctest. So disable it so
+# that it is not attempted.
+IF(UNIX)
+ IF("${CTEST_MEMORYCHECK_COMMAND}" MATCHES purify)
+ SET(CTEST_MEMORYCHECK_COMMAND)
+ ENDIF()
+ENDIF()
SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
SET(CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" -q -z3 \"-d:pserver:anoncvs@www.cmake.org:/cvsroot/KWSys\" co -r CTest-Testing-Tag KWSys")
diff --git a/Tests/CTestTestScheduler/CMakeLists.txt b/Tests/CTestTestScheduler/CMakeLists.txt
index 8e7678d..882988f 100644
--- a/Tests/CTestTestScheduler/CMakeLists.txt
+++ b/Tests/CTestTestScheduler/CMakeLists.txt
@@ -4,6 +4,6 @@ INCLUDE (CTest)
ADD_EXECUTABLE (Sleep sleep.c)
-FOREACH (time RANGE 1 5)
+FOREACH (time RANGE 1 4)
ADD_TEST (TestSleep${time} Sleep ${time})
-ENDFOREACH (time RANGE 1 5)
+ENDFOREACH (time RANGE 1 4)
diff --git a/Tests/CTestTestScheduler/sleep.c b/Tests/CTestTestScheduler/sleep.c
index b06776c..9631a68 100644
--- a/Tests/CTestTestScheduler/sleep.c
+++ b/Tests/CTestTestScheduler/sleep.c
@@ -4,13 +4,13 @@
# include <unistd.h>
#endif
-/* sleeps for 2n seconds, where n is the argument to the program */
+/* sleeps for 4n seconds, where n is the argument to the program */
int main(int argc, char** argv)
{
int time;
if(argc > 1)
{
- time = 3 * atoi(argv[1]);
+ time = 4 * atoi(argv[1]);
}
#if defined(_WIN32)
Sleep(time * 1000);
diff --git a/Tests/CTestUpdateBZR.cmake.in b/Tests/CTestUpdateBZR.cmake.in
index eebb4f6..7f90b50 100644
--- a/Tests/CTestUpdateBZR.cmake.in
+++ b/Tests/CTestUpdateBZR.cmake.in
@@ -39,6 +39,9 @@ create_content(import)
run_child(WORKING_DIRECTORY ${TOP}/import
COMMAND ${BZR} init
)
+run_child(WORKING_DIRECTORY ${TOP}/import
+ COMMAND ${BZR} whoami --branch "Test Author <testauthor@cmake.org>"
+ )
run_child(WORKING_DIRECTORY ${TOP}/import
COMMAND ${BZR} add .
@@ -57,6 +60,10 @@ run_child(
WORKING_DIRECTORY ${TOP}
COMMAND ${BZR} branch "${REPO}" user-source
)
+run_child(
+ WORKING_DIRECTORY ${TOP}/user-source
+ COMMAND ${BZR} whoami --branch "Test Author <testauthor@cmake.org>"
+ )
#-----------------------------------------------------------------------------
# Make changes in the working tree.
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index 94c37fe..266f4b3 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -41,8 +41,8 @@ function(check_updates build)
# Compare expected and actual entries
set(EXTRA "${UPDATE_XML_ENTRIES}")
- list(REMOVE_ITEM EXTRA ${ARGN} ${UPDATE_MAYBE})
- set(MISSING "${ARGN}")
+ list(REMOVE_ITEM EXTRA ${ARGN} ${UPDATE_EXTRA} ${UPDATE_MAYBE})
+ set(MISSING "${ARGN}" ${UPDATE_EXTRA})
list(REMOVE_ITEM MISSING ${UPDATE_XML_ENTRIES})
if(NOT UPDATE_NOT_GLOBAL)
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index c721bb4..f0a5770 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -5,6 +5,7 @@
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(TOP "${TOP}/@CTestUpdateGIT_DIR@")
+set(UPDATE_EXTRA Updated{module})
# Include code common to all update tests.
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
@@ -42,6 +43,35 @@ run_child(
file(REMOVE_RECURSE ${TOP}/repo.git/hooks)
set(REPO file://${TOP}/repo.git)
+# Create submodule repository.
+message("Creating submodule...")
+file(MAKE_DIRECTORY ${TOP}/module.git)
+run_child(
+ WORKING_DIRECTORY ${TOP}/module.git
+ COMMAND ${GIT} --bare init
+ )
+file(REMOVE_RECURSE ${TOP}/module.git/hooks)
+set(MOD_REPO file://${TOP}/module.git)
+create_content(module)
+run_child(WORKING_DIRECTORY ${TOP}/module
+ COMMAND ${GIT} init
+ )
+file(REMOVE_RECURSE ${TOP}/module/.git/hooks)
+file(APPEND ${TOP}/module/.git/config "
+[remote \"origin\"]
+\turl = ${MOD_REPO}
+\tfetch = +refs/heads/*:refs/remotes/origin/*
+${AUTHOR_CONFIG}")
+run_child(WORKING_DIRECTORY ${TOP}/module
+ COMMAND ${GIT} add .
+ )
+run_child(WORKING_DIRECTORY ${TOP}/module
+ COMMAND ${GIT} commit -m "Initial content"
+ )
+run_child(WORKING_DIRECTORY ${TOP}/module
+ COMMAND ${GIT} push origin master:refs/heads/master
+ )
+
#-----------------------------------------------------------------------------
# Import initial content into the repository.
message("Importing content...")
@@ -61,6 +91,9 @@ run_child(WORKING_DIRECTORY ${TOP}/import
COMMAND ${GIT} add .
)
run_child(WORKING_DIRECTORY ${TOP}/import
+ COMMAND ${GIT} submodule add ${MOD_REPO} module
+ )
+run_child(WORKING_DIRECTORY ${TOP}/import
COMMAND ${GIT} commit -m "Initial content"
)
run_child(WORKING_DIRECTORY ${TOP}/import
@@ -68,6 +101,19 @@ run_child(WORKING_DIRECTORY ${TOP}/import
)
#-----------------------------------------------------------------------------
+# Modify the submodule.
+change_content(module)
+run_child(WORKING_DIRECTORY ${TOP}/module
+ COMMAND ${GIT} add -u
+ )
+run_child(WORKING_DIRECTORY ${TOP}/module
+ COMMAND ${GIT} commit -m "Changed content"
+ )
+run_child(WORKING_DIRECTORY ${TOP}/module
+ COMMAND ${GIT} push origin master:refs/heads/master
+ )
+
+#-----------------------------------------------------------------------------
# Create a working tree.
message("Checking out revision 1...")
run_child(
@@ -76,6 +122,14 @@ run_child(
)
file(REMOVE_RECURSE ${TOP}/user-source/.git/hooks)
file(APPEND ${TOP}/user-source/.git/config "${AUTHOR_CONFIG}")
+run_child(
+ WORKING_DIRECTORY ${TOP}/user-source
+ COMMAND ${GIT} submodule init
+ )
+run_child(
+ WORKING_DIRECTORY ${TOP}/user-source
+ COMMAND ${GIT} submodule update
+ )
#-----------------------------------------------------------------------------
# Make changes in the working tree.
@@ -95,6 +149,9 @@ run_child(
WORKING_DIRECTORY ${TOP}/user-source
COMMAND ${GIT} rm ${files_removed}
)
+run_child(WORKING_DIRECTORY ${TOP}/user-source/module
+ COMMAND ${GIT} checkout master
+ )
run_child(
WORKING_DIRECTORY ${TOP}/user-source
COMMAND ${GIT} add -u
@@ -140,6 +197,10 @@ run_child(
WORKING_DIRECTORY ${TOP}/user-source
COMMAND ${GIT} reset --hard master~2
)
+run_child(
+ WORKING_DIRECTORY ${TOP}/user-source
+ COMMAND ${GIT} submodule update
+ )
# Make sure pull does not try to rebase (which does not work with
# modified files) even if ~/.gitconfig sets "branch.master.rebase".
@@ -181,6 +242,14 @@ execute_process(
WORKING_DIRECTORY \"${TOP}/dash-source\"
COMMAND \"${GIT}\" reset --hard master~2
)
+execute_process(
+ WORKING_DIRECTORY \"${TOP}/dash-source\"
+ COMMAND \"${GIT}\" submodule init
+ )
+execute_process(
+ WORKING_DIRECTORY \"${TOP}/dash-source\"
+ COMMAND \"${GIT}\" submodule update
+ )
")
# Run the dashboard script with CTest.
diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
new file mode 100644
index 0000000..7206f1d
--- /dev/null
+++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
@@ -0,0 +1,85 @@
+cmake_minimum_required(VERSION 2.8)
+project(CheckCompilerRelatedVariables)
+
+
+function(echo_var var)
+ if(DEFINED ${var})
+ message("${var}='${${var}}' is defined")
+ else()
+ message("${var}='${${var}}' is NOT defined")
+ endif()
+endfunction()
+
+
+#
+# Check that the correct number of MSVC** variables are defined...
+#
+set(msvc_total 0)
+
+if(DEFINED MSVC60)
+ math(EXPR msvc_total "${msvc_total} + 1")
+endif()
+if(DEFINED MSVC70)
+ math(EXPR msvc_total "${msvc_total} + 1")
+endif()
+if(DEFINED MSVC71)
+ math(EXPR msvc_total "${msvc_total} + 1")
+endif()
+if(DEFINED MSVC80)
+ math(EXPR msvc_total "${msvc_total} + 1")
+endif()
+if(DEFINED MSVC90)
+ math(EXPR msvc_total "${msvc_total} + 1")
+endif()
+if(DEFINED MSVC10)
+ math(EXPR msvc_total "${msvc_total} + 1")
+endif()
+
+echo_var(MSVC)
+echo_var(MSVC60)
+echo_var(MSVC70)
+echo_var(MSVC71)
+echo_var(MSVC80)
+echo_var(MSVC90)
+echo_var(MSVC10)
+
+if(MSVC)
+ #
+ # MSVC is set in cl.cmake when cl is the compiler...
+ #
+ # Exactly one of the numbered variables should also be set
+ # indicating which version of the cl compiler / Visual Studio
+ # is in use...
+ #
+ if(msvc_total EQUAL 1)
+ message("test passes: exactly one MSVC** variable is defined...")
+ else()
+ message(FATAL_ERROR "error: ${msvc_total} MSVC** variables are defined -- exactly 1 expected")
+ endif()
+else()
+ #
+ # The compiler is something other than cl... None of the MSVC** variables
+ # should be defined...
+ #
+ if(msvc_total EQUAL 0)
+ message("test passes: no MSVC** variables are defined on non-MSVC build...")
+ else()
+ message(FATAL_ERROR "error: ${msvc_total} MSVC** variables are defined -- exactly 0 expected")
+ endif()
+endif()
+
+
+#
+# This is a no-op executable... If this test is going to fail, it fails during
+# the configure step while cmake is configuring this CMakeLists.txt file...
+#
+
+file(WRITE
+ "${CMAKE_CURRENT_BINARY_DIR}/main.cxx"
+ "int main() { return 0; }"
+ )
+
+add_executable(
+ CheckCompilerRelatedVariables
+ "${CMAKE_CURRENT_BINARY_DIR}/main.cxx"
+ )
diff --git a/Utilities/cmlibarchive/libarchive/archive_endian.h b/Utilities/cmlibarchive/libarchive/archive_endian.h
index e374546..067312d 100644
--- a/Utilities/cmlibarchive/libarchive/archive_endian.h
+++ b/Utilities/cmlibarchive/libarchive/archive_endian.h
@@ -43,9 +43,10 @@
* Disabling inline keyword for compilers known to choke on it:
* - Watcom C++ in C code. (For any version?)
* - SGI MIPSpro
+ * - SunPro C
* - Microsoft Visual C++ 6.0 (supposedly newer versions too)
*/
-#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__)
+#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__) || defined(__SUNPRO_C)
#define inline
#elif defined(_MSC_VER)
#define inline __inline
diff --git a/Utilities/cmlibarchive/libarchive/archive_entry_copy_bhfi.c b/Utilities/cmlibarchive/libarchive/archive_entry_copy_bhfi.c
index 4e09c2f..00cad4c 100644
--- a/Utilities/cmlibarchive/libarchive/archive_entry_copy_bhfi.c
+++ b/Utilities/cmlibarchive/libarchive/archive_entry_copy_bhfi.c
@@ -72,6 +72,5 @@ archive_entry_copy_bhfi(struct archive_entry *entry,
archive_entry_set_nlink(entry, bhfi->nNumberOfLinks);
archive_entry_set_size(entry, (((int64_t)bhfi->nFileSizeHigh) << 32)
+ bhfi->nFileSizeLow);
-// archive_entry_set_mode(entry, st->st_mode);
}
#endif
diff --git a/Utilities/cmlibarchive/libarchive/archive_read.c b/Utilities/cmlibarchive/libarchive/archive_read.c
index e4bdaa6..79dd1f8 100644
--- a/Utilities/cmlibarchive/libarchive/archive_read.c
+++ b/Utilities/cmlibarchive/libarchive/archive_read.c
@@ -1153,7 +1153,7 @@ __archive_read_skip(struct archive_read *a, int64_t request)
if (skipped == request)
return (skipped);
/* We hit EOF before we satisfied the skip request. */
- if (skipped < 0) // Map error code to 0 for error message below.
+ if (skipped < 0) /* Map error code to 0 for error message below. */
skipped = 0;
archive_set_error(&a->archive,
ARCHIVE_ERRNO_MISC,
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_compression_program.c b/Utilities/cmlibarchive/libarchive/archive_read_support_compression_program.c
index 972fb03..f58e518 100644
--- a/Utilities/cmlibarchive/libarchive/archive_read_support_compression_program.c
+++ b/Utilities/cmlibarchive/libarchive/archive_read_support_compression_program.c
@@ -72,7 +72,7 @@ archive_read_support_compression_program(struct archive *a, const char *cmd)
*/
int
archive_read_support_compression_program_signature(struct archive *_a,
- const char *cmd, void *signature, size_t signature_len)
+ const char *cmd, const void *signature, size_t signature_len)
{
(void)_a; /* UNUSED */
(void)cmd; /* UNUSED */
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
index ae997a7..c12b808 100644
--- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
+++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
@@ -1403,7 +1403,7 @@ add_entry(struct iso9660 *iso9660, struct file_info *file)
iso9660->pending_files[hole] = file;
return;
}
- // Move parent into hole <==> move hole up tree.
+ /* Move parent into hole <==> move hole up tree. */
iso9660->pending_files[hole] = iso9660->pending_files[parent];
hole = parent;
}
@@ -1933,16 +1933,16 @@ next_entry(struct iso9660 *iso9660)
/*
* Rebalance the heap.
*/
- a = 0; // Starting element and its offset
+ a = 0; /* Starting element and its offset */
a_offset = iso9660->pending_files[a]->offset
+ iso9660->pending_files[a]->size;
for (;;) {
- b = a + a + 1; // First child
+ b = a + a + 1; /* First child */
if (b >= iso9660->pending_files_used)
return (r);
b_offset = iso9660->pending_files[b]->offset
+ iso9660->pending_files[b]->size;
- c = b + 1; // Use second child if it is smaller.
+ c = b + 1; /* Use second child if it is smaller. */
if (c < iso9660->pending_files_used) {
c_offset = iso9660->pending_files[c]->offset
+ iso9660->pending_files[c]->size;
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h
index a046b97..17f5698 100644
--- a/Utilities/cmlibarchive/libarchive/archive_windows.h
+++ b/Utilities/cmlibarchive/libarchive/archive_windows.h
@@ -53,7 +53,7 @@
#include <errno.h>
#define set_errno(val) ((errno)=val)
#include <io.h>
-#include <stdlib.h> //brings in NULL
+#include <stdlib.h> /* brings in NULL */
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
@@ -61,7 +61,6 @@
#include <direct.h>
#define NOCRYPT
#include <windows.h>
-//#define EFTYPE 7
#if !defined(STDIN_FILENO)
#define STDIN_FILENO 0
@@ -170,8 +169,7 @@
#ifndef S_IFIFO
#define S_IFIFO _S_IFIFO
#endif
-//#define S_IFCHR _S_IFCHR
-//#define S_IFDIR _S_IFDIR
+
#ifndef S_IFBLK
#define S_IFBLK _S_IFBLK
#endif
@@ -181,8 +179,6 @@
#ifndef S_IFSOCK
#define S_IFSOCK _S_IFSOCK
#endif
-//#define S_IFREG _S_IFREG
-//#define S_IFMT _S_IFMT
#ifndef S_ISBLK
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) /* block special */
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) /* fifo or socket */
@@ -248,9 +244,9 @@
/* File descriptor flags used with F_GETFD and F_SETFD. */
#define FD_CLOEXEC 1 /* Close on exec. */
-//NOT SURE IF O_NONBLOCK is OK here but at least the 0x0004 flag is not used by anything else...
+/*NOT SURE IF O_NONBLOCK is OK here but at least the 0x0004 flag is not used by anything else... */
#define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
-//#define O_NDELAY O_NONBLOCK
+/*#define O_NDELAY O_NONBLOCK */
/* Symbolic constants for the access() function */
#if !defined(F_OK)
@@ -300,7 +296,9 @@ struct _timeval64i32 {
#define __timeval _timeval64i32
#endif
-typedef int pid_t;
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+ typedef int pid_t;
+#endif /* _MSC_VER __BORLANDC__ */
/* Message digest define */
#if !defined(HAVE_OPENSSL_MD5_H) && !defined(HAVE_OPENSSL_SHA_H)
diff --git a/Utilities/cmlibarchive/libarchive/config_windows.h b/Utilities/cmlibarchive/libarchive/config_windows.h
index c50f64d..cbbaccf 100644
--- a/Utilities/cmlibarchive/libarchive/config_windows.h
+++ b/Utilities/cmlibarchive/libarchive/config_windows.h
@@ -7,10 +7,11 @@
#ifndef CONFIG_H_INCLUDED
#define CONFIG_H_INCLUDED
-
+/*
///////////////////////////////////////////////////////////////////////////
// Check for Watcom and Microsoft Visual C compilers (WIN32 only) ///////
///////////////////////////////////////////////////////////////////////////
+*/
#if (defined(__WIN32__) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
#define IS_WIN32 1
@@ -33,8 +34,8 @@
/* Define to 1 if UID should be unsigned */
#define USE_UNSIGNED_GID 1
#endif
-///////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////
+/*///////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////*/
/* Define to 1 if you have the `acl_create_entry' function. */
/* #undef HAVE_ACL_CREATE_ENTRY */
diff --git a/Utilities/cmzlib/deflate.c b/Utilities/cmzlib/deflate.c
index a5e7a35..5ec8374 100644
--- a/Utilities/cmzlib/deflate.c
+++ b/Utilities/cmzlib/deflate.c
@@ -286,10 +286,10 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
- // The following memset eliminates the valgrind uninitialized warning
- // "swept under the carpet" here:
- // http://www.zlib.net/zlib_faq.html#faq36
- //
+ /* The following memset eliminates the valgrind uninitialized warning
+ "swept under the carpet" here:
+ http://www.zlib.net/zlib_faq.html#faq36 */
+
memset(s->window, 0, s->w_size*2*sizeof(Byte));
s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));