summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--CompileFlags.cmake2
-rw-r--r--Help/manual/cmake-developer.7.rst4
-rw-r--r--Help/manual/cmake-policies.7.rst6
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/manual/ctest.1.rst25
-rw-r--r--Help/module/FindITK.rst11
-rw-r--r--Help/module/FindVTK.rst11
-rw-r--r--Help/release/3.1.0.rst381
-rw-r--r--Help/release/dev/CMP0052.rst5
-rw-r--r--Help/release/dev/CMP0053.rst6
-rw-r--r--Help/release/dev/CMakeDetermineVSServicePack.rst6
-rw-r--r--Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst7
-rw-r--r--Help/release/dev/ExternalData-missing-not-fatal.rst8
-rw-r--r--Help/release/dev/ExternalProject-BUILD_ALWAYS.rst6
-rw-r--r--Help/release/dev/ExternalProject-add-lzma.rst5
-rw-r--r--Help/release/dev/ExternalProject-no-download-progress.rst6
-rw-r--r--Help/release/dev/ExternalProject_exclude-from-all.rst11
-rw-r--r--Help/release/dev/FeatureSummary_combine_WHAT_values.rst6
-rw-r--r--Help/release/dev/FindCUDA-cubin-fatbin.rst5
-rw-r--r--Help/release/dev/FindGTest-AUTO-SOURCES.rst7
-rw-r--r--Help/release/dev/FindHg-WC_INFO.rst5
-rw-r--r--Help/release/dev/FindOpenGL-target.rst5
-rw-r--r--Help/release/dev/FindOpenMP-add-Fortran-support.rst4
-rw-r--r--Help/release/dev/FindPkgConfig-PKG_CONFIG.rst5
-rw-r--r--Help/release/dev/FindVTK.rst6
-rw-r--r--Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst6
-rw-r--r--Help/release/dev/OpenWatcom.rst9
-rw-r--r--Help/release/dev/UseSWIG-guess_module_name.rst6
-rw-r--r--Help/release/dev/add-CheckFortranSourceCompiles.rst5
-rw-r--r--Help/release/dev/add-FindOpenCL.rst4
-rw-r--r--Help/release/dev/add-liblzma.rst5
-rw-r--r--Help/release/dev/add_custom_command-DEPENDS-genex.rst5
-rw-r--r--Help/release/dev/allow-OBJECT-library-extra-sources.rst6
-rw-r--r--Help/release/dev/cmake-E-env.rst4
-rw-r--r--Help/release/dev/cmake-gui-capture-output.rst6
-rw-r--r--Help/release/dev/compile-language-features.rst28
-rw-r--r--Help/release/dev/cpack-add-lzma.rst5
-rw-r--r--Help/release/dev/cpack-deb-compression-types.rst6
-rw-r--r--Help/release/dev/cpack-ifw-generator.rst5
-rw-r--r--Help/release/dev/ctest-coverage-extra.rst5
-rw-r--r--Help/release/dev/ctest-intel-coverage.rst5
-rw-r--r--Help/release/dev/custom-ninja-deptypes.rst5
-rw-r--r--Help/release/dev/delay-generator-toolset.rst8
-rw-r--r--Help/release/dev/export-from-obj-libs.rst5
-rw-r--r--Help/release/dev/faster-parsers.rst6
-rw-r--r--Help/release/dev/file-strings-encoding.rst5
-rw-r--r--Help/release/dev/find-module-targets.rst8
-rw-r--r--Help/release/dev/fix-OSX-bundle-rpaths-and-Qt5.rst6
-rw-r--r--Help/release/dev/generalize-LINK_ONLY.rst6
-rw-r--r--Help/release/dev/if-sanity.rst6
-rw-r--r--Help/release/dev/install-messages.rst8
-rw-r--r--Help/release/dev/link-libraries-response-files.rst5
-rw-r--r--Help/release/dev/link-line-dedup.rst5
-rw-r--r--Help/release/dev/module-WriteCompilerDetectionHeader.rst5
-rw-r--r--Help/release/dev/msvc-compiler-pdb-files.rst10
-rw-r--r--Help/release/dev/package-disable-registry.rst11
-rw-r--r--Help/release/dev/string-GENEX_STRIP.rst6
-rw-r--r--Help/release/dev/string-uuid.rst5
-rw-r--r--Help/release/dev/target-INTERFACE_SOURCES.rst5
-rw-r--r--Help/release/dev/target-SOURCES-genex.rst12
-rw-r--r--Help/release/dev/target-SOURCES-write.rst6
-rw-r--r--Help/release/dev/target_sources-command.rst5
-rw-r--r--Help/release/dev/thread-sanitizer.rst5
-rw-r--r--Help/release/dev/variable_watch-no-allowed-access.rst8
-rw-r--r--Help/release/dev/vs-generator-platform.rst9
-rw-r--r--Help/release/dev/vs-masm.rst5
-rw-r--r--Help/release/dev/vs-nsight-tegra-generator.rst8
-rw-r--r--Help/release/dev/vs-special-source-file-properties.rst11
-rw-r--r--Help/release/dev/vs-windows-apps.rst6
-rw-r--r--Help/release/dev/vs-windows-phone-and-store.rst10
-rw-r--r--Help/release/dev/vs14-generator.rst4
-rw-r--r--Help/release/dev/wix-acl.rst6
-rw-r--r--Help/release/dev/xcode-file-type.rst7
-rw-r--r--Help/release/index.rst1
-rw-r--r--Help/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS.rst5
-rw-r--r--Help/variable/CTEST_MEMORYCHECK_TYPE.rst5
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake8
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake8
-rw-r--r--Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake2
-rw-r--r--Modules/CMakeFindBinUtils.cmake12
-rw-r--r--Modules/CMakeForceCompiler.cmake4
-rw-r--r--Modules/CPackIFW.cmake158
-rw-r--r--Modules/CPackRPM.cmake78
-rw-r--r--Modules/CheckStructHasMember.cmake2
-rw-r--r--Modules/DartConfiguration.tcl.in1
-rw-r--r--Modules/FindBacktrace.cmake2
-rw-r--r--Modules/FindBoost.cmake8
-rw-r--r--Modules/FindITK.cmake61
-rw-r--r--Modules/FindIce.cmake2
-rw-r--r--Modules/FindLATEX.cmake2
-rw-r--r--Modules/FindLua.cmake2
-rw-r--r--Modules/FindMPI.cmake2
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake43
-rw-r--r--Modules/FindSquish.cmake2
-rw-r--r--Modules/FindThreads.cmake150
-rw-r--r--Modules/FindVTK.cmake66
-rw-r--r--Modules/FindXerces.cmake2
-rw-r--r--Modules/FortranCInterface/CMakeLists.txt2
-rw-r--r--Modules/Platform/eCos.cmake2
-rw-r--r--Modules/UseJava.cmake2
-rw-r--r--Modules/UseSWIG.cmake2
-rw-r--r--Source/CMakeLists.txt3
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx55
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.h2
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx124
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h11
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx5
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx8
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx3
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx2
-rw-r--r--Source/CPack/cpack.cxx2
-rw-r--r--Source/CTest/cmCTestBatchTestHandler.cxx8
-rw-r--r--Source/CTest/cmCTestBatchTestHandler.h5
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx16
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx11
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx78
-rw-r--r--Source/CTest/cmCTestCoverageHandler.h3
-rw-r--r--Source/CTest/cmCTestGIT.cxx2
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx4
-rw-r--r--Source/CTest/cmCTestLaunch.cxx8
-rw-r--r--Source/CTest/cmCTestMemCheckCommand.cxx2
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx91
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.h6
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx26
-rw-r--r--Source/CTest/cmCTestRunTest.cxx4
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx30
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx2
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx22
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx30
-rw-r--r--Source/CTest/cmParseCacheCoverage.cxx2
-rw-r--r--Source/CTest/cmParseCoberturaCoverage.cxx1
-rw-r--r--Source/CTest/cmParseDelphiCoverage.cxx253
-rw-r--r--Source/CTest/cmParseDelphiCoverage.h46
-rw-r--r--Source/CTest/cmParseGTMCoverage.cxx2
-rw-r--r--Source/CTest/cmParsePHPCoverage.cxx2
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.cxx2
-rw-r--r--Source/cmAddCustomCommandCommand.cxx2
-rw-r--r--Source/cmAddCustomTargetCommand.cxx2
-rw-r--r--Source/cmAddSubDirectoryCommand.cxx8
-rw-r--r--Source/cmCTest.cxx24
-rw-r--r--Source/cmCacheManager.cxx10
-rw-r--r--Source/cmCommandArgumentParser.cxx6
-rw-r--r--Source/cmCommandArgumentParser.y6
-rw-r--r--Source/cmComputeLinkInformation.cxx10
-rw-r--r--Source/cmConfigureFileCommand.cxx4
-rw-r--r--Source/cmCoreTryCompile.cxx16
-rw-r--r--Source/cmDepends.cxx4
-rw-r--r--Source/cmDependsFortran.cxx4
-rw-r--r--Source/cmDependsFortranParser.cxx6
-rw-r--r--Source/cmDependsFortranParser.y6
-rw-r--r--Source/cmDependsJavaParser.cxx6
-rw-r--r--Source/cmDependsJavaParser.y6
-rw-r--r--Source/cmExprParser.cxx6
-rw-r--r--Source/cmExprParser.y6
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx2
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx18
-rw-r--r--Source/cmFileCommand.cxx18
-rw-r--r--Source/cmFindCommon.cxx8
-rw-r--r--Source/cmFindLibraryCommand.cxx20
-rw-r--r--Source/cmFindPackageCommand.cxx18
-rw-r--r--Source/cmFindPathCommand.cxx2
-rw-r--r--Source/cmFindProgramCommand.cxx2
-rw-r--r--Source/cmGeneratedFileStream.cxx8
-rw-r--r--Source/cmGeneratorExpression.cxx8
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx2
-rw-r--r--Source/cmGeneratorTarget.cxx4
-rw-r--r--Source/cmGetDirectoryPropertyCommand.cxx2
-rw-r--r--Source/cmGetFilenameComponentCommand.cxx4
-rw-r--r--Source/cmGetPropertyCommand.cxx2
-rw-r--r--Source/cmGlobalBorlandMakefileGenerator.h2
-rw-r--r--Source/cmGlobalGenerator.cxx32
-rw-r--r--Source/cmGlobalGenerator.h8
-rw-r--r--Source/cmGlobalJOMMakefileGenerator.h2
-rw-r--r--Source/cmGlobalKdevelopGenerator.cxx6
-rw-r--r--Source/cmGlobalMSYSMakefileGenerator.h2
-rw-r--r--Source/cmGlobalMinGWMakefileGenerator.h2
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.h2
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx63
-rw-r--r--Source/cmGlobalNinjaGenerator.h5
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h2
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio6Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio9Generator.h2
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.h2
-rw-r--r--Source/cmGlobalXCodeGenerator.h2
-rw-r--r--Source/cmIncludeCommand.cxx2
-rw-r--r--Source/cmInstallCommand.cxx6
-rw-r--r--Source/cmListFileCache.cxx3
-rw-r--r--Source/cmLocalGenerator.cxx47
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalNinjaGenerator.cxx32
-rw-r--r--Source/cmLocalNinjaGenerator.h6
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx14
-rw-r--r--Source/cmMakeDepend.cxx8
-rw-r--r--Source/cmMakefile.cxx28
-rw-r--r--Source/cmMakefile.h4
-rw-r--r--Source/cmMakefileTargetGenerator.cxx4
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx12
-rw-r--r--Source/cmNinjaTargetGenerator.cxx22
-rw-r--r--Source/cmOSXBundleGenerator.cxx10
-rw-r--r--Source/cmOrderDirectories.cxx2
-rw-r--r--Source/cmQtAutoGenerators.cxx50
-rw-r--r--Source/cmSetPropertyCommand.cxx2
-rw-r--r--Source/cmSourceFile.cxx2
-rw-r--r--Source/cmSourceFileLocation.cxx14
-rw-r--r--Source/cmStandardIncludes.h21
-rw-r--r--Source/cmStandardLexer.h19
-rw-r--r--Source/cmSubdirCommand.cxx4
-rw-r--r--Source/cmSystemTools.cxx34
-rw-r--r--Source/cmTarget.cxx8
-rw-r--r--Source/cmTryRunCommand.cxx2
-rw-r--r--Source/cmWriteFileCommand.cxx2
-rw-r--r--Source/cm_sha2.c3
-rw-r--r--Source/cmake.cxx30
-rw-r--r--Source/cmcmd.cxx40
-rw-r--r--Tests/Assembler/CMakeLists.txt2
-rw-r--r--Tests/CMakeLists.txt19
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in9
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake59
-rw-r--r--Tests/CTestTestMemcheck/CMakeLists.txt46
-rw-r--r--Tests/CTestTestMemcheck/testAddressSanitizer.cmake5
-rw-r--r--Tests/CTestTestMemcheck/testMemorySanitizer.cmake27
-rw-r--r--Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake21
-rw-r--r--Tests/DelphiCoverage/DartConfiguration.tcl.in8
-rw-r--r--Tests/DelphiCoverage/UTCovTest(UTCovTest.pas).html117
-rw-r--r--Tests/DelphiCoverage/src/UTCovTest.pas75
-rw-r--r--Tests/ForceInclude/CMakeLists.txt2
-rw-r--r--Tests/Fortran/CMakeLists.txt18
-rw-r--r--Tests/FortranC/CMakeLists.txt2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt17
-rw-r--r--Tests/LinkStatic/CMakeLists.txt2
-rw-r--r--Tests/ModuleDefinition/CMakeLists.txt2
-rw-r--r--Tests/PDBDirectoryAndName/CMakeLists.txt2
-rw-r--r--Tests/PrecompiledHeader/CMakeLists.txt2
-rw-r--r--Tests/Preprocess/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FPHSA/FindPseudo.cmake6
-rw-r--r--Tests/RunCMake/FPHSA/RunCMakeTest.cmake25
-rw-r--r--Tests/RunCMake/FPHSA/any_version.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_0-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_0.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_0_matching.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.1-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.1.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.2-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.2.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.3.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.4-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.4.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.2.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.3-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.3.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_1.cmake1
-rw-r--r--Tests/RunCMake/FPHSA/exact_2-result.txt1
-rw-r--r--Tests/RunCMake/FPHSA/exact_2.cmake1
-rw-r--r--Tests/TryCompile/CMakeLists.txt4
-rw-r--r--Tests/VSResource/CMakeLists.txt14
-rw-r--r--Tests/VSResource/include.rc.in1
-rw-r--r--Tests/VSResource/test.rc3
-rw-r--r--Utilities/KWIML/test/CMakeLists.txt2
-rw-r--r--Utilities/Release/upload_release.cmake2
-rw-r--r--Utilities/cmcurl/CMakeLists.txt5
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt10
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c2
-rw-r--r--Utilities/cmliblzma/CMakeLists.txt6
-rw-r--r--Utilities/cmzlib/CMakeLists.txt10
280 files changed, 2376 insertions, 1412 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71850de..c2060ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,7 +115,7 @@ endmacro()
if(NOT CMake_TEST_EXTERNAL_CMAKE)
set(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
- if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
+ if(WIN32 AND NOT UNIX AND NOT MINGW)
set(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
endif()
endif()
@@ -555,7 +555,7 @@ CMAKE_SETUP_TESTING()
if(NOT CMake_TEST_EXTERNAL_CMAKE)
if(NOT CMake_VERSION_IS_RELEASE)
- if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2)
set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
-Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index a4a4a78..5d86876 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -20,7 +20,7 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
endif()
-if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+if(WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "Intel")
set(_INTEL_WINDOWS 1)
endif()
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index cd979c9..625dac0 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -188,8 +188,8 @@ size_t
Various implementations have differing implementation of ``size_t``. When
assigning the result of ``.size()`` on a container for example, the result
-should not be assigned to an ``unsigned int`` or similar. ``std::size_t`` must
-not be used.
+should be assigned to ``size_t`` not to ``std::size_t``, ``unsigned int`` or
+similar types.
Templates
---------
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index f1717a0..8edf708 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -20,6 +20,12 @@ for a policy, also avoiding the warning. Each policy can also be set to
either ``NEW`` or ``OLD`` behavior explicitly on the command line with the
:variable:`CMAKE_POLICY_DEFAULT_CMP<NNNN>` variable.
+Note that policies are not reliable feature toggles. A policy should
+almost never be set to ``OLD``, except to silence warnings in an otherwise
+frozen or stable codebase, or temporarily as part of a larger migration
+path. The ``OLD`` behavior of each policy is undesirable and will be
+replaced with an error condition in a future release.
+
The :command:`cmake_minimum_required` command does more than report an
error if a too-old version of CMake is used to build a project. It
also sets all policies introduced in that CMake version or earlier to
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 3f92ec5..864ea6e 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -351,6 +351,7 @@ Variables for CTest
/variable/CTEST_HG_UPDATE_OPTIONS
/variable/CTEST_MEMORYCHECK_COMMAND
/variable/CTEST_MEMORYCHECK_COMMAND_OPTIONS
+ /variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS
/variable/CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
/variable/CTEST_MEMORYCHECK_TYPE
/variable/CTEST_NIGHTLY_START_TIME
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index a3210a9..03e86af 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -111,7 +111,7 @@ Options
``-D <dashboard>, --dashboard <dashboard>``
Execute dashboard test
- This option tells ctest to act as a Dart client and perform a
+ This option tells ctest to act as a CDash client and perform a
dashboard test. All tests are <Mode><Test>, where Mode can be
Experimental, Nightly, and Continuous, and Test can be Start,
Update, Configure, Build, Test, Coverage, and Submit.
@@ -127,14 +127,14 @@ Options
``-M <model>, --test-model <model>``
Sets the model for a dashboard
- This option tells ctest to act as a Dart client where the TestModel
+ This option tells ctest to act as a CDash client where the TestModel
can be Experimental, Nightly, and Continuous. Combining -M and -T
is similar to -D
``-T <action>, --test-action <action>``
Sets the dashboard action to perform
- This option tells ctest to act as a Dart client and perform some
+ This option tells ctest to act as a CDash client and perform some
action such as start, build, test etc. Combining -M and -T is
similar to -D
@@ -328,11 +328,8 @@ Options
used to detect implicit dependencies in a test suite.
``--submit-index``
- Submit individual dashboard tests with specific index
-
- This option allows performing the same CTest action (such as test)
- multiple times and submit all stages to the same dashboard (Dart2
- required). Each execution requires different index.
+ Legacy option for old Dart2 dashboard server feature.
+ Do not use.
``--timeout <seconds>``
Set a global timeout on all tests.
@@ -824,6 +821,18 @@ Configuration settings include:
* `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_COMMAND_OPTIONS`
* :module:`CTest` module variable: ``MEMORYCHECK_COMMAND_OPTIONS``
+``MemoryCheckType``
+ Specify the type of memory checking to perform.
+
+ * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_TYPE`
+ * :module:`CTest` module variable: ``MEMORYCHECK_TYPE``
+
+``MemoryCheckSanitizerOptions``
+ Specify options to sanitizers when running with a sanitize-enabled build.
+
+ * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS`
+ * :module:`CTest` module variable: ``MEMORYCHECK_SANITIZER_OPTIONS``
+
``MemoryCheckSuppressionFile``
Specify a file containing suppression rules for the
``MemoryCheckCommand`` tool. It will be passed with options
diff --git a/Help/module/FindITK.rst b/Help/module/FindITK.rst
index dbfabbd..21a922f 100644
--- a/Help/module/FindITK.rst
+++ b/Help/module/FindITK.rst
@@ -1 +1,10 @@
-.. cmake-module:: ../../Modules/FindITK.cmake
+FindITK
+-------
+
+This module no longer exists.
+
+This module existed in versions of CMake prior to 3.1, but became
+only a thin wrapper around ``find_package(ITK NO_MODULE)`` to
+provide compatibility for projects using long-outdated conventions.
+Now ``find_package(ITK)`` will search for ``ITKConfig.cmake``
+directly.
diff --git a/Help/module/FindVTK.rst b/Help/module/FindVTK.rst
index f9c1efe..3bc67c5 100644
--- a/Help/module/FindVTK.rst
+++ b/Help/module/FindVTK.rst
@@ -1 +1,10 @@
-.. cmake-module:: ../../Modules/FindVTK.cmake
+FindVTK
+-------
+
+This module no longer exists.
+
+This module existed in versions of CMake prior to 3.1, but became
+only a thin wrapper around ``find_package(VTK NO_MODULE)`` to
+provide compatibility for projects using long-outdated conventions.
+Now ``find_package(VTK)`` will search for ``VTKConfig.cmake``
+directly.
diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst
new file mode 100644
index 0000000..652bcd3
--- /dev/null
+++ b/Help/release/3.1.0.rst
@@ -0,0 +1,381 @@
+CMake 3.1.0 Release Notes
+*************************
+
+.. only:: html
+
+ .. contents::
+
+Changes made since CMake 3.0.0 include the following.
+
+Documentation Changes
+=====================
+
+* A new :manual:`cmake-compile-features(7)` manual was added.
+
+New Features
+============
+
+Generators
+----------
+
+* A :generator:`Visual Studio 14` generator was added.
+
+Windows Phone and Windows Store
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* Generators for Visual Studio 11 (2012) and above learned to generate
+ projects for Windows Phone and Windows Store. One may set the
+ :variable:`CMAKE_SYSTEM_NAME` variable to ``WindowsPhone``
+ or ``WindowsStore`` on the :manual:`cmake(1)` command-line
+ or in a :variable:`CMAKE_TOOLCHAIN_FILE` to activate these platforms.
+ Also set :variable:`CMAKE_SYSTEM_VERSION` to ``8.0`` or ``8.1`` to
+ specify the version of Windows to be targeted.
+
+NVIDIA Nsight Tegra
+^^^^^^^^^^^^^^^^^^^
+
+* Generators for Visual Studio 10 (2010) and above learned to generate
+ projects for NVIDIA Nsight Tegra Visual Studio Edition. One may set
+ the :variable:`CMAKE_SYSTEM_NAME` variable to ``Android`` on the
+ :manual:`cmake(1)` command-line or in a :variable:`CMAKE_TOOLCHAIN_FILE`
+ to activate this platform.
+
+Syntax
+------
+
+* The :manual:`cmake-language(7)` syntax for :ref:`Variable References` and
+ :ref:`Escape Sequences` was simplified in order to allow a much faster
+ implementation. See policy :policy:`CMP0053`.
+
+* The :command:`if` command no longer automatically dereferences
+ variables named in quoted or bracket arguments. See policy
+ :policy:`CMP0054`.
+
+Commands
+--------
+
+* The :command:`add_custom_command` command learned to interpret
+ :manual:`cmake-generator-expressions(7)` in arguments to ``DEPENDS``.
+
+* The :command:`export(PACKAGE)` command learned to check the
+ :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable to skip
+ exporting the package.
+
+* The :command:`file(STRINGS)` command gained a new ``ENCODING``
+ option to enable extraction of ``UTF-8`` strings.
+
+* The :command:`find_package` command learned to check the
+ :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` and
+ :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY`
+ variables to skip searching the package registries.
+
+* The :command:`install` command learned a ``MESSAGE_NEVER`` option
+ to avoid output during installation.
+
+* The :command:`string` command learned a new ``GENEX_STRIP`` subcommand
+ which removes
+ :manual:`generator expression <cmake-generator-expressions(7)>`.
+
+* The :command:`string` command learned a new ``UUID`` subcommand
+ to generate a univerally unique identifier.
+
+* New :command:`target_compile_features` command allows populating the
+ :prop_tgt:`COMPILE_FEATURES` target property, just like any other
+ build variable.
+
+* The :command:`target_sources` command was added to add to the
+ :prop_tgt:`SOURCES` target property.
+
+Variables
+---------
+
+* The Visual Studio generators for versions 8 (2005) and above
+ learned to read the target platform name from a new
+ :variable:`CMAKE_GENERATOR_PLATFORM` variable when it is
+ not specified as part of the generator name. The platform
+ name may be specified on the :manual:`cmake(1)` command line
+ with the ``-A`` option, e.g. ``-G "Visual Studio 12 2013" -A x64``.
+
+* The :variable:`CMAKE_GENERATOR_TOOLSET` variable may now be
+ initialized in a toolchain file specified by the
+ :variable:`CMAKE_TOOLCHAIN_FILE` variable. This is useful
+ when cross-compiling with the Xcode or Visual Studio
+ generators.
+
+* The :variable:`CMAKE_INSTALL_MESSAGE` variable was introduced to
+ optionally reduce output installation.
+
+Properties
+----------
+
+* New :prop_tgt:`CXX_STANDARD` and :prop_tgt:`CXX_EXTENSIONS` target
+ properties may specify values which CMake uses to compute required
+ compile options such as ``-std=c++11`` or ``-std=gnu++11``. The
+ :variable:`CMAKE_CXX_STANDARD` and :variable:`CMAKE_CXX_EXTENSIONS`
+ variables may be set to initialize the target properties.
+
+* New :prop_tgt:`C_STANDARD` and :prop_tgt:`C_EXTENSIONS` target
+ properties may specify values which CMake uses to compute required
+ compile options such as ``-std=c11`` or ``-std=gnu11``. The
+ :variable:`CMAKE_C_STANDARD` and :variable:`CMAKE_C_EXTENSIONS`
+ variables may be set to initialize the target properties.
+
+* New :prop_tgt:`COMPILE_FEATURES` target property may contain a list
+ of features required to compile a target. CMake uses this
+ information to ensure that the compiler in use is capable of building
+ the target, and to add any necessary compile flags to support language
+ features.
+
+* New :prop_tgt:`COMPILE_PDB_NAME` and
+ :prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY` target properties
+ were introduced to specify the MSVC compiler program database
+ file location (``cl /Fd``). This complements the existing
+ :prop_tgt:`PDB_NAME` and :prop_tgt:`PDB_OUTPUT_DIRECTORY`
+ target properties that specify the linker program database
+ file location (``link /pdb``).
+
+* The :prop_tgt:`INTERFACE_LINK_LIBRARIES` target property now supports
+ a ``$<LINK_ONLY:...>``
+ :manual:`generator expression <cmake-generator-expressions(7)>`.
+
+* A new :prop_tgt:`INTERFACE_SOURCES` target property was introduced. This is
+ consumed by dependent targets, which compile and link the listed sources.
+
+* The :prop_tgt:`SOURCES` target property now contains
+ :manual:`generator expression <cmake-generator-expressions(7)>`
+ such as ``TARGET_OBJECTS`` when read at configure time, if
+ policy :policy:`CMP0051` is ``NEW``.
+
+* The :prop_tgt:`SOURCES` target property now generally supports
+ :manual:`generator expression <cmake-generator-expressions(7)>`. The
+ generator expressions may be used in the :command:`add_library` and
+ :command:`add_executable` commands.
+
+* It is now possible to write and append to the :prop_tgt:`SOURCES` target
+ property. The :variable:`CMAKE_DEBUG_TARGET_PROPERTIES` variable may be
+ used to trace the origin of sources.
+
+* A :prop_sf:`VS_DEPLOYMENT_CONTENT` source file property was added
+ to tell the Visual Studio generators to mark content for deployment
+ in Windows Phone and Windows Store projects.
+
+* The :prop_tgt:`VS_WINRT_COMPONENT` target property was created to
+ tell Visual Studio generators to compile a shared library as a
+ Windows Runtime (WinRT) component.
+
+* The :generator:`Xcode` generator learned to check source
+ file properties :prop_sf:`XCODE_EXPLICIT_FILE_TYPE` and
+ :prop_sf:`XCODE_LAST_KNOWN_FILE_TYPE` for a custom Xcode
+ file reference type.
+
+Modules
+-------
+
+* The :module:`BundleUtilities` module learned to resolve and replace
+ ``@rpath`` placeholders on OS X to correctly bundle applications
+ using them.
+
+* The :module:`CMakePackageConfigHelpers` module
+ :command:`configure_package_config_file` command learned a new
+ ``INSTALL_PREFIX`` option to generate package configuration files
+ meant for a prefix other than :variable:`CMAKE_INSTALL_PREFIX`.
+
+* The :module:`CheckFortranSourceCompiles` module was added to
+ provide a ``CHECK_Fortran_SOURCE_COMPILES`` macro.
+
+* The :module:`ExternalData` module learned to tolerate a ``DATA{}``
+ reference to a missing source file with a warning instead of
+ rejecting it with an error. This helps developers write new
+ ``DATA{}`` references to test reference outputs that have not
+ yet been created.
+
+* The :module:`ExternalProject` module learned to support lzma-compressed
+ source tarballs with ``.7z``, ``.tar.xz``, and ``.txz`` extensions.
+
+* The :module:`ExternalProject` module ``ExternalProject_Add`` command
+ learned a new ``BUILD_ALWAYS`` option to cause the external project
+ build step to run every time the host project is built.
+
+* The :module:`ExternalProject` module ``ExternalProject_Add`` command
+ learned a new ``EXCLUDE_FROM_ALL`` option to cause the external
+ project target to have the :prop_tgt:`EXCLUDE_FROM_ALL` target
+ property set.
+
+* The :module:`ExternalProject` module ``ExternalProject_Add_Step`` command
+ learned a new ``EXCLUDE_FROM_MAIN`` option to cause the step to not be
+ a direct dependency of the main external project target.
+
+* The :module:`ExternalProject` module ``ExternalProject_Add`` command
+ learned a new ``DOWNLOAD_NO_PROGRESS`` option to disable progress
+ output while downloading the source tarball.
+
+* The :module:`FeatureSummary` module ``feature_summary`` API
+ learned to accept multiple values for the ``WHAT`` option and
+ combine them appropriately.
+
+* The :module:`FindCUDA` module learned to support ``fatbin`` and ``cubin``
+ modules.
+
+* The :module:`FindGTest` module ``gtest_add_tests`` macro learned
+ a new ``AUTO`` option to automatically read the :prop_tgt:`SOURCES`
+ target property of the test executable and scan the source files
+ for tests to be added.
+
+* The :module:`FindGLEW` module now provides imported targets.
+
+* The :module:`FindGLUT` module now provides imported targets.
+
+* The :module:`FindHg` module gained a new ``Hg_WC_INFO`` macro to
+ help run ``hg`` to extract information about a Mercurial work copy.
+
+* The :module:`FindOpenCL` module was introduced.
+
+* The :module:`FindOpenGL` module now provides imported targets
+ ``OpenGL::GL`` and ``OpenGL::GLU`` when the libraries are found.
+
+* The :module:`FindOpenMP` module learned to support Fortran.
+
+* The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG``
+ environment variable value as the ``pkg-config`` executable, if set.
+
+* The :module:`FindVTK` module dropped support for finding VTK 4.0.
+ It is now a thin-wrapper around ``find_package(VTK ... NO_MODULE)``.
+ This produces much clearer error messages when VTK is not found.
+
+* The :module:`FindZLIB` module now provides imported targets.
+
+* The :module:`GenerateExportHeader` module ``generate_export_header``
+ function learned to allow use with :ref:`Object Libraries`.
+
+* The :module:`InstallRequiredSystemLibraries` module gained a new
+ ``CMAKE_INSTALL_OPENMP_LIBRARIES`` option to install MSVC OpenMP
+ runtime libraries.
+
+* The :module:`UseSWIG` module learned to detect the module name
+ from ``.i`` source files if possible to avoid the need to set
+ the ``SWIG_MODULE_NAME`` source file property explicitly.
+
+* The :module:`WriteCompilerDetectionHeader` module was added to allow
+ creation of a portable header file for compiler optional feature detection.
+
+Generator Expressions
+---------------------
+
+* New ``COMPILE_FEATURES``
+ :manual:`generator expression <cmake-generator-expressions(7)>` allows
+ setting build properties based on available compiler features.
+
+CTest
+-----
+
+* The :command:`ctest_coverage` command learned to read variable
+ ``CTEST_COVERAGE_EXTRA_FLAGS`` to set ``CoverageExtraFlags``.
+
+* The :command:`ctest_coverage` command learned to support
+ Intel coverage files with the ``codecov`` tool.
+
+* The :command:`ctest_memcheck` command learned to support sanitizer
+ modes, including ``AddressSanitizer``, ``MemorySanitizer``,
+ ``ThreadSanitizer``, and ``UndefinedBehaviorSanitizer``.
+ Options may be set using the new
+ :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS` variable.
+
+CPack
+-----
+
+* :manual:`cpack(1)` gained an ``IFW`` generator to package using
+ Qt Framework Installer tools. See the :module:`CPackIFW` module.
+
+* :manual:`cpack(1)` gained ``7Z`` and ``TXZ`` generators supporting
+ lzma-compressed archives.
+
+* The :module:`CPackDeb` module learned a new
+ :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` variable to set the
+ tarball compression type.
+
+* The :manual:`cpack(1)` ``WiX`` generator learned to support
+ a :prop_inst:`CPACK_WIX_ACL` installed file property to
+ specify an Access Control List.
+
+Other
+-----
+
+* The :manual:`cmake(1)` ``-E`` option learned a new ``env`` command.
+
+* The :manual:`cmake(1)` ``-E tar`` command learned to support
+ lzma-compressed files.
+
+* :ref:`Object Libraries` may now have extra sources that do not
+ compile to object files so long as they would not affect linking
+ of a normal library (e.g. ``.dat`` is okay but not ``.def``).
+
+* Visual Studio generators for VS 8 and later learned to support
+ the ``ASM_MASM`` language.
+
+* The Visual Studio generators learned to treat ``.hlsl`` source
+ files as High Level Shading Language sources (using ``FXCompile``
+ in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file
+ property was added to specify the Shader Type.
+
+New Diagnostics
+===============
+
+* Policy :policy:`CMP0052` introduced to control directories in the
+ :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of exported targets.
+
+Deprecated and Removed Features
+===============================
+
+* In CMake 3.0 the :command:`target_link_libraries` command
+ accidentally began allowing unquoted arguments to use
+ :manual:`generator expressions <cmake-generator-expressions(7)>`
+ containing a (``;`` separated) list within them. For example::
+
+ set(libs B C)
+ target_link_libraries(A PUBLIC $<BUILD_INTERFACE:${libs}>)
+
+ This is equivalent to writing::
+
+ target_link_libraries(A PUBLIC $<BUILD_INTERFACE:B C>)
+
+ and was never intended to work. It did not work in CMake 2.8.12.
+ Such generator expressions should be in quoted arguments::
+
+ set(libs B C)
+ target_link_libraries(A PUBLIC "$<BUILD_INTERFACE:${libs}>")
+
+ CMake 3.1 again requires the quotes for this to work correctly.
+
+* Callbacks established by the :command:`variable_watch` command will no
+ longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when
+ the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is
+ set. Uninitialized variable accesses will always be reported as
+ ``UNKNOWN_READ_ACCESS``.
+
+* The :module:`CMakeDetermineVSServicePack` module now warns that
+ it is deprecated and should not longer be used. Use the
+ :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable instead.
+
+Other Changes
+=============
+
+* The :manual:`cmake-gui(1)` learned to capture output from child
+ processes started by the :command:`execute_process` command
+ and display it in the output window.
+
+* The :manual:`cmake-language(7)` internal implementation of generator
+ expression and list expansion parsers have been optimized and shows
+ non-trivial speedup on large projects.
+
+* The Makefile generators learned to use response files with GNU tools
+ on Windows to pass library directories and names to the linker.
+
+* When generating linker command-lines, CMake now avoids repeating
+ items corresponding to SHARED library targets.
+
+* Support for the Open Watcom compiler has been overhauled.
+ The :variable:`CMAKE_<LANG>_COMPILER_ID` is now ``OpenWatcom``,
+ and the :variable:`CMAKE_<LANG>_COMPILER_VERSION` now uses
+ the Open Watcom external version numbering. The external
+ version numbers are lower than the internal version number
+ by 11.
diff --git a/Help/release/dev/CMP0052.rst b/Help/release/dev/CMP0052.rst
deleted file mode 100644
index adb3d44..0000000
--- a/Help/release/dev/CMP0052.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-CMP0052
--------
-
-* Policy :policy:`CMP0052` introduced to control directories in the
- :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of exported targets.
diff --git a/Help/release/dev/CMP0053.rst b/Help/release/dev/CMP0053.rst
deleted file mode 100644
index 3b835fb..0000000
--- a/Help/release/dev/CMP0053.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-CMP0053
--------
-
-* The :manual:`cmake-language(7)` syntax for :ref:`Variable References` and
- :ref:`Escape Sequences` was simplified in order to allow a much faster
- implementation. See policy :policy:`CMP0053`.
diff --git a/Help/release/dev/CMakeDetermineVSServicePack.rst b/Help/release/dev/CMakeDetermineVSServicePack.rst
deleted file mode 100644
index d9d7b41..0000000
--- a/Help/release/dev/CMakeDetermineVSServicePack.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-CMakeDetermineVSServicePack
----------------------------
-
-* The :module:`CMakeDetermineVSServicePack` module now warns that
- it is deprecated and should not longer be used. Use the
- :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable instead.
diff --git a/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst b/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst
deleted file mode 100644
index da8d7c3..0000000
--- a/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-CMakePackageConfigHelpers-INSTALL_PREFIX
-----------------------------------------
-
-* The :module:`CMakePackageConfigHelpers` module
- :command:`configure_package_config_file` command learned a new
- ``INSTALL_PREFIX`` option to generate package configuration files
- meant for a prefix other than :variable:`CMAKE_INSTALL_PREFIX`.
diff --git a/Help/release/dev/ExternalData-missing-not-fatal.rst b/Help/release/dev/ExternalData-missing-not-fatal.rst
deleted file mode 100644
index e9f1f04..0000000
--- a/Help/release/dev/ExternalData-missing-not-fatal.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-ExternalData-missing-not-fatal
-------------------------------
-
-* The :module:`ExternalData` module learned to tolerate a ``DATA{}``
- reference to a missing source file with a warning instead of
- rejecting it with an error. This helps developers write new
- ``DATA{}`` references to test reference outputs that have not
- yet been created.
diff --git a/Help/release/dev/ExternalProject-BUILD_ALWAYS.rst b/Help/release/dev/ExternalProject-BUILD_ALWAYS.rst
deleted file mode 100644
index 5384671..0000000
--- a/Help/release/dev/ExternalProject-BUILD_ALWAYS.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-ExternalProject-BUILD_ALWAYS
-----------------------------
-
-* The :module:`ExternalProject` module ``ExternalProject_Add`` command
- learned a new ``BUILD_ALWAYS`` option to cause the external project
- build step to run every time the host project is built.
diff --git a/Help/release/dev/ExternalProject-add-lzma.rst b/Help/release/dev/ExternalProject-add-lzma.rst
deleted file mode 100644
index cb398ef..0000000
--- a/Help/release/dev/ExternalProject-add-lzma.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-ExternalProject-add-lzma
-------------------------
-
-* The :module:`ExternalProject` module learned to support lzma-compressed
- source tarballs with ``.7z``, ``.tar.xz``, and ``.txz`` extensions.
diff --git a/Help/release/dev/ExternalProject-no-download-progress.rst b/Help/release/dev/ExternalProject-no-download-progress.rst
deleted file mode 100644
index 41db55d..0000000
--- a/Help/release/dev/ExternalProject-no-download-progress.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-ExternalProject-no-download-progress
-------------------------------------
-
-* The :module:`ExternalProject` module ``ExternalProject_Add`` command
- learned a new ``DOWNLOAD_NO_PROGRESS`` option to disable progress
- output while downloading the source tarball.
diff --git a/Help/release/dev/ExternalProject_exclude-from-all.rst b/Help/release/dev/ExternalProject_exclude-from-all.rst
deleted file mode 100644
index 1d62b3a..0000000
--- a/Help/release/dev/ExternalProject_exclude-from-all.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-ExternalProject_exclude-from-all
---------------------------------
-
-* The :module:`ExternalProject` module ``ExternalProject_Add`` command
- learned a new ``EXCLUDE_FROM_ALL`` option to cause the external
- project target to have the :prop_tgt:`EXCLUDE_FROM_ALL` target
- property set.
-
-* The :module:`ExternalProject` module ``ExternalProject_Add_Step`` command
- learned a new ``EXCLUDE_FROM_MAIN`` option to cause the step to not be
- a direct dependency of the main external project target.
diff --git a/Help/release/dev/FeatureSummary_combine_WHAT_values.rst b/Help/release/dev/FeatureSummary_combine_WHAT_values.rst
deleted file mode 100644
index 174ef15..0000000
--- a/Help/release/dev/FeatureSummary_combine_WHAT_values.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-FeatureSummary_combine_WHAT_values
-----------------------------------
-
-* The :module:`FeatureSummary` module ``feature_summary`` API
- learned to accept multiple values for the ``WHAT`` option and
- combine them appropriately.
diff --git a/Help/release/dev/FindCUDA-cubin-fatbin.rst b/Help/release/dev/FindCUDA-cubin-fatbin.rst
deleted file mode 100644
index d44da8e..0000000
--- a/Help/release/dev/FindCUDA-cubin-fatbin.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-FindCUDA-cubin-fatbin
----------------------
-
-* The :module:`FindCUDA` module learned to support ``fatbin`` and ``cubin``
- modules.
diff --git a/Help/release/dev/FindGTest-AUTO-SOURCES.rst b/Help/release/dev/FindGTest-AUTO-SOURCES.rst
deleted file mode 100644
index 17b2a1b..0000000
--- a/Help/release/dev/FindGTest-AUTO-SOURCES.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-FindGTest-AUTO-SOURCES
-----------------------
-
-* The :module:`FindGTest` module ``gtest_add_tests`` macro learned
- a new ``AUTO`` option to automatically read the :prop_tgt:`SOURCES`
- target property of the test executable and scan the source files
- for tests to be added.
diff --git a/Help/release/dev/FindHg-WC_INFO.rst b/Help/release/dev/FindHg-WC_INFO.rst
deleted file mode 100644
index 0caf2b3..0000000
--- a/Help/release/dev/FindHg-WC_INFO.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-FindHg-WC_INFO
---------------
-
-* The :module:`FindHg` module gained a new ``Hg_WC_INFO`` macro to
- help run ``hg`` to extract information about a Mercurial work copy.
diff --git a/Help/release/dev/FindOpenGL-target.rst b/Help/release/dev/FindOpenGL-target.rst
deleted file mode 100644
index 670507e..0000000
--- a/Help/release/dev/FindOpenGL-target.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-FindOpenGL-target
------------------
-
-* The :module:`FindOpenGL` module now provides imported targets
- ``OpenGL::GL`` and ``OpenGL::GLU`` when the libraries are found.
diff --git a/Help/release/dev/FindOpenMP-add-Fortran-support.rst b/Help/release/dev/FindOpenMP-add-Fortran-support.rst
deleted file mode 100644
index 0205718..0000000
--- a/Help/release/dev/FindOpenMP-add-Fortran-support.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-FindOpenMP-add-Fortran-support
-------------------------------
-
-* The :module:`FindOpenMP` module learned to support Fortran.
diff --git a/Help/release/dev/FindPkgConfig-PKG_CONFIG.rst b/Help/release/dev/FindPkgConfig-PKG_CONFIG.rst
deleted file mode 100644
index c0f6471..0000000
--- a/Help/release/dev/FindPkgConfig-PKG_CONFIG.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-FindPkgConfig-PKG_CONFIG
-------------------------
-
-* The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG``
- environment variable value as the ``pkg-config`` executable, if set.
diff --git a/Help/release/dev/FindVTK.rst b/Help/release/dev/FindVTK.rst
deleted file mode 100644
index 1cc9fc4..0000000
--- a/Help/release/dev/FindVTK.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-FindVTK
--------
-
-* The :module:`FindVTK` module dropped support for finding VTK 4.0.
- It is now a thin-wrapper around ``find_package(VTK ... NO_MODULE)``.
- This produces much clearer error messages when VTK is not found.
diff --git a/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst b/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst
deleted file mode 100644
index 4f8f962..0000000
--- a/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-InstallRequiredSystemLibraries-vs-openmp
-----------------------------------------
-
-* The :module:`InstallRequiredSystemLibraries` module gained a new
- ``CMAKE_INSTALL_OPENMP_LIBRARIES`` option to install MSVC OpenMP
- runtime libraries.
diff --git a/Help/release/dev/OpenWatcom.rst b/Help/release/dev/OpenWatcom.rst
deleted file mode 100644
index 63f6e8c..0000000
--- a/Help/release/dev/OpenWatcom.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-OpenWatcom
-----------
-
-* Support for the Open Watcom compiler has been overhauled.
- The :variable:`CMAKE_<LANG>_COMPILER_ID` is now ``OpenWatcom``,
- and the :variable:`CMAKE_<LANG>_COMPILER_VERSION` now uses
- the Open Watcom external version numbering. The external
- version numbers are lower than the internal version number
- by 11.
diff --git a/Help/release/dev/UseSWIG-guess_module_name.rst b/Help/release/dev/UseSWIG-guess_module_name.rst
deleted file mode 100644
index c895046..0000000
--- a/Help/release/dev/UseSWIG-guess_module_name.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-UseSWIG-guess_module_name
--------------------------
-
-* The :module:`UseSWIG` module learned to detect the module name
- from ``.i`` source files if possible to avoid the need to set
- the ``SWIG_MODULE_NAME`` source file property explicitly.
diff --git a/Help/release/dev/add-CheckFortranSourceCompiles.rst b/Help/release/dev/add-CheckFortranSourceCompiles.rst
deleted file mode 100644
index b78c747..0000000
--- a/Help/release/dev/add-CheckFortranSourceCompiles.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-add-CheckFortranSourceCompiles
-------------------------------
-
-* The :module:`CheckFortranSourceCompiles` module was added to
- provide a ``CHECK_Fortran_SOURCE_COMPILES`` macro.
diff --git a/Help/release/dev/add-FindOpenCL.rst b/Help/release/dev/add-FindOpenCL.rst
deleted file mode 100644
index e1e30d1..0000000
--- a/Help/release/dev/add-FindOpenCL.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-add-FindOpenCL
---------------
-
-* The :module:`FindOpenCL` module was introduced.
diff --git a/Help/release/dev/add-liblzma.rst b/Help/release/dev/add-liblzma.rst
deleted file mode 100644
index a59ec09..0000000
--- a/Help/release/dev/add-liblzma.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-add-liblzma
------------
-
-* The :manual:`cmake(1)` ``-E tar`` command learned to support
- lzma-compressed files.
diff --git a/Help/release/dev/add_custom_command-DEPENDS-genex.rst b/Help/release/dev/add_custom_command-DEPENDS-genex.rst
deleted file mode 100644
index 1e528e6..0000000
--- a/Help/release/dev/add_custom_command-DEPENDS-genex.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-add_custom_command-DEPENDS-genex
---------------------------------
-
-* The :command:`add_custom_command` command learned to interpret
- :manual:`cmake-generator-expressions(7)` in arguments to ``DEPENDS``.
diff --git a/Help/release/dev/allow-OBJECT-library-extra-sources.rst b/Help/release/dev/allow-OBJECT-library-extra-sources.rst
deleted file mode 100644
index 472fcdc..0000000
--- a/Help/release/dev/allow-OBJECT-library-extra-sources.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-allow-OBJECT-library-extra-sources
-----------------------------------
-
-* :ref:`Object Libraries` may now have extra sources that do not
- compile to object files so long as they would not affect linking
- of a normal library (e.g. ``.dat`` is okay but not ``.def``).
diff --git a/Help/release/dev/cmake-E-env.rst b/Help/release/dev/cmake-E-env.rst
deleted file mode 100644
index 4bdcd0c..0000000
--- a/Help/release/dev/cmake-E-env.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-cmake-E-env
------------
-
-* The :manual:`cmake(1)` ``-E`` option learned a new ``env`` command.
diff --git a/Help/release/dev/cmake-gui-capture-output.rst b/Help/release/dev/cmake-gui-capture-output.rst
deleted file mode 100644
index 40cd25e..0000000
--- a/Help/release/dev/cmake-gui-capture-output.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-cmake-gui-capture-output
-------------------------
-
-* The :manual:`cmake-gui(1)` learned to capture output from child
- processes started by the :command:`execute_process` command
- and display it in the output window.
diff --git a/Help/release/dev/compile-language-features.rst b/Help/release/dev/compile-language-features.rst
deleted file mode 100644
index d10e22b..0000000
--- a/Help/release/dev/compile-language-features.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-target-language-features
-------------------------
-
-* New :prop_tgt:`CXX_STANDARD` and :prop_tgt:`CXX_EXTENSIONS` target
- properties may specify values which CMake uses to compute required
- compile options such as ``-std=c++11`` or ``-std=gnu++11``. The
- :variable:`CMAKE_CXX_STANDARD` and :variable:`CMAKE_CXX_EXTENSIONS`
- variables may be set to initialize the target properties.
-
-* New :prop_tgt:`C_STANDARD` and :prop_tgt:`C_EXTENSIONS` target
- properties may specify values which CMake uses to compute required
- compile options such as ``-std=c11`` or ``-std=gnu11``. The
- :variable:`CMAKE_C_STANDARD` and :variable:`CMAKE_C_EXTENSIONS`
- variables may be set to initialize the target properties.
-
-* New :prop_tgt:`COMPILE_FEATURES` target property may contain a list
- of features required to compile a target. CMake uses this
- information to ensure that the compiler in use is capable of building
- the target, and to add any necessary compile flags to support language
- features.
-
-* New :command:`target_compile_features` command allows populating the
- :prop_tgt:`COMPILE_FEATURES` target property, just like any other
- build variable.
-
-* New ``COMPILE_FEATURES``
- :manual:`generator expression <cmake-generator-expressions(7)>` allows
- setting build properties based on available compiler features.
diff --git a/Help/release/dev/cpack-add-lzma.rst b/Help/release/dev/cpack-add-lzma.rst
deleted file mode 100644
index ad59f35..0000000
--- a/Help/release/dev/cpack-add-lzma.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-cpack-add-lzma
---------------
-
-* :manual:`cpack(1)` gained ``7Z`` and ``TXZ`` generators supporting
- lzma-compressed archives.
diff --git a/Help/release/dev/cpack-deb-compression-types.rst b/Help/release/dev/cpack-deb-compression-types.rst
deleted file mode 100644
index a33e333..0000000
--- a/Help/release/dev/cpack-deb-compression-types.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-cpack-deb-compression-types
----------------------------
-
-* The :module:`CPackDeb` module learned a new
- :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` variable to set the
- tarball compression type.
diff --git a/Help/release/dev/cpack-ifw-generator.rst b/Help/release/dev/cpack-ifw-generator.rst
deleted file mode 100644
index f667136..0000000
--- a/Help/release/dev/cpack-ifw-generator.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-cpack-ifw-generator
--------------------
-
-* :manual:`cpack(1)` gained an ``IFW`` generator to package using
- Qt Framework Installer tools. See the :module:`CPackIFW` module.
diff --git a/Help/release/dev/ctest-coverage-extra.rst b/Help/release/dev/ctest-coverage-extra.rst
deleted file mode 100644
index 85d023b..0000000
--- a/Help/release/dev/ctest-coverage-extra.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-ctest-coverage-extra
---------------------
-
-* The :command:`ctest_coverage` command learned to read variable
- ``CTEST_COVERAGE_EXTRA_FLAGS`` to set ``CoverageExtraFlags``.
diff --git a/Help/release/dev/ctest-intel-coverage.rst b/Help/release/dev/ctest-intel-coverage.rst
deleted file mode 100644
index 11455a5..0000000
--- a/Help/release/dev/ctest-intel-coverage.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-ctest-intel-coverage
---------------------
-
-* The :command:`ctest_coverage` command learned to support
- Intel coverage files with the ``codecov`` tool.
diff --git a/Help/release/dev/custom-ninja-deptypes.rst b/Help/release/dev/custom-ninja-deptypes.rst
deleted file mode 100644
index 7750da8..0000000
--- a/Help/release/dev/custom-ninja-deptypes.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-custom-ninja-deptypes
----------------------
-
-* Add a `CMAKE_NINJA_DEPTYPE_<LANG>` variable so that compilers may set the
- deptype for use in Ninja other than those CMake itself knows about.
diff --git a/Help/release/dev/delay-generator-toolset.rst b/Help/release/dev/delay-generator-toolset.rst
deleted file mode 100644
index 0512834..0000000
--- a/Help/release/dev/delay-generator-toolset.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-delay-generator-toolset
------------------------
-
-* The :variable:`CMAKE_GENERATOR_TOOLSET` variable may now be
- initialized in a toolchain file specified by the
- :variable:`CMAKE_TOOLCHAIN_FILE` variable. This is useful
- when cross-compiling with the Xcode or Visual Studio
- generators.
diff --git a/Help/release/dev/export-from-obj-libs.rst b/Help/release/dev/export-from-obj-libs.rst
deleted file mode 100644
index 6d58288..0000000
--- a/Help/release/dev/export-from-obj-libs.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-export-from-obj-libs
---------------------
-
-* The :module:`GenerateExportHeader` module ``generate_export_header``
- function learned to allow use with :ref:`Object Libraries`.
diff --git a/Help/release/dev/faster-parsers.rst b/Help/release/dev/faster-parsers.rst
deleted file mode 100644
index c2a8bfb..0000000
--- a/Help/release/dev/faster-parsers.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-faster-parsers
---------------
-
-* The :manual:`cmake-language(7)` internal implementation of generator
- expression and list expansion parsers have been optimized and shows
- non-trivial speedup on large projects.
diff --git a/Help/release/dev/file-strings-encoding.rst b/Help/release/dev/file-strings-encoding.rst
deleted file mode 100644
index 9da3e47..0000000
--- a/Help/release/dev/file-strings-encoding.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-file-strings-encoding
----------------------
-
-* The :command:`file(STRINGS)` command gained a new ``ENCODING``
- option to enable extraction of ``UTF-8`` strings.
diff --git a/Help/release/dev/find-module-targets.rst b/Help/release/dev/find-module-targets.rst
deleted file mode 100644
index 98ea283..0000000
--- a/Help/release/dev/find-module-targets.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-find-module-targets
--------------------
-
-* The :module:`FindGLUT` module now provides imported targets.
-
-* The :module:`FindGLEW` module now provides imported targets.
-
-* The :module:`FindZLIB` module now provides imported targets.
diff --git a/Help/release/dev/fix-OSX-bundle-rpaths-and-Qt5.rst b/Help/release/dev/fix-OSX-bundle-rpaths-and-Qt5.rst
deleted file mode 100644
index c8246c5..0000000
--- a/Help/release/dev/fix-OSX-bundle-rpaths-and-Qt5.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-fix-OSX-bundle-rpaths-and-Qt5
------------------------------
-
-* The :module:`BundleUtilities` module learned to resolve and replace
- ``@rpath`` placeholders on OS X to correctly bundle applications
- using them.
diff --git a/Help/release/dev/generalize-LINK_ONLY.rst b/Help/release/dev/generalize-LINK_ONLY.rst
deleted file mode 100644
index 6dccbd5..0000000
--- a/Help/release/dev/generalize-LINK_ONLY.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-generalize-LINK_ONLY
---------------------
-
-* The :prop_tgt:`INTERFACE_LINK_LIBRARIES` target property now supports
- a ``$<LINK_ONLY:...>``
- :manual:`generator expression <cmake-generator-expressions(7)>`.
diff --git a/Help/release/dev/if-sanity.rst b/Help/release/dev/if-sanity.rst
deleted file mode 100644
index 6645bc4..0000000
--- a/Help/release/dev/if-sanity.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-if-sanity
----------
-
-* The :command:`if` command no longer automatically dereferences
- variables named in quoted or bracket arguments. See policy
- :policy:`CMP0054`.
diff --git a/Help/release/dev/install-messages.rst b/Help/release/dev/install-messages.rst
deleted file mode 100644
index e023ef7..0000000
--- a/Help/release/dev/install-messages.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-install-messages
-----------------
-
-* The :command:`install` command learned a ``MESSAGE_NEVER`` option
- to avoid output during installation.
-
-* The :variable:`CMAKE_INSTALL_MESSAGE` variable was introduced to
- optionally reduce output installation.
diff --git a/Help/release/dev/link-libraries-response-files.rst b/Help/release/dev/link-libraries-response-files.rst
deleted file mode 100644
index cecf7f6..0000000
--- a/Help/release/dev/link-libraries-response-files.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-link-libraries-response-files
------------------------------
-
-* The Makefile generators learned to use response files with GNU tools
- on Windows to pass library directories and names to the linker.
diff --git a/Help/release/dev/link-line-dedup.rst b/Help/release/dev/link-line-dedup.rst
deleted file mode 100644
index 6ce31e3..0000000
--- a/Help/release/dev/link-line-dedup.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-link-line-dedup
----------------
-
-* When generating linker command-lines, CMake now avoids repeating
- items corresponding to SHARED library targets.
diff --git a/Help/release/dev/module-WriteCompilerDetectionHeader.rst b/Help/release/dev/module-WriteCompilerDetectionHeader.rst
deleted file mode 100644
index 10e7b86..0000000
--- a/Help/release/dev/module-WriteCompilerDetectionHeader.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-module-WriteCompilerDetectionHeader
------------------------------------
-
-* The :module:`WriteCompilerDetectionHeader` module was added to allow
- creation of a portable header file for compiler optional feature detection.
diff --git a/Help/release/dev/msvc-compiler-pdb-files.rst b/Help/release/dev/msvc-compiler-pdb-files.rst
deleted file mode 100644
index d06d202..0000000
--- a/Help/release/dev/msvc-compiler-pdb-files.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-msvc-compiler-pdb-files
------------------------
-
-* New :prop_tgt:`COMPILE_PDB_NAME` and
- :prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY` target properties
- were introduced to specify the MSVC compiler program database
- file location (``cl /Fd``). This complements the existing
- :prop_tgt:`PDB_NAME` and :prop_tgt:`PDB_OUTPUT_DIRECTORY`
- target properties that specify the linker program database
- file location (``link /pdb``).
diff --git a/Help/release/dev/package-disable-registry.rst b/Help/release/dev/package-disable-registry.rst
deleted file mode 100644
index 1b23fde..0000000
--- a/Help/release/dev/package-disable-registry.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-package-disable-registry
-------------------------
-
-* The :command:`export(PACKAGE)` command learned to check the
- :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable to skip
- exporting the package.
-
-* The :command:`find_package` command learned to check the
- :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` and
- :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY`
- variables to skip searching the package registries.
diff --git a/Help/release/dev/string-GENEX_STRIP.rst b/Help/release/dev/string-GENEX_STRIP.rst
deleted file mode 100644
index b5b1074..0000000
--- a/Help/release/dev/string-GENEX_STRIP.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-string-GENEX_STRIP
-------------------
-
-* The :command:`string` command learned a new ``GENEX_STRIP`` subcommand
- which removes
- :manual:`generator expression <cmake-generator-expressions(7)>`.
diff --git a/Help/release/dev/string-uuid.rst b/Help/release/dev/string-uuid.rst
deleted file mode 100644
index dacf9a8..0000000
--- a/Help/release/dev/string-uuid.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-string-uuid
------------
-
-* The :command:`string` command learned a new ``UUID`` subcommand
- to generate a univerally unique identifier.
diff --git a/Help/release/dev/target-INTERFACE_SOURCES.rst b/Help/release/dev/target-INTERFACE_SOURCES.rst
deleted file mode 100644
index 4e34943..0000000
--- a/Help/release/dev/target-INTERFACE_SOURCES.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-target-INTERFACE_SOURCES
-------------------------
-
-* A new :prop_tgt:`INTERFACE_SOURCES` target property was introduced. This is
- consumed by dependent targets, which compile and link the listed sources.
diff --git a/Help/release/dev/target-SOURCES-genex.rst b/Help/release/dev/target-SOURCES-genex.rst
deleted file mode 100644
index 9a65101..0000000
--- a/Help/release/dev/target-SOURCES-genex.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-target-SOURCES-genex
---------------------
-
-* The :prop_tgt:`SOURCES` target property now contains
- :manual:`generator expression <cmake-generator-expressions(7)>`
- such as ``TARGET_OBJECTS`` when read at configure time, if
- policy :policy:`CMP0051` is ``NEW``.
-
-* The :prop_tgt:`SOURCES` target property now generally supports
- :manual:`generator expression <cmake-generator-expressions(7)>`. The
- generator expressions may be used in the :command:`add_library` and
- :command:`add_executable` commands.
diff --git a/Help/release/dev/target-SOURCES-write.rst b/Help/release/dev/target-SOURCES-write.rst
deleted file mode 100644
index a754a73..0000000
--- a/Help/release/dev/target-SOURCES-write.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-target-SOURCES-write.rst
-------------------------
-
-* It is now possible to write and append to the :prop_tgt:`SOURCES` target
- property. The :variable:`CMAKE_DEBUG_TARGET_PROPERTIES` variable may be
- used to trace the origin of sources.
diff --git a/Help/release/dev/target_sources-command.rst b/Help/release/dev/target_sources-command.rst
deleted file mode 100644
index abfb303..0000000
--- a/Help/release/dev/target_sources-command.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-target_sources-command
-----------------------
-
-* The :command:`target_sources` command was added to add to the
- :prop_tgt:`SOURCES` target property.
diff --git a/Help/release/dev/thread-sanitizer.rst b/Help/release/dev/thread-sanitizer.rst
deleted file mode 100644
index f38e8e1..0000000
--- a/Help/release/dev/thread-sanitizer.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-thread-sanitizer
-----------------
-
-* The :command:`ctest_memcheck` command learned to support
- ``ThreadSanitizer``.
diff --git a/Help/release/dev/variable_watch-no-allowed-access.rst b/Help/release/dev/variable_watch-no-allowed-access.rst
deleted file mode 100644
index ba7b4a5..0000000
--- a/Help/release/dev/variable_watch-no-allowed-access.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-variable_watch-no-allowed-access
---------------------------------
-
-* Callbacks established by the :command:`variable_watch` command will no
- longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when
- the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is
- set. Uninitialized variable accesses will always be reported as
- ``UNKNOWN_READ_ACCESS``.
diff --git a/Help/release/dev/vs-generator-platform.rst b/Help/release/dev/vs-generator-platform.rst
deleted file mode 100644
index cf2090b..0000000
--- a/Help/release/dev/vs-generator-platform.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-vs-generator-platform
----------------------
-
-* The Visual Studio generators for versions 8 (2005) and above
- learned to read the target platform name from a new
- :variable:`CMAKE_GENERATOR_PLATFORM` variable when it is
- not specified as part of the generator name. The platform
- name may be specified on the :manual:`cmake(1)` command line
- with the ``-A`` option, e.g. ``-G "Visual Studio 12 2013" -A x64``.
diff --git a/Help/release/dev/vs-masm.rst b/Help/release/dev/vs-masm.rst
deleted file mode 100644
index d7a19d0..0000000
--- a/Help/release/dev/vs-masm.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-vs-masm
--------
-
-* Visual Studio generators for VS 8 and later learned to support
- the ``ASM_MASM`` language.
diff --git a/Help/release/dev/vs-nsight-tegra-generator.rst b/Help/release/dev/vs-nsight-tegra-generator.rst
deleted file mode 100644
index 92f4236..0000000
--- a/Help/release/dev/vs-nsight-tegra-generator.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-vs-nsight-tegra-generator
--------------------------
-
-* Generators for Visual Studio 10 (2010) and above learned to generate
- projects for NVIDIA Nsight Tegra Visual Studio Edition. One may set
- the :variable:`CMAKE_SYSTEM_NAME` variable to ``Android`` on the
- :manual:`cmake(1)` command-line or in a :variable:`CMAKE_TOOLCHAIN_FILE`
- to activate this platform.
diff --git a/Help/release/dev/vs-special-source-file-properties.rst b/Help/release/dev/vs-special-source-file-properties.rst
deleted file mode 100644
index 166c4b3..0000000
--- a/Help/release/dev/vs-special-source-file-properties.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-vs-special-source-file-properties
----------------------------------
-
-* A :prop_sf:`VS_DEPLOYMENT_CONTENT` source file property was added
- to tell the Visual Studio generators to mark content for deployment
- in Windows Phone and Windows Store projects.
-
-* The Visual Studio generators learned to treat ``.hlsl`` source
- files as High Level Shading Language sources (using ``FXCompile``
- in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file
- property was added to specify the Shader Type.
diff --git a/Help/release/dev/vs-windows-apps.rst b/Help/release/dev/vs-windows-apps.rst
deleted file mode 100644
index 63dae28..0000000
--- a/Help/release/dev/vs-windows-apps.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-vs-windows-apps
----------------
-
-* The :prop_tgt:`VS_WINRT_COMPONENT` target property was created to
- tell Visual Studio generators to compile a shared library as a
- Windows Runtime (WinRT) component.
diff --git a/Help/release/dev/vs-windows-phone-and-store.rst b/Help/release/dev/vs-windows-phone-and-store.rst
deleted file mode 100644
index b44e276..0000000
--- a/Help/release/dev/vs-windows-phone-and-store.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-vs-windows-phone-and-store
---------------------------
-
-* Generators for Visual Studio 11 (2012) and above learned to generate
- projects for Windows Phone and Windows Store. One may set the
- :variable:`CMAKE_SYSTEM_NAME` variable to ``WindowsPhone``
- or ``WindowsStore`` on the :manual:`cmake(1)` command-line
- or in a :variable:`CMAKE_TOOLCHAIN_FILE` to activate these platforms.
- Also set :variable:`CMAKE_SYSTEM_VERSION` to ``8.0`` or ``8.1`` to
- specify the version of Windows to be targeted.
diff --git a/Help/release/dev/vs14-generator.rst b/Help/release/dev/vs14-generator.rst
deleted file mode 100644
index 0bda236..0000000
--- a/Help/release/dev/vs14-generator.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-vs14-generator
---------------
-
-* A :generator:`Visual Studio 14` generator was added.
diff --git a/Help/release/dev/wix-acl.rst b/Help/release/dev/wix-acl.rst
deleted file mode 100644
index bf146d0..0000000
--- a/Help/release/dev/wix-acl.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-wix-acl
--------
-
-* The :manual:`cpack(1)` ``WiX`` generator learned to support
- a :prop_inst:`CPACK_WIX_ACL` installed file property to
- specify an Access Control List.
diff --git a/Help/release/dev/xcode-file-type.rst b/Help/release/dev/xcode-file-type.rst
deleted file mode 100644
index 6f637f7..0000000
--- a/Help/release/dev/xcode-file-type.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-xcode-file-type
----------------
-
-* The :generator:`Xcode` generator learned to check source
- file properties :prop_sf:`XCODE_EXPLICIT_FILE_TYPE` and
- :prop_sf:`XCODE_LAST_KNOWN_FILE_TYPE` for a custom Xcode
- file reference type.
diff --git a/Help/release/index.rst b/Help/release/index.rst
index 15ce065..abc19b8 100644
--- a/Help/release/index.rst
+++ b/Help/release/index.rst
@@ -13,4 +13,5 @@ Releases
.. toctree::
:maxdepth: 1
+ 3.1.0 <3.1.0>
3.0.0 <3.0.0>
diff --git a/Help/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS.rst b/Help/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS.rst
new file mode 100644
index 0000000..2de5fb6
--- /dev/null
+++ b/Help/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS.rst
@@ -0,0 +1,5 @@
+CTEST_MEMORYCHECK_SANITIZER_OPTIONS
+-----------------------------------
+
+Specify the CTest ``MemoryCheckSanitizerOptions`` setting
+in a :manual:`ctest(1)` dashboard client script.
diff --git a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst
index f7875da..f1087c0 100644
--- a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst
+++ b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst
@@ -1,6 +1,7 @@
CTEST_MEMORYCHECK_TYPE
--------------------------
+----------------------
Specify the CTest ``MemoryCheckType`` setting
in a :manual:`ctest(1)` dashboard client script.
-Valid values are Valgrind, Purify, BoundsChecker, and ThreadSanitizer.
+Valid values are Valgrind, Purify, BoundsChecker, and ThreadSanitizer,
+AddressSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer.
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 6b425c6..937aa8c 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -108,7 +108,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)
# Set old compiler and platform id variables.
- if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUCC 1)
endif()
if("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
@@ -131,11 +131,11 @@ endif ()
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)(clang|g?cc)(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
+ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(CMAKE_C_COMPILER_TARGET)
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-)
endif()
@@ -150,7 +150,7 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif ()
- elseif("${CMAKE_C_COMPILER_ID}" MATCHES "TI")
+ elseif(CMAKE_C_COMPILER_ID MATCHES "TI")
# TI compilers are named e.g. cl6x, cl470 or armcl.exe
get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+)?cl([^.]+)?(\\.exe)?$")
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index a7b5760..9ab159a 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -48,7 +48,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang})
endif()
- if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL GNU)
+ if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
execute_process(
COMMAND "${CMAKE_${lang}_COMPILER}"
-V
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 96df6a2..a4bb86c 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -152,12 +152,12 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
endif()
# Set old compiler and platform id variables.
- if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUG77 1)
endif()
- if("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
+ if(CMAKE_Fortran_PLATFORM_ID MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
- elseif("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin")
+ elseif(CMAKE_Fortran_PLATFORM_ID MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif()
endif()
@@ -175,7 +175,7 @@ endif ()
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
get_filename_component(COMPILER_BASENAME "${CMAKE_Fortran_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)g?fortran(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 365d381..92b0d1d 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -90,7 +90,7 @@ set(ENV{LANG} C)
# Now check for C, works for gcc and Intel compiler at least
if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
- if ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel OR "${CMAKE_C_COMPILER_ID}" MATCHES Clang)
+ if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Intel OR CMAKE_C_COMPILER_ID MATCHES Clang)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index e0ba131..50cb972 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -30,12 +30,12 @@
# License text for the above reference.)
# if it's the MS C/CXX compiler, search for link
-if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC"
- OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC"
- OR "${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "MSVC"
- OR "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC"
- OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
- OR ("${CMAKE_GENERATOR}" MATCHES "Visual Studio"
+if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC"
+ OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"
+ OR CMAKE_Fortran_SIMULATE_ID STREQUAL "MSVC"
+ OR CMAKE_C_COMPILER_ID STREQUAL "MSVC"
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"
+ OR (CMAKE_GENERATOR MATCHES "Visual Studio"
AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android"))
find_program(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
diff --git a/Modules/CMakeForceCompiler.cmake b/Modules/CMakeForceCompiler.cmake
index 0e6b5af..1d8b110 100644
--- a/Modules/CMakeForceCompiler.cmake
+++ b/Modules/CMakeForceCompiler.cmake
@@ -70,7 +70,7 @@ macro(CMAKE_FORCE_C_COMPILER compiler id)
set(CMAKE_C_COMPILER_FORCED TRUE)
# Set old compiler id variables.
- if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUCC 1)
endif()
endmacro()
@@ -94,7 +94,7 @@ macro(CMAKE_FORCE_Fortran_COMPILER compiler id)
set(CMAKE_Fortran_COMPILER_FORCED TRUE)
# Set old compiler id variables.
- if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUG77 1)
endif()
endmacro()
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index 8463b5d..4b8dc1e 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -25,6 +25,8 @@
# and Mac OS X.
#
# To use CPack ``IFW`` generator you must also install QtIFW_.
+# If you are not using the default path for the installation, please set
+# the path to the variable ``QTIFWDIR``.
#
# Variables
# ^^^^^^^^^
@@ -83,6 +85,19 @@
# The root package name, which will be used if configuration group is not
# specified
#
+# .. variable:: CPACK_IFW_REPOSITORIES_ALL
+#
+# The list of remote repositories.
+#
+# The default value of this variable is computed by CPack and contains
+# all repositories added with command :command:`cpack_ifw_add_repository`
+#
+# .. variable:: CPACK_IFW_DOWNLOAD_ALL
+#
+# If this is ``ON`` all components will be downloaded.
+# By default is ``OFF`` or used value
+# from :variable:`CPACK_DOWNLOAD_ALL` if set
+#
# Components
# """"""""""
#
@@ -95,7 +110,7 @@
# Additional prepared packages dirs that will be used to resolve
# dependent components.
#
-# Advanced
+# Tools
# """"""""
#
# .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE
@@ -104,20 +119,12 @@
#
# This variable is cached and can be configured user if need.
#
-# .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND
-#
-# True if the "binarycreator" command line client was found.
-#
# .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE
#
# The path to "repogen" command line client.
#
# This variable is cached and can be configured user if need.
#
-# .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE_FOUND
-#
-# True if the "repogen" command line client was found.
-#
# Commands
# ^^^^^^^^^
#
@@ -191,6 +198,33 @@
# ``LICENSES`` pair of <display_name> and <file_path> of license text for this
# component group. You can specify more then one license.
#
+# --------------------------------------------------------------------------
+#
+# .. command:: cpack_ifw_add_repository
+#
+# Add QtIFW_ specific remote repository.
+#
+# ::
+#
+# cpack_ifw_add_repository(<reponame> [DISABLED]
+# URL <url>
+# [USERNAME <username>]
+# [PASSWORD <password>]
+# [DISPLAY_NAME <display_name>])
+#
+# This macro will also add the <reponame> repository
+# to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL`
+#
+# ``DISABLED`` if set, then the repository will be disabled by default.
+#
+# ``URL`` is points to a list of available components.
+#
+# ``USERNAME`` is used as user on a protected repository.
+#
+# ``PASSWORD`` is password to use on a protected repository.
+#
+# ``DISPLAY_NAME`` is string to display instead of the URL.
+#
# Example usage
# ^^^^^^^^^^^^^
#
@@ -198,7 +232,7 @@
#
# set(CPACK_PACKAGE_NAME "MyPackage")
# set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MyPackage Installation Example")
-# set(CPACK_PACKAGE_VERSION "1.0.0")
+# set(CPACK_PACKAGE_VERSION "1.0.0") # Version of installer
#
# include(CPack)
# include(CPackIFW)
@@ -207,8 +241,15 @@
# DISPLAY_NAME "MyApp"
# DESCRIPTION "My Application")
# cpack_ifw_configure_component(myapp
-# VERSION "1.2.3"
+# VERSION "1.2.3" # Version of component
# SCRIPT "operations.qs")
+# cpack_add_component(mybigplugin
+# DISPLAY_NAME "MyBigPlugin"
+# DESCRIPTION "My Big Downloadable Plugin"
+# DOWNLOADED)
+# cpack_ifw_add_repository(myrepo
+# URL "http://example.com/ifw/repo/myapp"
+# DISPLAY_NAME "My Application Repository")
#
#
# Online installer
@@ -223,8 +264,11 @@
# Then you would use the command :command:`cpack_configure_downloads`.
# If you set ``ALL`` option all components will be downloaded.
#
+# You also can use command :command:`cpack_ifw_add_repository` and
+# variable :variable:`CPACK_IFW_DOWNLOAD_ALL` for more specific configuration.
+#
# CPack IFW generator create "repository" dir in current binary dir. You
-# would copy content of this dir to specified ``site``.
+# would copy content of this dir to specified ``site`` (``url``).
#
# See Also
# ^^^^^^^^
@@ -264,48 +308,41 @@
# Default path
+set(_CPACK_IFW_PATHS
+ "${QTIFWDIR}"
+ "$ENV{QTIFWDIR}"
+ "${QTDIR}"
+ "$ENV{QTIFWDIR}")
if(WIN32)
- set(_CPACK_IFW_PATHS
- "$ENV{HOMEDRIVE}/Qt"
- "C:/Qt"
- )
+ list(APPEND _CPACK_IFW_PATHS
+ "$ENV{HOMEDRIVE}/Qt"
+ "C:/Qt")
else()
- set(_CPACK_IFW_PATHS
- "$ENV{HOME}/Qt"
- "/opt/Qt"
- )
+ list(APPEND _CPACK_IFW_PATHS
+ "$ENV{HOME}/Qt"
+ "/opt/Qt")
endif()
set(_CPACK_IFW_SUFFIXES
- "QtIFW-1.7.0/bin"
- "QtIFW-1.6.0/bin"
- "QtIFW-1.5.0/bin"
- "QtIFW-1.4.0/bin"
- "QtIFW-1.3.0/bin"
-)
+ "bin"
+ "QtIFW-1.7.0/bin"
+ "QtIFW-1.6.0/bin"
+ "QtIFW-1.5.0/bin"
+ "QtIFW-1.4.0/bin"
+ "QtIFW-1.3.0/bin")
# Look for 'binarycreator'
-if(NOT CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND)
-
find_program(CPACK_IFW_BINARYCREATOR_EXECUTABLE
NAMES binarycreator
PATHS ${_CPACK_IFW_PATHS}
PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
- DOC "QtIFW binarycreator command line client"
- )
-mark_as_advanced(CPACK_IFW_BINARYCREATOR_EXECUTABLE)
-
-if(EXISTS ${CPACK_IFW_BINARYCREATOR_EXECUTABLE})
- set(CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND 1)
-endif()
+ DOC "QtIFW binarycreator command line client")
-endif() # NOT CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND
+mark_as_advanced(CPACK_IFW_BINARYCREATOR_EXECUTABLE)
# Look for 'repogen'
-if(NOT CPACK_IFW_REPOGEN_EXECUTABLE_FOUND)
-
find_program(CPACK_IFW_REPOGEN_EXECUTABLE
NAMES repogen
PATHS ${_CPACK_IFW_PATHS}
@@ -314,12 +351,6 @@ find_program(CPACK_IFW_REPOGEN_EXECUTABLE
)
mark_as_advanced(CPACK_IFW_REPOGEN_EXECUTABLE)
-if(EXISTS ${CPACK_IFW_REPOGEN_EXECUTABLE})
- set(CPACK_IFW_REPOGEN_EXECUTABLE_FOUND 1)
-endif()
-
-endif() # NOT CPACK_IFW_REPOGEN_EXECUTABLE_FOUND
-
#
## Next code is included only once
#
@@ -444,4 +475,43 @@ macro(cpack_ifw_configure_component_group grpname)
endif()
endmacro()
+# Macro for adding repository
+macro(cpack_ifw_add_repository reponame)
+
+ string(TOUPPER ${reponame} _CPACK_IFWREPO_UNAME)
+
+ set(_IFW_OPT DISABLED)
+ set(_IFW_ARGS URL USERNAME PASSWORD DISPLAY_NAME)
+ set(_IFW_MULTI_ARGS)
+ cmake_parse_arguments(CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
+
+ set(_CPACK_IFWREPO_STR "\n# Configuration for IFW repository \"${reponame}\"\n")
+
+ foreach(_IFW_ARG_NAME ${_IFW_OPT})
+ cpack_append_option_set_command(
+ CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
+ _CPACK_IFWREPO_STR)
+ endforeach()
+
+ foreach(_IFW_ARG_NAME ${_IFW_ARGS})
+ cpack_append_string_variable_set_command(
+ CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
+ _CPACK_IFWREPO_STR)
+ endforeach()
+
+ foreach(_IFW_ARG_NAME ${_IFW_MULTI_ARGS})
+ cpack_append_variable_set_command(
+ CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
+ _CPACK_IFWREPO_STR)
+ endforeach()
+
+ list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame})
+ set(_CPACK_IFWREPO_STR "${_CPACK_IFWREPO_STR}list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame})\n")
+
+ if(CPack_CMake_INCLUDED)
+ file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWREPO_STR}")
+ endif()
+
+endmacro()
+
endif() # NOT CPackIFW_CMake_INCLUDED
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 2864b21..e86cc98 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -29,6 +29,7 @@
# However as a handy reminder here comes the list of specific variables:
#
# .. variable:: CPACK_RPM_PACKAGE_SUMMARY
+# CPACK_RPM_<component>_PACKAGE_SUMMARY
#
# The RPM package summary.
#
@@ -100,11 +101,13 @@
# * Default : -
#
# .. variable:: CPACK_RPM_PACKAGE_DESCRIPTION
+# CPACK_RPM_<component>_PACKAGE_DESCRIPTION
#
# RPM package description.
#
# * Mandatory : YES
-# * Default : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package
+# * Default : CPACK_COMPONENT_<compName>_DESCRIPTION (component based installers
+# only) if set, CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package
# description available"
#
# .. variable:: CPACK_RPM_COMPRESSION_TYPE
@@ -414,6 +417,7 @@ endif()
# Are we packaging components ?
if(CPACK_RPM_PACKAGE_COMPONENT)
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
+ string(TOUPPER ${CPACK_RPM_PACKAGE_COMPONENT} CPACK_RPM_PACKAGE_COMPONENT_UPPER)
else()
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
endif()
@@ -430,12 +434,31 @@ set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACK
#
# CPACK_RPM_PACKAGE_SUMMARY (mandatory)
+
+# CPACK_RPM_PACKAGE_SUMMARY_ is used only locally so that it can be unset each time before use otherwise
+# component packaging could leak variable content between components
+unset(CPACK_RPM_PACKAGE_SUMMARY_)
+if(CPACK_RPM_PACKAGE_SUMMARY)
+ set(CPACK_RPM_PACKAGE_SUMMARY_ ${CPACK_RPM_PACKAGE_SUMMARY})
+ unset(CPACK_RPM_PACKAGE_SUMMARY)
+endif()
+
+#Check for component summary first.
+#If not set, it will use regular package summary logic.
+if(CPACK_RPM_PACKAGE_COMPONENT)
+ if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_SUMMARY)
+ set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_SUMMARY})
+ endif()
+endif()
+
if(NOT CPACK_RPM_PACKAGE_SUMMARY)
- # if neither var is defined lets use the name as summary
- if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
- string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY)
- else()
+ if(CPACK_RPM_PACKAGE_SUMMARY_)
+ set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_RPM_PACKAGE_SUMMARY_})
+ elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY)
set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+ else()
+ # if neither var is defined lets use the name as summary
+ string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY)
endif()
endif()
@@ -508,12 +531,33 @@ endif()
# if it is defined
# - set to a default value
#
-if (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
- if (CPACK_PACKAGE_DESCRIPTION_FILE)
- file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION)
- else ()
- set(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available")
- endif ()
+
+# CPACK_RPM_PACKAGE_DESCRIPTION_ is used only locally so that it can be unset each time before use otherwise
+# component packaging could leak variable content between components
+unset(CPACK_RPM_PACKAGE_DESCRIPTION_)
+if(CPACK_RPM_PACKAGE_DESCRIPTION)
+ set(CPACK_RPM_PACKAGE_DESCRIPTION_ ${CPACK_RPM_PACKAGE_DESCRIPTION})
+ unset(CPACK_RPM_PACKAGE_DESCRIPTION)
+endif()
+
+#Check for a component description first.
+#If not set, it will use regular package description logic.
+if(CPACK_RPM_PACKAGE_COMPONENT)
+ if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_DESCRIPTION)
+ set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_DESCRIPTION})
+ elseif(CPACK_COMPONENT_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_DESCRIPTION)
+ set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_COMPONENT_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_DESCRIPTION})
+ endif()
+endif()
+
+if(NOT CPACK_RPM_PACKAGE_DESCRIPTION)
+ if(CPACK_RPM_PACKAGE_DESCRIPTION_)
+ set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_RPM_PACKAGE_DESCRIPTION_})
+ elseif(CPACK_PACKAGE_DESCRIPTION_FILE)
+ file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION)
+ else ()
+ set(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available")
+ endif ()
endif ()
# CPACK_RPM_COMPRESSION_TYPE
@@ -1100,3 +1144,15 @@ else()
message(FATAL_ERROR "RPM packaging through alien not done (yet)")
endif()
endif()
+
+# reset variables from temporary variables
+if(CPACK_RPM_PACKAGE_SUMMARY_)
+ set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_RPM_PACKAGE_SUMMARY_})
+else()
+ unset(CPACK_RPM_PACKAGE_SUMMARY)
+endif()
+if(CPACK_RPM_PACKAGE_DESCRIPTION_)
+ set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_RPM_PACKAGE_DESCRIPTION_})
+else()
+ unset(CPACK_RPM_PACKAGE_DESCRIPTION)
+endif()
diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake
index 880a688..c8949cf 100644
--- a/Modules/CheckStructHasMember.cmake
+++ b/Modules/CheckStructHasMember.cmake
@@ -70,7 +70,7 @@ ${_INCLUDE_FILES}
int main()
{
${_STRUCT}* tmp;
- tmp->${_MEMBER};
+ (void) tmp->${_MEMBER};
return 0;
}
")
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 86049d0..37a0a40 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -75,6 +75,7 @@ PurifyCommand: @PURIFYCOMMAND@
ValgrindCommand: @VALGRIND_COMMAND@
ValgrindCommandOptions: @VALGRIND_COMMAND_OPTIONS@
MemoryCheckType: @MEMORYCHECK_TYPE@
+MemoryCheckSanitizerOptions: @MEMORYCHECK_SANITIZER_OPTIONS@
MemoryCheckCommand: @MEMORYCHECK_COMMAND@
MemoryCheckCommandOptions: @MEMORYCHECK_COMMAND_OPTIONS@
MemoryCheckSuppressionFile: @MEMORYCHECK_SUPPRESSIONS_FILE@
diff --git a/Modules/FindBacktrace.cmake b/Modules/FindBacktrace.cmake
index 5620661..07109b0 100644
--- a/Modules/FindBacktrace.cmake
+++ b/Modules/FindBacktrace.cmake
@@ -44,7 +44,7 @@
include(CMakePushCheckState)
include(CheckSymbolExists)
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# List of variables to be provided to find_package_handle_standard_args()
set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 0eec4ad..3642b3e 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -375,9 +375,9 @@ endfunction()
# Guesses Boost's compiler prefix used in built library names
# Returns the guess by setting the variable pointed to by _ret
function(_Boost_GUESS_COMPILER_PREFIX _ret)
- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel"
+ OR CMAKE_CXX_COMPILER MATCHES "icl"
+ OR CMAKE_CXX_COMPILER MATCHES "icpc")
if(WIN32)
set (_boost_COMPILER "-iw")
else()
@@ -403,7 +403,7 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
set(_boost_COMPILER "-vc6") # yes, this is correct
elseif (BORLAND)
set(_boost_COMPILER "-bcb")
- elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
set(_boost_COMPILER "-sw")
elseif (MINGW)
if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake
deleted file mode 100644
index c9d39eb..0000000
--- a/Modules/FindITK.cmake
+++ /dev/null
@@ -1,61 +0,0 @@
-#.rst:
-# FindITK
-# -------
-#
-# Find an ITK installation or build tree.
-
-# When ITK is found, the ITKConfig.cmake file is sourced to setup the
-# location and configuration of ITK. Please read this file, or
-# ITKConfig.cmake.in from the ITK source tree for the full list of
-# definitions. Of particular interest is ITK_USE_FILE, a CMake source file
-# that can be included to set the include directories, library directories,
-# and preprocessor macros. In addition to the variables read from
-# ITKConfig.cmake, this find module also defines
-# ITK_DIR - The directory containing ITKConfig.cmake.
-# This is either the root of the build tree,
-# or the lib/InsightToolkit directory.
-# This is the only cache entry.
-#
-# ITK_FOUND - Whether ITK was found. If this is true,
-# ITK_DIR is okay.
-#
-# USE_ITK_FILE - The full path to the UseITK.cmake file.
-# This is provided for backward
-# compatibility. Use ITK_USE_FILE
-# instead.
-
-#=============================================================================
-# Copyright 2001-2010 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# Use the Config mode of the find_package() command to find ITKConfig.
-# If this succeeds (possibly because ITK_DIR is already set), the
-# command will have already loaded ITKConfig.cmake and set ITK_FOUND.
-if(NOT ITK_FOUND)
- set(_ITK_REQUIRED "")
- if(ITK_FIND_REQUIRED)
- set(_ITK_REQUIRED REQUIRED)
- endif()
- set(_ITK_QUIET "")
- if(ITK_FIND_QUIETLY)
- set(_ITK_QUIET QUIET)
- endif()
- find_package(ITK ${_ITK_REQUIRED} ${_ITK_QUIET} NO_MODULE
- NAMES ITK InsightToolkit
- CONFIGS ITKConfig.cmake
- )
-endif()
-
-if(ITK_FOUND)
- # Set USE_ITK_FILE for backward-compatibility.
- set(USE_ITK_FILE ${ITK_USE_FILE})
-endif()
diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake
index 60a4107..55528b8 100644
--- a/Modules/FindIce.cmake
+++ b/Modules/FindIce.cmake
@@ -334,7 +334,7 @@ endfunction()
_Ice_FIND()
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ice
FOUND_VAR Ice_FOUND
REQUIRED_VARS Ice_SLICE2CPP_EXECUTABLE
diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake
index 62eedd6..e353d38 100644
--- a/Modules/FindLATEX.cmake
+++ b/Modules/FindLATEX.cmake
@@ -104,7 +104,7 @@ find_program(DVIPDF_CONVERTER
if (WIN32)
find_program(PS2PDF_CONVERTER
- NAMES ps2pdf14.bat ps2pdf
+ NAMES ps2pdf14.bat ps2pdf14 ps2pdf
PATHS ${GHOSTSCRIPT_LIBRARY_PATH}
${MIKTEX_BINARY_PATH}
)
diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake
index cc35e54..731f5f2 100644
--- a/Modules/FindLua.cmake
+++ b/Modules/FindLua.cmake
@@ -56,7 +56,7 @@ function(set_lua_version_vars)
if (Lua_FIND_VERSION_EXACT)
if (Lua_FIND_VERSION_COUNT GREATER 1)
- set(lua_append_versions ${Lua_FIND_VERSION_MAJOR} ${Lua_FIND_VERSION_MINOR})
+ set(lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR})
endif ()
elseif (Lua_FIND_VERSION)
# once there is a different major version supported this should become a loop
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 3be5e3c..ba4ea5b 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -160,7 +160,7 @@ set(_MPI_XL_Fortran_COMPILER_NAMES mpixlf95 mpixlf95_r mpxlf95 mpxlf95
# or if we know it matches the regular compiler.
foreach (lang C CXX Fortran)
foreach (id GNU Intel PGI XL)
- if (NOT CMAKE_${lang}_COMPILER_ID OR "${CMAKE_${lang}_COMPILER_ID}" STREQUAL "${id}")
+ if (NOT CMAKE_${lang}_COMPILER_ID OR CMAKE_${lang}_COMPILER_ID STREQUAL id)
list(APPEND _MPI_${lang}_COMPILER_NAMES ${_MPI_${id}_${lang}_COMPILER_NAMES})
endif()
unset(_MPI_${id}_${lang}_COMPILER_NAMES) # clean up the namespace here
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index e8d1dfb..23f3f05 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -284,18 +284,47 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# version handling:
set(VERSION_MSG "")
set(VERSION_OK TRUE)
- set(VERSION ${${FPHSA_VERSION_VAR}} )
- if (${_NAME}_FIND_VERSION)
+ set(VERSION ${${FPHSA_VERSION_VAR}})
- if(VERSION)
+ # check with DEFINED here as the requested or found version may be "0"
+ if (DEFINED ${_NAME}_FIND_VERSION)
+ if(DEFINED ${FPHSA_VERSION_VAR})
if(${_NAME}_FIND_VERSION_EXACT) # exact version required
- if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
- set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
- set(VERSION_OK FALSE)
+ # count the dots in the version string
+ string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${VERSION}")
+ # add one dot because there is one dot more than there are components
+ string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS)
+ if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT)
+ # Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT
+ # is at most 4 here. Therefore a simple lookup table is used.
+ if (${_NAME}_FIND_VERSION_COUNT EQUAL 1)
+ set(_VERSION_REGEX "[^.]*")
+ elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2)
+ set(_VERSION_REGEX "[^.]*\\.[^.]*")
+ elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3)
+ set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*")
+ else ()
+ set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*")
+ endif ()
+ string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${VERSION}")
+ unset(_VERSION_REGEX)
+ if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD)
+ set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+ set(VERSION_OK FALSE)
+ else ()
+ set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+ endif ()
+ unset(_VERSION_HEAD)
else ()
- set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+ if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+ set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+ set(VERSION_OK FALSE)
+ else ()
+ set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+ endif ()
endif ()
+ unset(_VERSION_DOTS)
else() # minimum version specified:
if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index 4076521..2b7fd22 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -201,7 +201,7 @@ else()
endif()
# record if Squish was found
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(Squish REQUIRED_VARS SQUISH_INSTALL_DIR SQUISH_CLIENT_EXECUTABLE SQUISH_SERVER_EXECUTABLE
VERSION_VAR SQUISH_VERSION )
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index 6050dcd..a0bc4d1 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -14,14 +14,32 @@
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
#
+# The following import target is created
+#
+# ::
+#
+# Threads::Threads
+#
# For systems with multiple thread libraries, caller can set
#
# ::
#
# CMAKE_THREAD_PREFER_PTHREAD
+#
+# If the use of the -pthread compiler and linker flag is prefered then the
+# caller can set
+#
+# ::
+#
+# THREADS_PREFER_PTHREAD_FLAG
+#
+# Please note that the compiler flag can only be used with the imported
+# target. Use of both the imported target as well as this switch is highly
+# recommended for new code.
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
+# Copyright 2011-2014 Rolf Eike Beer <eike@sf-mail.de>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -45,6 +63,58 @@ if(CMAKE_SYSTEM_NAME MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD)
CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
endif()
+# Internal helper macro.
+# Do NOT even think about using it outside of this file!
+macro(_check_threads_lib LIBNAME FUNCNAME VARNAME)
+ if(NOT Threads_FOUND)
+ CHECK_LIBRARY_EXISTS(${LIBNAME} ${FUNCNAME} "" ${VARNAME})
+ if(${VARNAME})
+ set(CMAKE_THREAD_LIBS_INIT "-l${LIBNAME}")
+ set(CMAKE_HAVE_THREADS_LIBRARY 1)
+ set(Threads_FOUND TRUE)
+ endif()
+ endif ()
+endmacro()
+
+# Internal helper macro.
+# Do NOT even think about using it outside of this file!
+macro(_check_pthreads_flag)
+ if(NOT Threads_FOUND)
+ # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread
+ if(NOT DEFINED THREADS_HAVE_PTHREAD_ARG)
+ message(STATUS "Check if compiler accepts -pthread")
+ try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_LIST_DIR}/CheckForPthreads.c
+ CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread
+ COMPILE_OUTPUT_VARIABLE OUTPUT)
+
+ if(THREADS_HAVE_PTHREAD_ARG)
+ if(THREADS_PTHREAD_ARG STREQUAL "2")
+ set(Threads_FOUND TRUE)
+ message(STATUS "Check if compiler accepts -pthread - yes")
+ else()
+ message(STATUS "Check if compiler accepts -pthread - no")
+ file(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n")
+ endif()
+ else()
+ message(STATUS "Check if compiler accepts -pthread - no")
+ file(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n")
+ endif()
+
+ endif()
+
+ if(THREADS_HAVE_PTHREAD_ARG)
+ set(Threads_FOUND TRUE)
+ set(CMAKE_THREAD_LIBS_INIT "-pthread")
+ endif()
+ endif()
+endmacro()
+
if(CMAKE_HAVE_SPROC_H AND NOT CMAKE_THREAD_PREFER_PTHREAD)
# We have sproc
set(CMAKE_USE_SPROC_INIT 1)
@@ -67,69 +137,23 @@ else()
set(Threads_FOUND TRUE)
else()
- # Do we have -lpthreads
- CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE)
- if(CMAKE_HAVE_PTHREADS_CREATE)
- set(CMAKE_THREAD_LIBS_INIT "-lpthreads")
- set(CMAKE_HAVE_THREADS_LIBRARY 1)
- set(Threads_FOUND TRUE)
- else()
-
- # Ok, how about -lpthread
- CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE)
- if(CMAKE_HAVE_PTHREAD_CREATE)
- set(CMAKE_THREAD_LIBS_INIT "-lpthread")
- set(CMAKE_HAVE_THREADS_LIBRARY 1)
- set(Threads_FOUND TRUE)
+ # Check for -pthread first if enabled. This is the recommended
+ # way, but not backwards compatible as one must also pass -pthread
+ # as compiler flag then.
+ if (THREADS_PREFER_PTHREAD_FLAG)
+ _check_pthreads_flag()
+ endif ()
- elseif(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ _check_threads_lib(pthreads pthread_create CMAKE_HAVE_PTHREADS_CREATE)
+ _check_threads_lib(pthread pthread_create CMAKE_HAVE_PTHREAD_CREATE)
+ if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
# On sun also check for -lthread
- CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE)
- if(CMAKE_HAVE_THR_CREATE)
- set(CMAKE_THREAD_LIBS_INIT "-lthread")
- set(CMAKE_HAVE_THREADS_LIBRARY 1)
- set(Threads_FOUND TRUE)
- endif()
- endif()
+ _check_threads_lib(thread thr_create CMAKE_HAVE_THR_CREATE)
endif()
endif()
endif()
- if(NOT CMAKE_HAVE_THREADS_LIBRARY)
- # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread
- if("x${THREADS_HAVE_PTHREAD_ARG}" STREQUAL "x")
- message(STATUS "Check if compiler accepts -pthread")
- try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/CheckForPthreads.c
- CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread
- COMPILE_OUTPUT_VARIABLE OUTPUT)
-
- if(THREADS_HAVE_PTHREAD_ARG)
- if(THREADS_PTHREAD_ARG STREQUAL "2")
- set(Threads_FOUND TRUE)
- message(STATUS "Check if compiler accepts -pthread - yes")
- else()
- message(STATUS "Check if compiler accepts -pthread - no")
- file(APPEND
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n")
- endif()
- else()
- message(STATUS "Check if compiler accepts -pthread - no")
- file(APPEND
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n")
- endif()
-
- endif()
-
- if(THREADS_HAVE_PTHREAD_ARG)
- set(Threads_FOUND TRUE)
- set(CMAKE_THREAD_LIBS_INIT "-pthread")
- endif()
-
- endif()
+ _check_pthreads_flag()
endif()
endif()
@@ -178,3 +202,15 @@ endif()
set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE})
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND)
+
+if(THREADS_FOUND AND NOT TARGET Threads::Threads)
+ add_library(Threads::Threads INTERFACE IMPORTED)
+
+ if(THREADS_HAVE_PTHREAD_ARG)
+ set_property(TARGET Threads::Threads PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread")
+ endif()
+
+ if(CMAKE_THREAD_LIBS_INIT)
+ set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
+ endif()
+endif()
diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake
deleted file mode 100644
index 60f48dd..0000000
--- a/Modules/FindVTK.cmake
+++ /dev/null
@@ -1,66 +0,0 @@
-#.rst:
-# FindVTK
-# -------
-#
-# Find a VTK installation or build tree.
-#
-# The following variables are set if VTK is found. If VTK is not found,
-# VTK_FOUND is set to false.
-#
-# ::
-#
-# VTK_FOUND - Set to true when VTK is found.
-#
-# The following cache entries must be set by the user to locate VTK:
-#
-# ::
-#
-# VTK_DIR - The directory containing VTKConfig.cmake.
-# This is either the root of the build tree,
-# or the lib/vtk directory. This is the
-# only cache entry.
-#
-# The following variables are set for backward compatibility and should
-# not be used in new code:
-#
-# ::
-#
-# USE_VTK_FILE - The full path to the UseVTK.cmake file.
-# This is provided for backward
-# compatibility. Use VTK_USE_FILE
-# instead.
-
-#=============================================================================
-# Copyright 2001-2014 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# Use the Config mode of the find_package() command to find VTKConfig.
-# If this succeeds (possibly because VTK_DIR is already set), the
-# command will have already loaded VTKConfig.cmake and set VTK_FOUND.
-if(NOT VTK_FOUND)
- set(_VTK_REQUIRED "")
- if(VTK_FIND_REQUIRED)
- set(_VTK_REQUIRED REQUIRED)
- endif()
- set(_VTK_QUIET "")
- if(VTK_FIND_QUIETLY)
- set(_VTK_QUIET QUIET)
- endif()
- find_package(VTK ${_VTK_REQUIRED} ${_VTK_QUIET} NO_MODULE)
- unset(_VTK_REQUIRED)
- unset(_VTK_QUIET)
-endif()
-
-if(VTK_FOUND)
- # Set USE_VTK_FILE for backward-compatibility.
- set(USE_VTK_FILE ${VTK_USE_FILE})
-endif()
diff --git a/Modules/FindXerces.cmake b/Modules/FindXerces.cmake
index 325bb6d..6c6007a 100644
--- a/Modules/FindXerces.cmake
+++ b/Modules/FindXerces.cmake
@@ -70,7 +70,7 @@ if(Xerces_INCLUDE_DIR)
_Xerces_GET_VERSION("${Xerces_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp")
endif()
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xerces
FOUND_VAR Xerces_FOUND
REQUIRED_VARS Xerces_LIBRARY
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt
index b6232ed..721a262 100644
--- a/Modules/FortranCInterface/CMakeLists.txt
+++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -71,7 +71,7 @@ endif()
# Generate C symbol sources.
set(symbol_sources)
-if(NOT "${CMAKE_Fortran_COMPILER_ID}" MATCHES "^(PathScale|Cray)$")
+if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(PathScale|Cray)$")
# Provide mymodule_ and my_module_ init symbols because:
# - PGI Fortran uses module init symbols
# but not for:
diff --git a/Modules/Platform/eCos.cmake b/Modules/Platform/eCos.cmake
index a203826..e1279ef 100644
--- a/Modules/Platform/eCos.cmake
+++ b/Modules/Platform/eCos.cmake
@@ -28,7 +28,7 @@ include(Platform/UnixPaths)
# eCos can be built only with gcc
get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
-if(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
+if(CMAKE_C_COMPILER AND NOT CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT _IN_TC)
message(FATAL_ERROR "GNU gcc is required for eCos")
endif()
if(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 127012f..3a6acd8 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -398,7 +398,7 @@ function(add_jar _TARGET_NAME)
${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}
)
- if (WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+ if (CMAKE_HOST_WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
else ()
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 31ab48d..bab1b21 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -272,6 +272,8 @@ macro(SWIG_ADD_MODULE name language)
if(WIN32 AND NOT CYGWIN)
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
endif()
+ elseif ("${swig_lowercase_language}" STREQUAL "r")
+ set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
elseif ("${swig_lowercase_language}" STREQUAL "ruby")
# In ruby you want:
# require 'LIBRARY'
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index f9405b3..97f4a89 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -473,7 +473,7 @@ set(SRCS ${SRCS}
cmNinjaUtilityTargetGenerator.cxx
cmNinjaUtilityTargetGenerator.h
)
-if(WIN32 AND NOT CYGWIN AND NOT BORLAND)
+if(WIN32 AND NOT CYGWIN)
set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
add_executable(cmcldeps cmcldeps.cxx)
target_link_libraries(cmcldeps CMakeLib)
@@ -524,6 +524,7 @@ set(CTEST_SRCS cmCTest.cxx
CTest/cmParseJacocoCoverage.cxx
CTest/cmParsePHPCoverage.cxx
CTest/cmParseCoberturaCoverage.cxx
+ CTest/cmParseDelphiCoverage.cxx
CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
CTest/cmCTestGenericHandler.cxx
CTest/cmCTestHandlerCommand.cxx
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c5303ce..556660a 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
-set(CMake_VERSION_MINOR 0)
-set(CMake_VERSION_PATCH 20140930)
+set(CMake_VERSION_MINOR 1)
+set(CMake_VERSION_PATCH 20141022)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index 732938b..7f06e2d 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -56,7 +56,7 @@ int cmCPackIFWGenerator::PackageFiles()
ifwTmpFile += "/IFWOutput.log";
// Run repogen
- if (!DownloadSite.empty())
+ if (!Installer.Repositories.empty())
{
std::string ifwCmd = RepoGen;
ifwCmd += " -c " + this->toplevel + "/config/config.xml";
@@ -128,7 +128,7 @@ int cmCPackIFWGenerator::PackageFiles()
{
ifwCmd += " --online-only";
}
- else if (!DownloadedPackages.empty() && !DownloadSite.empty())
+ else if (!DownloadedPackages.empty() && !Installer.Repositories.empty())
{
ifwCmd += " -e ";
std::set<cmCPackIFWPackage*>::iterator it
@@ -223,23 +223,25 @@ int cmCPackIFWGenerator::InitializeInternal()
{
// Search Qt Installer Framework tools
- if(!this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND") ||
- !this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND"))
+ const std::string BinCreatorOpt = "CPACK_IFW_BINARYCREATOR_EXECUTABLE";
+ const std::string RepoGenOpt = "CPACK_IFW_REPOGEN_EXECUTABLE";
+
+ if(!this->IsSet(BinCreatorOpt) ||
+ !this->IsSet(RepoGenOpt))
{
this->ReadListFile("CPackIFW.cmake");
}
// Look 'binarycreator' executable (needs)
- if(this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND"))
+ const char *BinCreatorStr = this->GetOption(BinCreatorOpt);
+ if(!BinCreatorStr || cmSystemTools::IsNOTFOUND(BinCreatorStr))
{
- const char *ifwBinCreatorStr =
- this->GetOption("CPACK_IFW_BINARYCREATOR_EXECUTABLE");
- BinCreator = ifwBinCreatorStr ? ifwBinCreatorStr : "";
+ BinCreator = "";
}
else
{
- BinCreator = "";
+ BinCreator = BinCreatorStr;
}
if (BinCreator.empty())
@@ -253,15 +255,14 @@ int cmCPackIFWGenerator::InitializeInternal()
// Look 'repogen' executable (optional)
- if(this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND"))
+ const char *RepoGenStr = this->GetOption(RepoGenOpt);
+ if(!RepoGenStr || cmSystemTools::IsNOTFOUND(RepoGenStr))
{
- const char *ifwRepoGenStr =
- this->GetOption("CPACK_IFW_REPOGEN_EXECUTABLE");
- RepoGen = ifwRepoGenStr ? ifwRepoGenStr : "";
+ RepoGen = "";
}
else
{
- RepoGen = "";
+ RepoGen = RepoGenStr;
}
// Variables that Change Behavior
@@ -277,16 +278,26 @@ int cmCPackIFWGenerator::InitializeInternal()
PkgsDirsVector);
}
- // Remote repository
+ // Installer
+ Installer.Generator = this;
+ Installer.ConfigureFromOptions();
- if (const char *site = this->GetOption("CPACK_DOWNLOAD_SITE"))
+ if (const char* ifwDownloadAll =
+ this->GetOption("CPACK_IFW_DOWNLOAD_ALL"))
{
- DownloadSite = site;
+ OnlineOnly = cmSystemTools::IsOn(ifwDownloadAll);
+ }
+ else if (const char* cpackDownloadAll =
+ this->GetOption("CPACK_DOWNLOAD_ALL"))
+ {
+ OnlineOnly = cmSystemTools::IsOn(cpackDownloadAll);
+ }
+ else
+ {
+ OnlineOnly = false;
}
- OnlineOnly = this->IsOn("CPACK_DOWNLOAD_ALL") ? true : false;
-
- if (!DownloadSite.empty() && RepoGen.empty()) {
+ if (!Installer.Repositories.empty() && RepoGen.empty()) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot find QtIFW repository generator \"repogen\": "
"likely it is not installed, or not in your PATH"
@@ -294,10 +305,6 @@ int cmCPackIFWGenerator::InitializeInternal()
return 0;
}
- // Installer
- Installer.Generator = this;
- Installer.ConfigureFromOptions();
-
return this->Superclass::InitializeInternal();
}
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h
index 7211e04..1d4d67b 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.h
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.h
@@ -127,8 +127,6 @@ private:
std::string RepoGen;
std::string BinCreator;
- std::string DownloadSite;
-
bool OnlineOnly;
bool ResolveDuplicateNames;
std::vector<std::string> PkgsDirsVector;
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index fcb07e6..0644ecb 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -45,6 +45,12 @@ const char *cmCPackIFWInstaller::GetOption(const std::string &op) const
}
//----------------------------------------------------------------------------
+bool cmCPackIFWInstaller::IsOn(const std::string &op) const
+{
+ return Generator ? Generator->IsOn(op) : false;
+}
+
+//----------------------------------------------------------------------------
void cmCPackIFWInstaller::ConfigureFromOptions()
{
// Name;
@@ -167,6 +173,78 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
{
AdminTargetDir = option;
}
+
+ // Repositories
+ Repositories.clear();
+ RepositoryStruct Repo;
+ if (const char *site = this->GetOption("CPACK_DOWNLOAD_SITE"))
+ {
+ Repo.Url = site;
+ Repositories.push_back(Repo);
+ }
+ if(const char *RepoAllStr = this->GetOption("CPACK_IFW_REPOSITORIES_ALL"))
+ {
+ std::vector<std::string> RepoAllVector;
+ cmSystemTools::ExpandListArgument(RepoAllStr,
+ RepoAllVector);
+ for(std::vector<std::string>::iterator
+ rit = RepoAllVector.begin(); rit != RepoAllVector.end(); ++rit)
+ {
+ std::string prefix = "CPACK_IFW_REPOSITORY_"
+ + cmsys::SystemTools::UpperCase(*rit)
+ + "_";
+ // Url
+ if (const char* url = GetOption(prefix + "URL"))
+ {
+ Repo.Url = url;
+ }
+ else
+ {
+ Repo.Url = "";
+ }
+ // Enabled
+ if (IsOn(prefix + "DISABLED"))
+ {
+ Repo.Enabled = "0";
+ }
+ else
+ {
+ Repo.Enabled = "";
+ }
+ // Username
+ if (const char* username = GetOption(prefix + "USERNAME"))
+ {
+ Repo.Username = username;
+ }
+ else
+ {
+ Repo.Username = "";
+ }
+ // Password
+ if (const char* password = GetOption(prefix + "PASSWORD"))
+ {
+ Repo.Password = password;
+ }
+ else
+ {
+ Repo.Password = "";
+ }
+ // DisplayName
+ if (const char* displayName = GetOption(prefix + "DISPLAY_NAME"))
+ {
+ Repo.DisplayName = displayName;
+ }
+ else
+ {
+ Repo.DisplayName = "";
+ }
+
+ if(!Repo.Url.empty())
+ {
+ Repositories.push_back(Repo);
+ }
+ }
+ }
}
//----------------------------------------------------------------------------
@@ -246,19 +324,43 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
<< "</AdminTargetDir>" << std::endl;
}
- // Site
- if (!Generator->DownloadSite.empty())
+ // Remote repositories
+ if (!Repositories.empty())
{
xout << " <RemoteRepositories>" << std::endl;
- xout << " <Repository>" << std::endl;
- xout << " <Url>" << Generator->DownloadSite
- << "</Url>" << std::endl;
- // These properties can not be set from "cpack_configure_downloads"
- // <Enabled>1</Enabled>
- // <Username>user</Username>
- // <Password>password</Password>
- // <DisplayName>Example repository</DisplayName>
- xout << " </Repository>" << std::endl;
+ for(std::vector<RepositoryStruct>::iterator
+ rit = Repositories.begin(); rit != Repositories.end(); ++rit)
+ {
+ xout << " <Repository>" << std::endl;
+ // Url
+ xout << " <Url>" << rit->Url
+ << "</Url>" << std::endl;
+ // Enabled
+ if(!rit->Enabled.empty())
+ {
+ xout << " <Enabled>" << rit->Enabled
+ << "</Enabled>" << std::endl;
+ }
+ // Username
+ if(!rit->Username.empty())
+ {
+ xout << " <Username>" << rit->Username
+ << "</Username>" << std::endl;
+ }
+ // Password
+ if(!rit->Password.empty())
+ {
+ xout << " <Password>" << rit->Password
+ << "</Password>" << std::endl;
+ }
+ // DisplayName
+ if(!rit->DisplayName.empty())
+ {
+ xout << " <DisplayName>" << rit->DisplayName
+ << "</DisplayName>" << std::endl;
+ }
+ xout << " </Repository>" << std::endl;
+ }
xout << " </RemoteRepositories>" << std::endl;
}
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h
index 1630a94..5824d33 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.h
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.h
@@ -27,6 +27,15 @@ public: // Types
typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap;
+ struct RepositoryStruct
+ {
+ std::string Url;
+ std::string Enabled;
+ std::string Username;
+ std::string Password;
+ std::string DisplayName;
+ };
+
public: // Constructor
/**
@@ -69,6 +78,7 @@ public: // Configuration
public: // Internal implementation
const char* GetOption(const std::string& op) const;
+ bool IsOn(const std::string& op) const;
void ConfigureFromOptions();
@@ -78,6 +88,7 @@ public: // Internal implementation
cmCPackIFWGenerator* Generator;
PackagesMap Packages;
+ std::vector<RepositoryStruct> Repositories;
std::string Directory;
};
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 744280a..7e00027 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -850,6 +850,11 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
std::string relativeDirectoryPath =
cmSystemTools::RelativePath(toplevel.c_str(), topdir.c_str());
+ if(relativeDirectoryPath.empty())
+ {
+ relativeDirectoryPath = ".";
+ }
+
cmInstalledFile const* directoryInstalledFile =
this->GetInstalledFile(relativeDirectoryPath);
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 6e7b8d7..e2437b5 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -56,7 +56,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
localToplevel += "/"+ component->Name;
std::string dir = cmSystemTools::GetCurrentWorkingDirectory();
// Change to local toplevel
- cmSystemTools::ChangeDirectory(localToplevel.c_str());
+ cmSystemTools::ChangeDirectory(localToplevel);
std::string filePrefix;
if (this->IsOn("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY"))
{
@@ -80,7 +80,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
}
}
// Go back to previous dir
- cmSystemTools::ChangeDirectory(dir.c_str());
+ cmSystemTools::ChangeDirectory(dir);
return 1;
}
@@ -270,7 +270,7 @@ int cmCPackArchiveGenerator::PackageFiles()
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
std::vector<std::string>::const_iterator fileIt;
std::string dir = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(toplevel.c_str());
+ cmSystemTools::ChangeDirectory(toplevel);
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
{
// Get the relative path to the file
@@ -288,7 +288,7 @@ int cmCPackArchiveGenerator::PackageFiles()
return 0;
}
}
- cmSystemTools::ChangeDirectory(dir.c_str());
+ cmSystemTools::ChangeDirectory(dir);
// The destructor of cmArchiveWrite will close and finish the write
return 1;
}
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 936942b..c939cd2 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -58,7 +58,7 @@ int cmCPackDebGenerator::PackageOnePack(std::string initialTopLevel,
// Begin the archive for this pack
std::string localToplevel(initialTopLevel);
std::string packageFileName(
- cmSystemTools::GetParentDirectory(toplevel.c_str())
+ cmSystemTools::GetParentDirectory(toplevel)
);
std::string outputFileName(
std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
@@ -186,7 +186,7 @@ int cmCPackDebGenerator::PackageComponentsAllInOne()
// The ALL GROUPS in ONE package case
std::string localToplevel(initialTopLevel);
std::string packageFileName(
- cmSystemTools::GetParentDirectory(toplevel.c_str())
+ cmSystemTools::GetParentDirectory(toplevel)
);
std::string outputFileName(
std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
@@ -540,7 +540,7 @@ int cmCPackDebGenerator::createDeb()
localcopy += filenamename;
// if we can copy the file, it means it does exist, let's add it:
if( cmsys::SystemTools::CopyFileIfDifferent(
- i->c_str(), localcopy.c_str()) )
+ *i, localcopy) )
{
// debian is picky and need relative to ./ path in the tar.*
cmd += " ./";
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 1461bb1..31f0b59 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -399,7 +399,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
<< inFile << " -> " << filePath << std::endl);
/* If the file is a symlink we will have to re-create it */
- if ( cmSystemTools::FileIsSymlink(inFile.c_str()))
+ if ( cmSystemTools::FileIsSymlink(inFile))
{
std::string targetFile;
std::string inFileRelative =
@@ -429,7 +429,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
goToDir += "/"+subdir;
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Change dir to: " << goToDir <<std::endl);
- cmSystemTools::ChangeDirectory(goToDir.c_str());
+ cmSystemTools::ChangeDirectory(goToDir);
for (symlinkedIt=symlinkedFiles.begin();
symlinkedIt != symlinkedFiles.end();
++symlinkedIt)
@@ -448,7 +448,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Going back to: "
<< curDir <<std::endl);
- cmSystemTools::ChangeDirectory(curDir.c_str());
+ cmSystemTools::ChangeDirectory(curDir);
}
}
}
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index c8737f4..94ca536 100644
--- a/Source/CPack/cmCPackGeneratorFactory.cxx
+++ b/Source/CPack/cmCPackGeneratorFactory.cxx
@@ -47,9 +47,6 @@
#include "cmCPackLog.h"
-#if defined(__BORLANDC__)
-# pragma warn -8008 /* condition is always true */
-#endif
//----------------------------------------------------------------------
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index a5eee6b..c1fff7d 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -657,8 +657,8 @@ bool cmCPackNSISGenerator::GetListOfSubdirectories(const char* topdir,
cmsys_stl::string fullPath = topdir;
fullPath += "/";
fullPath += dir.GetFile(static_cast<unsigned long>(fileNum));
- if(cmsys::SystemTools::FileIsDirectory(fullPath.c_str()) &&
- !cmsys::SystemTools::FileIsSymlink(fullPath.c_str()))
+ if(cmsys::SystemTools::FileIsDirectory(fullPath) &&
+ !cmsys::SystemTools::FileIsSymlink(fullPath))
{
if (!this->GetListOfSubdirectories(fullPath.c_str(), dirs))
{
@@ -771,7 +771,7 @@ CreateComponentDescription(cmCPackComponent *component,
<< archiveFile << std::endl);
if (cmSystemTools::FileExists(archiveFile.c_str(), true))
{
- if (!cmSystemTools::RemoveFile(archiveFile.c_str()))
+ if (!cmSystemTools::RemoveFile(archiveFile))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Unable to remove archive file " << archiveFile
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx
index c6171dc..71ab3a0 100644
--- a/Source/CPack/cmCPackRPMGenerator.cxx
+++ b/Source/CPack/cmCPackRPMGenerator.cxx
@@ -57,7 +57,7 @@ int cmCPackRPMGenerator::PackageOnePack(std::string initialToplevel,
// Begin the archive for this pack
std::string localToplevel(initialToplevel);
std::string packageFileName(
- cmSystemTools::GetParentDirectory(toplevel.c_str())
+ cmSystemTools::GetParentDirectory(toplevel)
);
std::string outputFileName(
GetComponentPackageFileName(this->GetOption("CPACK_PACKAGE_FILE_NAME"),
@@ -166,7 +166,7 @@ int cmCPackRPMGenerator::PackageComponentsAllInOne()
// The ALL GROUPS in ONE package case
std::string localToplevel(initialTopLevel);
std::string packageFileName(
- cmSystemTools::GetParentDirectory(toplevel.c_str())
+ cmSystemTools::GetParentDirectory(toplevel)
);
std::string outputFileName(
std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 6c1d201..e5da5cf 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -71,8 +71,6 @@ int cmCPackSTGZGenerator::PackageFiles()
retval &= cmSystemTools::SetPermissions((*it).c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
S_IREAD | S_IWRITE | S_IEXEC
-#elif defined( __BORLANDC__ )
- S_IRUSR | S_IWUSR | S_IXUSR
#else
S_IRUSR | S_IWUSR | S_IXUSR |
S_IRGRP | S_IWGRP | S_IXGRP |
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index c57028d..26bf607 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -267,7 +267,7 @@ int main (int argc, char const* const* argv)
if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) )
{
cpackConfigFile =
- cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
+ cmSystemTools::CollapseFullPath(cpackConfigFile);
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
"Read CPack configuration file: " << cpackConfigFile
<< std::endl);
diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx
index 934481b..7f966aa 100644
--- a/Source/CTest/cmCTestBatchTestHandler.cxx
+++ b/Source/CTest/cmCTestBatchTestHandler.cxx
@@ -33,8 +33,8 @@ void cmCTestBatchTestHandler::WriteBatchScript()
{
this->Script = this->CTest->GetBinaryDir()
+ "/Testing/CTestBatch.txt";
- std::fstream fout;
- fout.open(this->Script.c_str(), std::ios::out);
+ cmsys::ofstream fout;
+ fout.open(this->Script.c_str());
fout << "#!/bin/sh\n";
for(TestMap::iterator i = this->Tests.begin(); i != this->Tests.end(); ++i)
@@ -48,7 +48,7 @@ void cmCTestBatchTestHandler::WriteBatchScript()
}
//---------------------------------------------------------
-void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout)
+void cmCTestBatchTestHandler::WriteSrunArgs(int test, cmsys::ofstream& fout)
{
cmCTestTestHandler::cmCTestTestProperties* properties =
this->Properties[test];
@@ -79,7 +79,7 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout)
}
//---------------------------------------------------------
-void cmCTestBatchTestHandler::WriteTestCommand(int test, std::fstream& fout)
+void cmCTestBatchTestHandler::WriteTestCommand(int test, cmsys::ofstream& fout)
{
std::vector<std::string> args = this->Properties[test]->Args;
std::vector<std::string> processArgs;
diff --git a/Source/CTest/cmCTestBatchTestHandler.h b/Source/CTest/cmCTestBatchTestHandler.h
index ab0d081..e0c6e48 100644
--- a/Source/CTest/cmCTestBatchTestHandler.h
+++ b/Source/CTest/cmCTestBatchTestHandler.h
@@ -17,6 +17,7 @@
#include <cmCTestTestHandler.h>
#include <cmCTestMultiProcessHandler.h>
#include <cmCTestRunTest.h>
+#include <cmsys/FStream.hxx>
/** \class cmCTestBatchTestHandler
* \brief run parallel ctest
@@ -30,8 +31,8 @@ public:
virtual void RunTests();
protected:
void WriteBatchScript();
- void WriteSrunArgs(int test, std::fstream& fout);
- void WriteTestCommand(int test, std::fstream& fout);
+ void WriteSrunArgs(int test, cmsys::ofstream& fout);
+ void WriteTestCommand(int test, cmsys::ofstream& fout);
void SubmitBatchScript();
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 41db042..a101e39 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -109,7 +109,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
out << "Error: cmake execution failed\n";
out << cmakeOutString << "\n";
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
if(outstring)
{
*outstring = out.str();
@@ -128,7 +128,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
out << "Error: cmake execution failed\n";
out << cmakeOutString << "\n";
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
if(outstring)
{
*outstring = out.str();
@@ -241,11 +241,11 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
out << "Internal cmake changing into directory: "
<< this->BinaryDir << std::endl;
- if (!cmSystemTools::FileIsDirectory(this->BinaryDir.c_str()))
+ if (!cmSystemTools::FileIsDirectory(this->BinaryDir))
{
cmSystemTools::MakeDirectory(this->BinaryDir.c_str());
}
- cmSystemTools::ChangeDirectory(this->BinaryDir.c_str());
+ cmSystemTools::ChangeDirectory(this->BinaryDir);
if(this->BuildNoCMake)
{
@@ -374,7 +374,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
cmCTestLog(this->CTest, ERROR_MESSAGE, out.str());
}
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
return 1;
}
@@ -391,7 +391,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
if(this->BuildRunDir.size())
{
out << "Run test in directory: " << this->BuildRunDir << "\n";
- cmSystemTools::ChangeDirectory(this->BuildRunDir.c_str());
+ cmSystemTools::ChangeDirectory(this->BuildRunDir);
}
out << "Running test command: \"" << fullPath << "\"";
for(size_t k=0; k < this->TestCommandArgs.size(); ++k)
@@ -453,9 +453,9 @@ int cmCTestBuildAndTestHandler::ProcessCommandLineArguments(
// dir must exist before CollapseFullPath is called
cmSystemTools::MakeDirectory(this->BinaryDir.c_str());
this->BinaryDir
- = cmSystemTools::CollapseFullPath(this->BinaryDir.c_str());
+ = cmSystemTools::CollapseFullPath(this->BinaryDir);
this->SourceDir
- = cmSystemTools::CollapseFullPath(this->SourceDir.c_str());
+ = cmSystemTools::CollapseFullPath(this->SourceDir);
}
else
{
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 2ec1365..5e8f8f0 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -36,9 +36,6 @@
#include <math.h>
#include <float.h>
-#if defined(__BORLANDC__)
-# pragma warn -8060 /* possibly incorrect assignment */
-#endif
static const char* cmCTestErrorMatches[] = {
"^[Bb]us [Ee]rror",
@@ -610,7 +607,7 @@ void cmCTestBuildHandler::GenerateXMLLaunched(std::ostream& os)
int numWarningsAllowed = this->MaxWarnings;
// Identify fragments on disk.
cmsys::Directory launchDir;
- launchDir.Load(this->CTestLaunchDir.c_str());
+ launchDir.Load(this->CTestLaunchDir);
unsigned long n = launchDir.GetNumberOfFiles();
for(unsigned long i=0; i < n; ++i)
{
@@ -649,7 +646,7 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(std::ostream& os)
std::string srcdir = this->CTest->GetCTestConfiguration("SourceDirectory");
// make sure the source dir is in the correct case on windows
// via a call to collapse full path.
- srcdir = cmSystemTools::CollapseFullPath(srcdir.c_str());
+ srcdir = cmSystemTools::CollapseFullPath(srcdir);
srcdir += "/";
for ( it = ew.begin();
it != ew.end() && (numErrorsAllowed || numWarningsAllowed); it++ )
@@ -695,7 +692,7 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(std::ostream& os)
{
// make sure it is a full path with the correct case
cm->SourceFile = cmSystemTools::CollapseFullPath(
- cm->SourceFile.c_str());
+ cm->SourceFile);
cmSystemTools::ReplaceString(
cm->SourceFile, srcdir.c_str(), "");
}
@@ -822,7 +819,7 @@ cmCTestBuildHandler::LaunchHelper::LaunchHelper(cmCTestBuildHandler* handler):
launchDir += "/Build";
// Clean out any existing launcher fragments.
- cmSystemTools::RemoveADirectory(launchDir.c_str());
+ cmSystemTools::RemoveADirectory(launchDir);
if(this->Handler->UseCTestLaunch)
{
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 76f6584..7d3c6bc 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -15,6 +15,7 @@
#include "cmParseGTMCoverage.h"
#include "cmParseCacheCoverage.h"
#include "cmParseJacocoCoverage.h"
+#include "cmParseDelphiCoverage.h"
#include "cmCTest.h"
#include "cmake.h"
#include "cmMakefile.h"
@@ -164,7 +165,7 @@ void cmCTestCoverageHandler::CleanCoverageLogFiles(std::ostream& log)
fi != files.end(); ++fi)
{
log << "Removing old coverage log: " << *fi << "\n";
- cmSystemTools::RemoveFile(fi->c_str());
+ cmSystemTools::RemoveFile(*fi);
}
}
@@ -237,10 +238,10 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
std::string fSrcDir = cmSystemTools::CollapseFullPath(srcDir);
std::string fBinDir = cmSystemTools::CollapseFullPath(binDir);
std::string fFile = cmSystemTools::CollapseFullPath(file);
- bool sourceSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(),
- fSrcDir.c_str());
- bool buildSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(),
- fBinDir.c_str());
+ bool sourceSubDir = cmSystemTools::IsSubDirectory(fFile,
+ fSrcDir);
+ bool buildSubDir = cmSystemTools::IsSubDirectory(fFile,
+ fBinDir);
// Always check parent directory of the file.
std::string fileDir = cmSystemTools::GetFilenamePath(fFile);
std::string checkDir;
@@ -423,6 +424,12 @@ int cmCTestCoverageHandler::ProcessHandler()
return error;
}
+ file_count += this->HandleDelphiCoverage(&cont);
+ error = cont.Error;
+ if ( file_count < 0 )
+ {
+ return error;
+ }
std::set<std::string> uncovered = this->FindUncoveredFiles(&cont);
if ( file_count == 0 )
@@ -758,8 +765,8 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf)
//----------------------------------------------------------------------
bool IsFileInDir(const std::string &infile, const std::string &indir)
{
- std::string file = cmSystemTools::CollapseFullPath(infile.c_str());
- std::string dir = cmSystemTools::CollapseFullPath(indir.c_str());
+ std::string file = cmSystemTools::CollapseFullPath(infile);
+ std::string dir = cmSystemTools::CollapseFullPath(indir);
if (
file.size() > dir.size() &&
@@ -779,7 +786,7 @@ int cmCTestCoverageHandler::HandlePHPCoverage(
{
cmParsePHPCoverage cov(*cont, this->CTest);
std::string coverageDir = this->CTest->GetBinaryDir() + "/xdebugCoverage";
- if(cmSystemTools::FileIsDirectory(coverageDir.c_str()))
+ if(cmSystemTools::FileIsDirectory(coverageDir))
{
cov.ReadPHPCoverageDirectory(coverageDir.c_str());
}
@@ -910,7 +917,36 @@ int cmCTestCoverageHandler::HandleJacocoCoverage(
return static_cast<int>(cont->TotalCoverage.size());
}
+//----------------------------------------------------------------------
+int cmCTestCoverageHandler::HandleDelphiCoverage(
+ cmCTestCoverageHandlerContainer* cont)
+{
+ cmParseDelphiCoverage cov =
+ cmParseDelphiCoverage(*cont, this->CTest);
+ cmsys::Glob g;
+ std::vector<std::string> files;
+ g.SetRecurse(true);
+
+ std::string BinDir
+ = this->CTest->GetBinaryDir();
+ std::string coverageFile = BinDir+ "/*.html";
+ g.FindFiles(coverageFile);
+ files=g.GetFiles();
+ if (files.size() > 0)
+ {
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Found Delphi HTML Files, Performing Coverage" << std::endl);
+ cov.LoadCoverageData(files);
+ }
+ else
+ {
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ " Cannot find Delphi coverage files: " << coverageFile
+ << std::endl);
+ }
+ return static_cast<int>(cont->TotalCoverage.size());
+}
//----------------------------------------------------------------------
int cmCTestCoverageHandler::HandleGCovCoverage(
cmCTestCoverageHandlerContainer* cont)
@@ -974,7 +1010,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
std::string tempDir = testingDir + "/CoverageInfo";
std::string currentDirectory = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::MakeDirectory(tempDir.c_str());
- cmSystemTools::ChangeDirectory(tempDir.c_str());
+ cmSystemTools::ChangeDirectory(tempDir);
int gcovStyle = 0;
@@ -1295,7 +1331,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
*cont->OFS << " produced in source dir: " << sourceFile
<< std::endl;
actualSourceFile
- = cmSystemTools::CollapseFullPath(sourceFile.c_str());
+ = cmSystemTools::CollapseFullPath(sourceFile);
}
else if ( IsFileInDir(sourceFile, cont->BinaryDir) )
{
@@ -1304,7 +1340,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
*cont->OFS << " produced in binary dir: " << sourceFile
<< std::endl;
actualSourceFile
- = cmSystemTools::CollapseFullPath(sourceFile.c_str());
+ = cmSystemTools::CollapseFullPath(sourceFile);
}
if ( actualSourceFile.empty() )
@@ -1345,7 +1381,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
}
}
- cmSystemTools::ChangeDirectory(currentDirectory.c_str());
+ cmSystemTools::ChangeDirectory(currentDirectory);
return file_count;
}
@@ -1409,8 +1445,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
for ( it = files.begin(); it != files.end(); ++ it )
{
cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush);
- std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str());
- cmSystemTools::ChangeDirectory(fileDir.c_str());
+ std::string fileDir = cmSystemTools::GetFilenamePath(*it);
+ cmSystemTools::ChangeDirectory(fileDir);
std::string command = "\"" + lcovCommand + "\" " +
lcovExtraFlags + " ";
@@ -1609,7 +1645,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
}
}
- cmSystemTools::ChangeDirectory(currentDirectory.c_str());
+ cmSystemTools::ChangeDirectory(currentDirectory);
return file_count;
}
@@ -1653,7 +1689,7 @@ void cmCTestCoverageHandler::FindLCovFiles(std::vector<std::string>& files)
gl.RecurseThroughSymlinksOff();
std::string prevBinaryDir;
cmSystemTools::ChangeDirectory(
- this->CTest->GetCTestConfiguration("BuildDirectory").c_str());
+ this->CTest->GetCTestConfiguration("BuildDirectory"));
// Run profmerge to merge all *.dyn files into dpi files
cmSystemTools::RunSingleCommand("profmerge");
@@ -1696,9 +1732,9 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
std::string tempDir = testingDir + "/CoverageInfo";
std::string currentDirectory = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::MakeDirectory(tempDir.c_str());
- cmSystemTools::ChangeDirectory(tempDir.c_str());
+ cmSystemTools::ChangeDirectory(tempDir);
- cmSystemTools::ChangeDirectory(currentDirectory.c_str());
+ cmSystemTools::ChangeDirectory(currentDirectory);
std::vector<std::string>::iterator fileIt;
int file_count = 0;
@@ -1714,7 +1750,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
}
std::string actualSourceFile
- = cmSystemTools::CollapseFullPath(fileName.c_str());
+ = cmSystemTools::CollapseFullPath(fileName);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" Check coverage for file: " << actualSourceFile
<< std::endl);
@@ -1802,7 +1838,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
}
++ file_count;
}
- cmSystemTools::ChangeDirectory(currentDirectory.c_str());
+ cmSystemTools::ChangeDirectory(currentDirectory);
return file_count;
}
@@ -2132,7 +2168,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
file += "/";
file += sourceFile;
}
- file = cmSystemTools::CollapseFullPath(file.c_str());
+ file = cmSystemTools::CollapseFullPath(file);
bool shouldIDoCoverage
= this->ShouldIDoCoverage(file.c_str(),
cont->SourceDir.c_str(),
diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h
index d0f274c..01c5d7f 100644
--- a/Source/CTest/cmCTestCoverageHandler.h
+++ b/Source/CTest/cmCTestCoverageHandler.h
@@ -84,6 +84,9 @@ private:
//! Handle coverage for Jacoco
int HandleJacocoCoverage(cmCTestCoverageHandlerContainer* cont);
+ //! Handle coverage for Delphi (Pascal)
+ int HandleDelphiCoverage(cmCTestCoverageHandlerContainer* cont);
+
//! Handle coverage using Bullseye
int HandleBullseyeCoverage(cmCTestCoverageHandlerContainer* cont);
int RunBullseyeSourceSummary(cmCTestCoverageHandlerContainer* cont);
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index aaa01b2..98bc9d7 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -158,7 +158,7 @@ std::string cmCTestGIT::FindTopDir()
{
top_dir += "/";
top_dir += cdup;
- top_dir = cmSystemTools::CollapseFullPath(top_dir.c_str());
+ top_dir = cmSystemTools::CollapseFullPath(top_dir);
}
return top_dir;
}
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index 0e29160..5b525dd 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -137,7 +137,7 @@ bool cmCTestHandlerCommand
}
std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(
- this->CTest->GetCTestConfiguration("BuildDirectory").c_str());
+ this->CTest->GetCTestConfiguration("BuildDirectory"));
int res = handler->ProcessHandler();
if ( this->Values[ct_RETURN_VALUE] && *this->Values[ct_RETURN_VALUE])
{
@@ -146,7 +146,7 @@ bool cmCTestHandlerCommand
this->Makefile->AddDefinition(
this->Values[ct_RETURN_VALUE], str.str().c_str());
}
- cmSystemTools::ChangeDirectory(current_dir.c_str());
+ cmSystemTools::ChangeDirectory(current_dir);
return true;
}
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 10a5199..b65d23b 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -48,8 +48,8 @@ cmCTestLaunch::~cmCTestLaunch()
cmsysProcess_Delete(this->Process);
if(!this->Passthru)
{
- cmSystemTools::RemoveFile(this->LogOut.c_str());
- cmSystemTools::RemoveFile(this->LogErr.c_str());
+ cmSystemTools::RemoveFile(this->LogOut);
+ cmSystemTools::RemoveFile(this->LogErr);
}
}
@@ -434,8 +434,8 @@ void cmCTestLaunch::WriteXMLAction(std::ostream& fxml)
// If file is in source tree use its relative location.
if(cmSystemTools::FileIsFullPath(this->SourceDir.c_str()) &&
cmSystemTools::FileIsFullPath(source.c_str()) &&
- cmSystemTools::IsSubDirectory(source.c_str(),
- this->SourceDir.c_str()))
+ cmSystemTools::IsSubDirectory(source,
+ this->SourceDir))
{
source = cmSystemTools::RelativePath(this->SourceDir.c_str(),
source.c_str());
diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx b/Source/CTest/cmCTestMemCheckCommand.cxx
index 939b4dc..f144066 100644
--- a/Source/CTest/cmCTestMemCheckCommand.cxx
+++ b/Source/CTest/cmCTestMemCheckCommand.cxx
@@ -23,6 +23,8 @@ cmCTestGenericHandler* cmCTestMemCheckCommand::InitializeActualHandler()
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"MemoryCheckType", "CTEST_MEMORYCHECK_TYPE");
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
+ "MemoryCheckSanitizerOptions", "CTEST_MEMORYCHECK_SANITIZER_OPTIONS");
+ this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"MemoryCheckCommand", "CTEST_MEMORYCHECK_COMMAND");
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"MemoryCheckCommandOptions", "CTEST_MEMORYCHECK_COMMAND_OPTIONS");
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index a7ab077..089e84b 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -370,11 +370,17 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os)
case cmCTestMemCheckHandler::BOUNDS_CHECKER:
os << "BoundsChecker";
break;
+ case cmCTestMemCheckHandler::ADDRESS_SANITIZER:
+ os << "AddressSanitizer";
+ break;
case cmCTestMemCheckHandler::THREAD_SANITIZER:
os << "ThreadSanitizer";
break;
- case cmCTestMemCheckHandler::ADDRESS_SANITIZER:
- os << "AddressSanitizer";
+ case cmCTestMemCheckHandler::MEMORY_SANITIZER:
+ os << "MemorySanitizer";
+ break;
+ case cmCTestMemCheckHandler::UB_SANITIZER:
+ os << "UndefinedBehaviorSanitizer";
break;
default:
os << "Unknown";
@@ -537,6 +543,14 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
}
if ( this->CTest->GetCTestConfiguration("MemoryCheckType")
+ == "AddressSanitizer")
+ {
+ this->MemoryTester
+ = this->CTest->GetCTestConfiguration("CMakeCommand").c_str();
+ this->MemoryTesterStyle = cmCTestMemCheckHandler::ADDRESS_SANITIZER;
+ this->LogWithPID = true; // even if we give the log file the pid is added
+ }
+ if ( this->CTest->GetCTestConfiguration("MemoryCheckType")
== "ThreadSanitizer")
{
this->MemoryTester
@@ -545,11 +559,19 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->LogWithPID = true; // even if we give the log file the pid is added
}
if ( this->CTest->GetCTestConfiguration("MemoryCheckType")
- == "AddressSanitizer")
+ == "MemorySanitizer")
{
this->MemoryTester
= this->CTest->GetCTestConfiguration("CMakeCommand").c_str();
- this->MemoryTesterStyle = cmCTestMemCheckHandler::ADDRESS_SANITIZER;
+ this->MemoryTesterStyle = cmCTestMemCheckHandler::MEMORY_SANITIZER;
+ this->LogWithPID = true; // even if we give the log file the pid is added
+ }
+ if ( this->CTest->GetCTestConfiguration("MemoryCheckType")
+ == "UndefinedBehaviorSanitizer")
+ {
+ this->MemoryTester
+ = this->CTest->GetCTestConfiguration("CMakeCommand").c_str();
+ this->MemoryTesterStyle = cmCTestMemCheckHandler::UB_SANITIZER;
this->LogWithPID = true; // even if we give the log file the pid is added
}
// Check the MemoryCheckType
@@ -674,10 +696,11 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->MemoryTesterOptions.push_back("/M");
break;
}
- // these two are almost the same but the env var used
- // is different
+ // these are almost the same but the env var used is different
case cmCTestMemCheckHandler::ADDRESS_SANITIZER:
case cmCTestMemCheckHandler::THREAD_SANITIZER:
+ case cmCTestMemCheckHandler::MEMORY_SANITIZER:
+ case cmCTestMemCheckHandler::UB_SANITIZER:
{
// To pass arguments to ThreadSanitizer the environment variable
// TSAN_OPTIONS is used. This is done with the cmake -E env command.
@@ -686,15 +709,30 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
// TSAN_OPTIONS string with the log_path in it.
this->MemoryTesterDynamicOptions.push_back("-E");
this->MemoryTesterDynamicOptions.push_back("env");
- std::string envVar = "TSAN_OPTIONS";
- std::string extraOptions;
+ std::string envVar;
+ std::string extraOptions =
+ this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions");
if(this->MemoryTesterStyle == cmCTestMemCheckHandler::ADDRESS_SANITIZER)
{
envVar = "ASAN_OPTIONS";
- extraOptions = " detect_leaks=1";
+ extraOptions += " detect_leaks=1";
+ }
+ else if(this->MemoryTesterStyle ==
+ cmCTestMemCheckHandler::THREAD_SANITIZER)
+ {
+ envVar = "TSAN_OPTIONS";
+ }
+ else if(this->MemoryTesterStyle ==
+ cmCTestMemCheckHandler::MEMORY_SANITIZER)
+ {
+ envVar = "MSAN_OPTIONS";
+ }
+ else if(this->MemoryTesterStyle == cmCTestMemCheckHandler::UB_SANITIZER)
+ {
+ envVar = "UBSAN_OPTIONS";
}
std::string outputFile = envVar + "=log_path=\""
- + this->MemoryTesterOutputFile + "\"";
+ + this->MemoryTesterOutputFile + "\" ";
this->MemoryTesterEnvironmentVariable = outputFile + extraOptions;
break;
}
@@ -728,9 +766,13 @@ ProcessMemCheckOutput(const std::string& str,
return this->ProcessMemCheckPurifyOutput(str, log, results);
}
else if ( this->MemoryTesterStyle ==
+ cmCTestMemCheckHandler::ADDRESS_SANITIZER ||
+ this->MemoryTesterStyle ==
cmCTestMemCheckHandler::THREAD_SANITIZER ||
this->MemoryTesterStyle ==
- cmCTestMemCheckHandler::ADDRESS_SANITIZER)
+ cmCTestMemCheckHandler::MEMORY_SANITIZER ||
+ this->MemoryTesterStyle ==
+ cmCTestMemCheckHandler::UB_SANITIZER)
{
return this->ProcessMemCheckSanitizerOutput(str, log, results);
}
@@ -770,13 +812,22 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput(
std::vector<int>& result)
{
std::string regex;
- if(this->MemoryTesterStyle == cmCTestMemCheckHandler::THREAD_SANITIZER)
- {
- regex = "WARNING: ThreadSanitizer: (.*) \\(pid=.*\\)";
- }
- else
+ switch ( this->MemoryTesterStyle )
{
- regex = "ERROR: AddressSanitizer: (.*) on.*";
+ case cmCTestMemCheckHandler::ADDRESS_SANITIZER:
+ regex = "ERROR: AddressSanitizer: (.*) on.*";
+ break;
+ case cmCTestMemCheckHandler::THREAD_SANITIZER:
+ regex = "WARNING: ThreadSanitizer: (.*) \\(pid=.*\\)";
+ break;
+ case cmCTestMemCheckHandler::MEMORY_SANITIZER:
+ regex = "WARNING: MemorySanitizer: (.*)";
+ break;
+ case cmCTestMemCheckHandler::UB_SANITIZER:
+ regex = "runtime error: (.*)";
+ break;
+ default:
+ break;
}
cmsys::RegularExpression sanitizerWarning(regex);
cmsys::RegularExpression leakWarning("(Direct|Indirect) leak of .*");
@@ -1170,10 +1221,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
}
}
cmSystemTools::Delay(1000);
- cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str());
+ cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
<< this->BoundsCheckerDPBDFile << std::endl);
- cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str());
+ cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
<< this->BoundsCheckerXMLFile << std::endl);
}
@@ -1204,7 +1255,7 @@ cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
}
if(this->LogWithPID)
{
- cmSystemTools::RemoveFile(ofile.c_str());
+ cmSystemTools::RemoveFile(ofile);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "<< ofile <<"\n");
}
}
diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h
index 2195dab..69fdd9f 100644
--- a/Source/CTest/cmCTestMemCheckHandler.h
+++ b/Source/CTest/cmCTestMemCheckHandler.h
@@ -49,9 +49,11 @@ private:
VALGRIND,
PURIFY,
BOUNDS_CHECKER,
- // checkers after hear do not use the standard error list
+ // checkers after here do not use the standard error list
+ ADDRESS_SANITIZER,
THREAD_SANITIZER,
- ADDRESS_SANITIZER
+ MEMORY_SANITIZER,
+ UB_SANITIZER
};
public:
enum { // Memory faults
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index b9e6721..4c89caa 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -123,7 +123,7 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
testRun->SetTestProperties(this->Properties[test]);
std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(this->Properties[test]->Directory.c_str());
+ cmSystemTools::ChangeDirectory(this->Properties[test]->Directory);
// Lock the resources we'll be using
this->LockResources(test);
@@ -156,7 +156,7 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
this->Failed->push_back(this->Properties[test]->Name);
delete testRun;
}
- cmSystemTools::ChangeDirectory(current_dir.c_str());
+ cmSystemTools::ChangeDirectory(current_dir);
}
//---------------------------------------------------------
@@ -319,8 +319,8 @@ void cmCTestMultiProcessHandler::UpdateCostData()
{
std::string fname = this->CTest->GetCostDataFile();
std::string tmpout = fname + ".tmp";
- std::fstream fout;
- fout.open(tmpout.c_str(), std::ios::out);
+ cmsys::ofstream fout;
+ fout.open(tmpout.c_str());
PropertiesMap temp = this->Properties;
@@ -334,7 +334,7 @@ void cmCTestMultiProcessHandler::UpdateCostData()
{
if(line == "---") break;
std::vector<cmsys::String> parts =
- cmSystemTools::SplitString(line.c_str(), ' ');
+ cmSystemTools::SplitString(line, ' ');
//Format: <name> <previous_runs> <avg_cost>
if(parts.size() < 3) break;
@@ -357,7 +357,7 @@ void cmCTestMultiProcessHandler::UpdateCostData()
}
}
fin.close();
- cmSystemTools::RemoveFile(fname.c_str());
+ cmSystemTools::RemoveFile(fname);
}
// Add all tests not previously listed in the file
@@ -393,7 +393,7 @@ void cmCTestMultiProcessHandler::ReadCostData()
if(line == "---") break;
std::vector<cmsys::String> parts =
- cmSystemTools::SplitString(line.c_str(), ' ');
+ cmSystemTools::SplitString(line, ' ');
// Probably an older version of the file, will be fixed next run
if(parts.size() < 3)
@@ -610,8 +610,8 @@ void cmCTestMultiProcessHandler::WriteCheckpoint(int index)
{
std::string fname = this->CTest->GetBinaryDir()
+ "/Testing/Temporary/CTestCheckpoint.txt";
- std::fstream fout;
- fout.open(fname.c_str(), std::ios::app | std::ios::out);
+ cmsys::ofstream fout;
+ fout.open(fname.c_str(), std::ios::app);
fout << index << "\n";
fout.close();
}
@@ -621,7 +621,7 @@ void cmCTestMultiProcessHandler::MarkFinished()
{
std::string fname = this->CTest->GetBinaryDir()
+ "/Testing/Temporary/CTestCheckpoint.txt";
- cmSystemTools::RemoveFile(fname.c_str());
+ cmSystemTools::RemoveFile(fname);
}
//---------------------------------------------------------
@@ -639,7 +639,7 @@ void cmCTestMultiProcessHandler::PrintTestList()
//push working dir
std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(p.Directory.c_str());
+ cmSystemTools::ChangeDirectory(p.Directory);
cmCTestRunTest testRun(this->TestHandler);
testRun.SetIndex(p.Index);
@@ -676,7 +676,7 @@ void cmCTestMultiProcessHandler::PrintTestList()
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
//pop working dir
- cmSystemTools::ChangeDirectory(current_dir.c_str());
+ cmSystemTools::ChangeDirectory(current_dir);
}
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl << "Total Tests: "
@@ -735,7 +735,7 @@ void cmCTestMultiProcessHandler::CheckResume()
}
else if(cmSystemTools::FileExists(fname.c_str(), true))
{
- cmSystemTools::RemoveFile(fname.c_str());
+ cmSystemTools::RemoveFile(fname);
}
}
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index bdd8c02..9e3c9fc 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -280,12 +280,12 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
// Set the working directory to the tests directory
std::string oldpath = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(this->TestProperties->Directory.c_str());
+ cmSystemTools::ChangeDirectory(this->TestProperties->Directory);
this->DartProcessing();
// restore working directory
- cmSystemTools::ChangeDirectory(oldpath.c_str());
+ cmSystemTools::ChangeDirectory(oldpath);
// if this is doing MemCheck then all the output needs to be put into
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index f050148..749eb58 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -184,7 +184,7 @@ int cmCTestScriptHandler::ProcessHandler()
{
// for each script run it
res += this->RunConfigurationScript
- (cmSystemTools::CollapseFullPath(this->ConfigurationScripts[i].c_str()),
+ (cmSystemTools::CollapseFullPath(this->ConfigurationScripts[i]),
this->ScriptProcessScope[i]);
}
if ( res )
@@ -482,8 +482,8 @@ int cmCTestScriptHandler::ExtractVariables()
= this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY");
// add in translations for src and bin
- cmSystemTools::AddKeepPath(this->SourceDir.c_str());
- cmSystemTools::AddKeepPath(this->BinaryDir.c_str());
+ cmSystemTools::AddKeepPath(this->SourceDir);
+ cmSystemTools::AddKeepPath(this->BinaryDir);
this->CTestCmd
= this->Makefile->GetSafeDefinition("CTEST_COMMAND");
@@ -743,11 +743,11 @@ int cmCTestScriptHandler::BackupDirectories()
// if for some reason those directories exist then first delete them
if (cmSystemTools::FileExists(this->BackupSourceDir.c_str()))
{
- cmSystemTools::RemoveADirectory(this->BackupSourceDir.c_str());
+ cmSystemTools::RemoveADirectory(this->BackupSourceDir);
}
if (cmSystemTools::FileExists(this->BackupBinaryDir.c_str()))
{
- cmSystemTools::RemoveADirectory(this->BackupBinaryDir.c_str());
+ cmSystemTools::RemoveADirectory(this->BackupBinaryDir);
}
// first rename the src and binary directories
@@ -991,8 +991,8 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
// if all was succesful, delete the backup dirs to free up disk space
if (this->Backup)
{
- cmSystemTools::RemoveADirectory(this->BackupSourceDir.c_str());
- cmSystemTools::RemoveADirectory(this->BackupBinaryDir.c_str());
+ cmSystemTools::RemoveADirectory(this->BackupSourceDir);
+ cmSystemTools::RemoveADirectory(this->BackupBinaryDir);
}
return 0;
@@ -1033,11 +1033,11 @@ void cmCTestScriptHandler::RestoreBackupDirectories()
// if for some reason those directories exist then first delete them
if (cmSystemTools::FileExists(this->SourceDir.c_str()))
{
- cmSystemTools::RemoveADirectory(this->SourceDir.c_str());
+ cmSystemTools::RemoveADirectory(this->SourceDir);
}
if (cmSystemTools::FileExists(this->BinaryDir.c_str()))
{
- cmSystemTools::RemoveADirectory(this->BinaryDir.c_str());
+ cmSystemTools::RemoveADirectory(this->BinaryDir);
}
// rename the src and binary directories
rename(this->BackupSourceDir.c_str(), this->SourceDir.c_str());
@@ -1100,7 +1100,7 @@ bool cmCTestScriptHandler::TryToRemoveBinaryDirectoryOnce(
const std::string& directoryPath)
{
cmsys::Directory directory;
- directory.Load(directoryPath.c_str());
+ directory.Load(directoryPath);
for(unsigned long i = 0; i < directory.GetNumberOfFiles(); ++i)
{
@@ -1113,26 +1113,26 @@ bool cmCTestScriptHandler::TryToRemoveBinaryDirectoryOnce(
std::string fullPath = directoryPath + std::string("/") + path;
- bool isDirectory = cmSystemTools::FileIsDirectory(fullPath.c_str()) &&
- !cmSystemTools::FileIsSymlink(fullPath.c_str());
+ bool isDirectory = cmSystemTools::FileIsDirectory(fullPath) &&
+ !cmSystemTools::FileIsSymlink(fullPath);
if(isDirectory)
{
- if(!cmSystemTools::RemoveADirectory(fullPath.c_str()))
+ if(!cmSystemTools::RemoveADirectory(fullPath))
{
return false;
}
}
else
{
- if(!cmSystemTools::RemoveFile(fullPath.c_str()))
+ if(!cmSystemTools::RemoveFile(fullPath))
{
return false;
}
}
}
- return cmSystemTools::RemoveADirectory(directoryPath.c_str());
+ return cmSystemTools::RemoveADirectory(directoryPath);
}
//-------------------------------------------------------------------------
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index da46f4a..1a39a8a 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -124,7 +124,7 @@ bool cmCTestStartCommand
{
return false;
}
- if(!cmSystemTools::FileIsDirectory(sourceDir.c_str()))
+ if(!cmSystemTools::FileIsDirectory(sourceDir))
{
cmOStringStream e;
e << "given source path\n"
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 06fcb75..5f065c2 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -236,7 +236,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
}
unsigned long filelen = cmSystemTools::FileLength(local_file.c_str());
- ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
+ ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
*this->LogFile << "\tUpload file: " << local_file << " to "
<< upload_as << std::endl;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
@@ -477,7 +477,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
}
unsigned long filelen = cmSystemTools::FileLength(local_file.c_str());
- ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
+ ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
<< local_file << " to "
<< upload_as << " Size: " << filelen << std::endl);
@@ -567,7 +567,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
<< count << std::endl);
::fclose(ftpfile);
- ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
+ ftpfile = cmsys::SystemTools::Fopen(local_file, "rb");
::curl_easy_setopt(curl, CURLOPT_INFILE, ftpfile);
chunk.clear();
@@ -931,13 +931,13 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
cmSystemTools::ConvertToUnixSlashes(lfname);
lfname += "/" + *file;
std::string rfname = destination + "/" + remoteprefix + *file;
- cmSystemTools::CopyFileAlways(lfname.c_str(), rfname.c_str());
+ cmSystemTools::CopyFileAlways(lfname, rfname);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
<< lfname << " to "
<< rfname << std::endl);
}
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
- cmSystemTools::Touch(tagDoneFile.c_str(), true);
+ cmSystemTools::Touch(tagDoneFile, true);
if ( problems )
{
return false;
@@ -1418,20 +1418,20 @@ int cmCTestSubmitHandler::ProcessHandler()
// change to the build directory so that we can uses a relative path
// on windows since scp dosn't support "c:" a drive in the path
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(buildDirectory.c_str());
+ cmSystemTools::ChangeDirectory(buildDirectory);
if ( !this->SubmitUsingSCP(
this->CTest->GetCTestConfiguration("ScpCommand"),
"Testing/"+this->CTest->GetCurrentTag(), files, prefix, url) )
{
- cmSystemTools::ChangeDirectory(oldWorkingDirectory.c_str());
+ cmSystemTools::ChangeDirectory(oldWorkingDirectory);
cmCTestLog(this->CTest, ERROR_MESSAGE,
" Problems when submitting via SCP"
<< std::endl);
ofs << " Problems when submitting via SCP" << std::endl;
return -1;
}
- cmSystemTools::ChangeDirectory(oldWorkingDirectory.c_str());
+ cmSystemTools::ChangeDirectory(oldWorkingDirectory);
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
<< std::endl);
ofs << " Submission successful" << std::endl;
@@ -1447,7 +1447,7 @@ int cmCTestSubmitHandler::ProcessHandler()
// on windows since scp dosn't support "c:" a drive in the path
std::string
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(buildDirectory.c_str());
+ cmSystemTools::ChangeDirectory(buildDirectory);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: "
<< buildDirectory << std::endl);
@@ -1457,14 +1457,14 @@ int cmCTestSubmitHandler::ProcessHandler()
prefix,
location) )
{
- cmSystemTools::ChangeDirectory(oldWorkingDirectory.c_str());
+ cmSystemTools::ChangeDirectory(oldWorkingDirectory);
cmCTestLog(this->CTest, ERROR_MESSAGE,
" Problems when submitting via CP"
<< std::endl);
ofs << " Problems when submitting via cp" << std::endl;
return -1;
}
- cmSystemTools::ChangeDirectory(oldWorkingDirectory.c_str());
+ cmSystemTools::ChangeDirectory(oldWorkingDirectory);
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
<< std::endl);
ofs << " Submission successful" << std::endl;
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index f21d166..435fb32 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -93,12 +93,12 @@ bool cmCTestSubdirCommand
fname += *it;
}
- if ( !cmSystemTools::FileIsDirectory(fname.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(fname) )
{
// No subdirectory? So what...
continue;
}
- cmSystemTools::ChangeDirectory(fname.c_str());
+ cmSystemTools::ChangeDirectory(fname);
const char* testFilename;
if( cmSystemTools::FileExists("CTestTestfile.cmake") )
{
@@ -120,7 +120,7 @@ bool cmCTestSubdirCommand
bool readit =
this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(),
fname.c_str());
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
if(!readit)
{
std::string m = "Could not find include file: ";
@@ -129,7 +129,7 @@ bool cmCTestSubdirCommand
return false;
}
}
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
return true;
}
@@ -175,7 +175,7 @@ bool cmCTestAddSubdirectoryCommand
}
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
std::string fname = cwd;
fname += "/";
fname += args[1];
@@ -185,7 +185,7 @@ bool cmCTestAddSubdirectoryCommand
// No subdirectory? So what...
return true;
}
- cmSystemTools::ChangeDirectory(fname.c_str());
+ cmSystemTools::ChangeDirectory(fname);
const char* testFilename;
if( cmSystemTools::FileExists("CTestTestfile.cmake") )
{
@@ -200,7 +200,7 @@ bool cmCTestAddSubdirectoryCommand
else
{
// No CTestTestfile? Who cares...
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
return true;
}
fname += "/";
@@ -208,7 +208,7 @@ bool cmCTestAddSubdirectoryCommand
bool readit =
this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(),
fname.c_str());
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
if(!readit)
{
std::string m = "Could not find include file: ";
@@ -1498,9 +1498,9 @@ std::string cmCTestTestHandler
{
// first check without exe extension
if(cmSystemTools::FileExists(attempted[ai].c_str())
- && !cmSystemTools::FileIsDirectory(attempted[ai].c_str()))
+ && !cmSystemTools::FileIsDirectory(attempted[ai]))
{
- fullPath = cmSystemTools::CollapseFullPath(attempted[ai].c_str());
+ fullPath = cmSystemTools::CollapseFullPath(attempted[ai]);
resultingConfig = attemptedConfigs[ai];
}
// then try with the exe extension
@@ -1510,9 +1510,9 @@ std::string cmCTestTestHandler
tempPath = attempted[ai];
tempPath += cmSystemTools::GetExecutableExtension();
if(cmSystemTools::FileExists(tempPath.c_str())
- && !cmSystemTools::FileIsDirectory(tempPath.c_str()))
+ && !cmSystemTools::FileIsDirectory(tempPath))
{
- fullPath = cmSystemTools::CollapseFullPath(tempPath.c_str());
+ fullPath = cmSystemTools::CollapseFullPath(tempPath);
resultingConfig = attemptedConfigs[ai];
}
else
@@ -1746,7 +1746,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
std::string dirName = this->CTest->GetBinaryDir() + "/Testing/Temporary";
cmsys::Directory directory;
- if (directory.Load(dirName.c_str()) == 0)
+ if (directory.Load(dirName) == 0)
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to read the contents of "
<< dirName << std::endl);
@@ -1754,7 +1754,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
}
int numFiles = static_cast<int>
- (cmsys::Directory::GetNumberOfFilesInDirectory(dirName.c_str()));
+ (cmsys::Directory::GetNumberOfFilesInDirectory(dirName));
std::string pattern = "LastTestsFailed";
std::string logName = "";
@@ -1777,7 +1777,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
// if multiple matching logs were found we use the most recently
// modified one.
int res;
- cmSystemTools::FileTimeCompare(logName.c_str(), fileName.c_str(), &res);
+ cmSystemTools::FileTimeCompare(logName, fileName, &res);
if (res == -1)
{
logName = fileName;
diff --git a/Source/CTest/cmParseCacheCoverage.cxx b/Source/CTest/cmParseCacheCoverage.cxx
index d17f169..97454a8 100644
--- a/Source/CTest/cmParseCacheCoverage.cxx
+++ b/Source/CTest/cmParseCacheCoverage.cxx
@@ -31,7 +31,7 @@ bool cmParseCacheCoverage::LoadCoverageData(const char* d)
{
std::string file = dir.GetFile(i);
if(file != "." && file != ".."
- && !cmSystemTools::FileIsDirectory(file.c_str()))
+ && !cmSystemTools::FileIsDirectory(file))
{
std::string path = d;
path += "/";
diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx
index 6b98056..0742be1 100644
--- a/Source/CTest/cmParseCoberturaCoverage.cxx
+++ b/Source/CTest/cmParseCoberturaCoverage.cxx
@@ -71,6 +71,7 @@ protected:
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
<< atts[tagCount+1]<< std::endl);
std::string filename = atts[tagCount+1];
+ this->CurFileName = "";
for(size_t i=0;i < FilePaths.size();i++)
{
finalpath = FilePaths[i] + "/" + filename;
diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx
new file mode 100644
index 0000000..ad71c85
--- /dev/null
+++ b/Source/CTest/cmParseDelphiCoverage.cxx
@@ -0,0 +1,253 @@
+#include "cmStandardIncludes.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "cmSystemTools.h"
+#include "cmXMLParser.h"
+#include "cmParseDelphiCoverage.h"
+#include <cmsys/Directory.hxx>
+#include <cmsys/Glob.hxx>
+#include <cmsys/FStream.hxx>
+
+
+class cmParseDelphiCoverage::HTMLParser
+{
+public:
+ typedef cmCTestCoverageHandlerContainer::SingleFileCoverageVector
+ FileLinesType;
+ HTMLParser(cmCTest* ctest, cmCTestCoverageHandlerContainer& cont)
+ : CTest(ctest), Coverage(cont)
+ {
+ }
+
+ virtual ~HTMLParser()
+ {
+ }
+
+ bool initializeDelphiFile(const std::string filename,
+ cmParseDelphiCoverage::HTMLParser::FileLinesType &coverageVector)
+ {
+ std::string line;
+ size_t comPos;
+ size_t semiPos;
+ bool blockComFlag= false;
+ bool lineComFlag= false;
+ std::vector<std::string> beginSet;
+ cmsys::ifstream in(filename.c_str());
+ if(!in)
+ {
+ return false;
+ }
+ while(cmSystemTools::GetLineFromStream(in, line))
+ {
+ lineComFlag=false;
+ // Unique cases found in lines.
+ size_t beginPos = line.find("begin");
+
+ //Check that the begin is the first non-space string on the line
+ if( (beginPos == line.find_first_not_of(' ')) && beginPos != line.npos )
+ {
+ beginSet.push_back("begin");
+ coverageVector.push_back(-1);
+ continue;
+ }
+ else if(line.find('{') != line.npos)
+ {
+ blockComFlag=true;
+ }
+ else if(line.find('}') != line.npos)
+ {
+ blockComFlag=false;
+ coverageVector.push_back(-1);
+ continue;
+ }
+ else if((line.find("end;") != line.npos)
+ && (beginSet.size() > 0))
+ {
+ beginSet.pop_back();
+ coverageVector.push_back(-1);
+ continue;
+ }
+
+ // This checks for comments after lines of code, finding the
+ // comment symbol after the ending semicolon.
+ comPos = line.find("//");
+ if(comPos != line.npos)
+ {
+ semiPos= line.find(';');
+ if(comPos < semiPos)
+ {
+ lineComFlag=true;
+ }
+ }
+ //Based up what was found, add a line to the coverageVector
+ if((beginSet.size() > 0) && line != "" && !blockComFlag
+ && !lineComFlag)
+ {
+ coverageVector.push_back(0);
+ }
+ else
+ {
+ coverageVector.push_back(-1);
+ }
+ }
+ return true;
+ }
+ bool ParseFile(const char* file)
+ {
+ std::string line=file;
+ std::string lineresult;
+ std::string lastroutine;
+ std::string filename;
+ std::string filelineoffset;
+ size_t afterLineNum = 0;
+ size_t lastoffset = 0;
+ size_t endcovpos = 0;
+ size_t endnamepos = 0;
+ size_t pos = 0;
+
+ /*
+ * This first 'while' section goes through the found HTML
+ * file name and attempts to capture the source file name
+ * which is set as part of the HTML file name: the name of
+ * the file is found in parenthesis '()'
+ *
+ * See test HTML file name: UTCovTest(UTCovTest.pas).html.
+ *
+ * Find the text inside each pair of parenthesis and check
+ * to see if it ends in '.pas'. If it can't be found,
+ * exit the function.
+ */
+ while(true)
+ {
+ lastoffset = line.find('(',pos);
+ if(lastoffset==line.npos)
+ {
+ cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
+ endnamepos << "File not found " << lastoffset << std::endl);
+ return false;
+ }
+ endnamepos = line.find(')',lastoffset);
+ filename = line.substr(lastoffset+1,
+ (endnamepos-1)-lastoffset);
+ if(filename.find(".pas") != filename.npos)
+ {
+ cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
+ "Coverage found for file: " << filename << std::endl);
+ break;
+ }
+ pos = lastoffset+1;
+ endnamepos = 0;
+ lastoffset =0;
+ }
+ /*
+ * Glob through the source directory for the
+ * file found above
+ */
+ cmsys::Glob gl;
+ gl.RecurseOn();
+ gl.RecurseThroughSymlinksOff();
+ std::string glob = Coverage.SourceDir + "*/" + filename;
+ gl.FindFiles(glob);
+ std::vector<std::string> const& files = gl.GetFiles();
+ if(files.size() == 0)
+ {
+ /*
+ * If that doesn't find any matching files
+ * return a failure.
+ */
+ cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
+ "Unable to find file matching" << glob << std::endl);
+ return false;
+ }
+ FileLinesType& coverageVector =
+ this->Coverage.TotalCoverage[files[0]];
+
+ /*
+ * Initialize the file to have all code between 'begin' and
+ * 'end' tags marked as executable
+ */
+
+ this->initializeDelphiFile(files[0],coverageVector);
+
+ cmsys::ifstream in(file);
+ if(!in)
+ {
+ return false;
+ }
+
+ /*
+ * Now read the HTML file, looking for the lines that have an
+ * "inline" in it. Then parse out the "class" value of that
+ * line to determine if the line is executed or not.
+ *
+ * Sample HTML line:
+ *
+ * <tr class="covered"><td>47</td><td><pre style="display:inline;">
+ * &nbsp;CheckEquals(1,2-1);</pre></td></tr>
+ *
+ */
+
+ while( cmSystemTools::GetLineFromStream(in, line))
+ {
+ if(line.find("inline") == line.npos)
+ {
+ continue;
+ }
+
+ lastoffset = line.find("class=");
+ endcovpos = line.find(">",lastoffset);
+ lineresult = line.substr(lastoffset+7,(endcovpos-8)-lastoffset);
+
+ if(lineresult == "covered")
+ {
+ afterLineNum = line.find('<',endcovpos+5);
+ filelineoffset= line.substr(endcovpos+5,
+ afterLineNum-(endcovpos+5));
+ coverageVector[atoi(filelineoffset.c_str())-1] = 1;
+ }
+ }
+ return true;
+ }
+
+
+ private:
+ cmCTest* CTest;
+ cmCTestCoverageHandlerContainer& Coverage;
+};
+
+cmParseDelphiCoverage::cmParseDelphiCoverage(
+ cmCTestCoverageHandlerContainer& cont, cmCTest* ctest)
+ :Coverage(cont), CTest(ctest)
+ {
+ }
+
+bool cmParseDelphiCoverage::LoadCoverageData(
+ const std::vector<std::string> files)
+ {
+ size_t i;
+ std::string path;
+ size_t numf = files.size();
+ for (i = 0; i < numf; i++)
+ {
+ path = files[i];
+
+ cmCTestLog(this->CTest,HANDLER_VERBOSE_OUTPUT,
+ "Reading HTML File " << path << std::endl);
+ if(cmSystemTools::GetFilenameLastExtension(path) == ".html")
+ {
+ if(!this->ReadDelphiHTML(path.c_str()))
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ };
+
+bool cmParseDelphiCoverage::ReadDelphiHTML(const char* file)
+ {
+ cmParseDelphiCoverage::HTMLParser
+ parser(this->CTest, this->Coverage);
+ parser.ParseFile(file);
+ return true;
+ };
diff --git a/Source/CTest/cmParseDelphiCoverage.h b/Source/CTest/cmParseDelphiCoverage.h
new file mode 100644
index 0000000..018340b
--- /dev/null
+++ b/Source/CTest/cmParseDelphiCoverage.h
@@ -0,0 +1,46 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2009 Kitware, Inc.
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+
+#ifndef cmParseDelphiCoverage_h
+#define cmParseDelphiCoverage_h
+
+#include "cmStandardIncludes.h"
+#include "cmCTestCoverageHandler.h"
+
+
+/** \class cmParseDelphiCoverage
+ * \brief Parse Delphi coverage information
+ *
+ * This class is used to parse Delphi(Pascal) coverage information
+ * generated by the Delphi-Code-Coverage tool
+ *
+ * https://code.google.com/p/delphi-code-coverage/
+ */
+
+class cmParseDelphiCoverage
+ {
+ public:
+ cmParseDelphiCoverage(cmCTestCoverageHandlerContainer& cont,
+ cmCTest* ctest);
+ bool LoadCoverageData(const std::vector<std::string> files);
+ bool ReadDelphiHTML(const char* file);
+ // Read a single HTML file from output
+ bool ReadHTMLFile(const char* f);
+
+
+ protected:
+
+ class HTMLParser;
+ cmCTestCoverageHandlerContainer& Coverage;
+ cmCTest* CTest;
+ };
+#endif
diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx
index be10c2e..d77244a 100644
--- a/Source/CTest/cmParseGTMCoverage.cxx
+++ b/Source/CTest/cmParseGTMCoverage.cxx
@@ -30,7 +30,7 @@ bool cmParseGTMCoverage::LoadCoverageData(const char* d)
{
std::string file = dir.GetFile(i);
if(file != "." && file != ".."
- && !cmSystemTools::FileIsDirectory(file.c_str()))
+ && !cmSystemTools::FileIsDirectory(file))
{
std::string path = d;
path += "/";
diff --git a/Source/CTest/cmParsePHPCoverage.cxx b/Source/CTest/cmParsePHPCoverage.cxx
index 3b7f968..c7f5a68 100644
--- a/Source/CTest/cmParsePHPCoverage.cxx
+++ b/Source/CTest/cmParsePHPCoverage.cxx
@@ -239,7 +239,7 @@ bool cmParsePHPCoverage::ReadPHPCoverageDirectory(const char* d)
{
std::string file = dir.GetFile(i);
if(file != "." && file != ".."
- && !cmSystemTools::FileIsDirectory(file.c_str()))
+ && !cmSystemTools::FileIsDirectory(file))
{
std::string path = d;
path += "/";
diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx
index cd93bc3..89e2238 100644
--- a/Source/CursesDialog/cmCursesPathWidget.cxx
+++ b/Source/CursesDialog/cmCursesPathWidget.cxx
@@ -69,7 +69,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
cstr = cstr.substr(0, cstr.size()-1);
}
- if ( cmSystemTools::FileIsDirectory(cstr.c_str()) )
+ if ( cmSystemTools::FileIsDirectory(cstr) )
{
cstr += "/";
}
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 6a95550..2d19610 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -300,7 +300,7 @@ bool cmAddCustomCommandCommand
if(!working.empty())
{
const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
- working = cmSystemTools::CollapseFullPath(working.c_str(), build_dir);
+ working = cmSystemTools::CollapseFullPath(working, build_dir);
}
// Choose which mode of the command to use.
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index 2fb0eb3..3235502 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -218,7 +218,7 @@ bool cmAddCustomTargetCommand
{
const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
working_directory =
- cmSystemTools::CollapseFullPath(working_directory.c_str(), build_dir);
+ cmSystemTools::CollapseFullPath(working_directory, build_dir);
}
// Add the utility target to the makefile.
diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx
index 4ea2524..477a3d9 100644
--- a/Source/cmAddSubDirectoryCommand.cxx
+++ b/Source/cmAddSubDirectoryCommand.cxx
@@ -61,7 +61,7 @@ bool cmAddSubDirectoryCommand::InitialPass
srcPath += "/";
srcPath += srcArg;
}
- if(!cmSystemTools::FileIsDirectory(srcPath.c_str()))
+ if(!cmSystemTools::FileIsDirectory(srcPath))
{
std::string error = "given source \"";
error += srcArg;
@@ -69,7 +69,7 @@ bool cmAddSubDirectoryCommand::InitialPass
this->SetError(error);
return false;
}
- srcPath = cmSystemTools::CollapseFullPath(srcPath.c_str());
+ srcPath = cmSystemTools::CollapseFullPath(srcPath);
// Compute the full path to the binary directory.
std::string binPath;
@@ -78,7 +78,7 @@ bool cmAddSubDirectoryCommand::InitialPass
// No binary directory was specified. If the source directory is
// not a subdirectory of the current directory then it is an
// error.
- if(!cmSystemTools::IsSubDirectory(srcPath.c_str(),
+ if(!cmSystemTools::IsSubDirectory(srcPath,
this->Makefile->GetCurrentDirectory()))
{
cmOStringStream e;
@@ -118,7 +118,7 @@ bool cmAddSubDirectoryCommand::InitialPass
binPath += binArg;
}
}
- binPath = cmSystemTools::CollapseFullPath(binPath.c_str());
+ binPath = cmSystemTools::CollapseFullPath(binPath);
// Add the subdirectory using the computed full paths.
this->Makefile->AddSubDirectory(srcPath, binPath,
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index a7905a4..f88f72c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -208,7 +208,7 @@ int cmCTest::HTTPRequest(std::string url, HTTPMethod method,
return -1;
}
::curl_easy_setopt(curl, CURLOPT_PUT, 1);
- file = cmsys::SystemTools::Fopen(putFile.c_str(), "rb");
+ file = cmsys::SystemTools::Fopen(putFile, "rb");
::curl_easy_setopt(curl, CURLOPT_INFILE, file);
//fall through to append GET fields
case cmCTest::HTTP_GET:
@@ -524,7 +524,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
std::string testingDir = this->BinaryDir + "/Testing";
if ( cmSystemTools::FileExists(testingDir.c_str()) )
{
- if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(testingDir) )
{
cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir
<< " is in the place of the testing directory" << std::endl);
@@ -809,7 +809,7 @@ bool cmCTest::UpdateCTestConfiguration()
if ( !this->GetCTestConfiguration("BuildDirectory").empty() )
{
this->BinaryDir = this->GetCTestConfiguration("BuildDirectory");
- cmSystemTools::ChangeDirectory(this->BinaryDir.c_str());
+ cmSystemTools::ChangeDirectory(this->BinaryDir);
}
this->TimeOut = atoi(this->GetCTestConfiguration("TimeOut").c_str());
if ( this->ProduceXML )
@@ -884,7 +884,7 @@ bool cmCTest::OpenOutputFile(const std::string& path,
}
if ( cmSystemTools::FileExists(testingDir.c_str()) )
{
- if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(testingDir) )
{
cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir
<< " is in the place of the testing directory"
@@ -1061,17 +1061,17 @@ int cmCTest::ProcessTests()
if ( !notest )
{
std::string notes_dir = this->BinaryDir + "/Testing/Notes";
- if ( cmSystemTools::FileIsDirectory(notes_dir.c_str()) )
+ if ( cmSystemTools::FileIsDirectory(notes_dir) )
{
cmsys::Directory d;
- d.Load(notes_dir.c_str());
+ d.Load(notes_dir);
unsigned long kk;
for ( kk = 0; kk < d.GetNumberOfFiles(); kk ++ )
{
const char* file = d.GetFile(kk);
std::string fullname = notes_dir + "/" + file;
if ( cmSystemTools::FileExists(fullname.c_str()) &&
- !cmSystemTools::FileIsDirectory(fullname.c_str()) )
+ !cmSystemTools::FileIsDirectory(fullname) )
{
if ( this->NotesFiles.size() > 0 )
{
@@ -1294,7 +1294,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
"Test timeout computed to be: " << timeout << "\n");
if(cmSystemTools::SameFile(
- argv[0], cmSystemTools::GetCTestCommand().c_str()) &&
+ argv[0], cmSystemTools::GetCTestCommand()) &&
!this->ForceNewCTestProcess)
{
cmCTest inst;
@@ -1342,7 +1342,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
{
*log << *output;
}
- cmSystemTools::ChangeDirectory(oldpath.c_str());
+ cmSystemTools::ChangeDirectory(oldpath);
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
"Internal cmCTest object used to run test." << std::endl
@@ -1681,7 +1681,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file)
return "";
}
std::string base64 = this->Base64EncodeFile(tarFile);
- cmSystemTools::RemoveFile(tarFile.c_str());
+ cmSystemTools::RemoveFile(tarFile);
return base64;
}
@@ -2628,10 +2628,10 @@ std::string cmCTest::GetShortPathToFile(const char* cfname)
{
const std::string& sourceDir
= cmSystemTools::CollapseFullPath(
- this->GetCTestConfiguration("SourceDirectory").c_str());
+ this->GetCTestConfiguration("SourceDirectory"));
const std::string& buildDir
= cmSystemTools::CollapseFullPath(
- this->GetCTestConfiguration("BuildDirectory").c_str());
+ this->GetCTestConfiguration("BuildDirectory"));
std::string fname = cmSystemTools::CollapseFullPath(cfname);
// Find relative paths to both directories
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index d6b84a0..9fc1a5a 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -189,7 +189,7 @@ void cmCacheManager::CleanCMakeFiles(const std::string& path)
for(std::vector<std::string>::iterator i = files.begin();
i != files.end(); ++i)
{
- cmSystemTools::RemoveFile(i->c_str());
+ cmSystemTools::RemoveFile(*i);
}
}
@@ -336,7 +336,7 @@ bool cmCacheManager::LoadCache(const std::string& path,
cmSystemTools::ConvertToUnixSlashes(currentcwd);
currentcwd += "/CMakeCache.txt";
oldcwd += "/CMakeCache.txt";
- if(!cmSystemTools::SameFile(oldcwd.c_str(), currentcwd.c_str()))
+ if(!cmSystemTools::SameFile(oldcwd, currentcwd))
{
std::string message =
std::string("The current CMakeCache.txt directory ") +
@@ -586,13 +586,13 @@ bool cmCacheManager::DeleteCache(const std::string& path)
cacheFile += "/CMakeCache.txt";
if(cmSystemTools::FileExists(cacheFile.c_str()))
{
- cmSystemTools::RemoveFile(cacheFile.c_str());
+ cmSystemTools::RemoveFile(cacheFile);
// now remove the files in the CMakeFiles directory
// this cleans up language cache files
cmakeFiles += cmake::GetCMakeFilesDirectory();
- if(cmSystemTools::FileIsDirectory(cmakeFiles.c_str()))
+ if(cmSystemTools::FileIsDirectory(cmakeFiles))
{
- cmSystemTools::RemoveADirectory(cmakeFiles.c_str());
+ cmSystemTools::RemoveADirectory(cmakeFiles);
}
}
return true;
diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx
index c5146c5..9f8a4de 100644
--- a/Source/cmCommandArgumentParser.cxx
+++ b/Source/cmCommandArgumentParser.cxx
@@ -183,12 +183,6 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
#define YYINITDEPTH 10000
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch statement contains default but no
diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y
index 48f5c8e..b1d53f6 100644
--- a/Source/cmCommandArgumentParser.y
+++ b/Source/cmCommandArgumentParser.y
@@ -64,12 +64,6 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
#define YYINITDEPTH 10000
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch statement contains default but no
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index e1852a3..f4fa5c6 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -675,7 +675,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
// This is not a CMake target. Use the name given.
if(cmSystemTools::FileIsFullPath(item.c_str()))
{
- if(cmSystemTools::FileIsDirectory(item.c_str()))
+ if(cmSystemTools::FileIsDirectory(item))
{
// This is a directory.
this->AddDirectoryItem(item);
@@ -1937,10 +1937,10 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
// Do not add any path inside the source or build tree.
const char* topSourceDir = this->Makefile->GetHomeDirectory();
const char* topBinaryDir = this->Makefile->GetHomeOutputDirectory();
- if(!cmSystemTools::ComparePath(ri->c_str(), topSourceDir) &&
- !cmSystemTools::ComparePath(ri->c_str(), topBinaryDir) &&
- !cmSystemTools::IsSubDirectory(ri->c_str(), topSourceDir) &&
- !cmSystemTools::IsSubDirectory(ri->c_str(), topBinaryDir))
+ if(!cmSystemTools::ComparePath(*ri, topSourceDir) &&
+ !cmSystemTools::ComparePath(*ri, topBinaryDir) &&
+ !cmSystemTools::IsSubDirectory(*ri, topSourceDir) &&
+ !cmSystemTools::IsSubDirectory(*ri, topBinaryDir))
{
std::string d = *ri;
if (!rootPath.empty() && d.find(rootPath) == 0)
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index 395e6c8..af4805e 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -32,7 +32,7 @@ bool cmConfigureFileCommand
this->InputFile += inFile;
// If the input location is a directory, error out.
- if(cmSystemTools::FileIsDirectory(this->InputFile.c_str()))
+ if(cmSystemTools::FileIsDirectory(this->InputFile))
{
cmOStringStream e;
e << "input location\n"
@@ -51,7 +51,7 @@ bool cmConfigureFileCommand
this->OutputFile += outFile;
// If the output location is already a directory put the file in it.
- if(cmSystemTools::FileIsDirectory(this->OutputFile.c_str()))
+ if(cmSystemTools::FileIsDirectory(this->OutputFile))
{
this->OutputFile += "/";
this->OutputFile += cmSystemTools::GetFilenameName(inFile);
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index bc5708d..512f5cf 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -233,7 +233,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
{
// remove any CMakeCache.txt files so we will have a clean test
std::string ccFile = this->BinaryDirectory + "/CMakeCache.txt";
- cmSystemTools::RemoveFile(ccFile.c_str());
+ cmSystemTools::RemoveFile(ccFile);
// Choose sources.
if(!useSources)
@@ -279,7 +279,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
sourceDirectory = this->BinaryDirectory.c_str();
// now create a CMakeLists.txt file in that directory
- FILE *fout = cmsys::SystemTools::Fopen(outFileName.c_str(),"w");
+ FILE *fout = cmsys::SystemTools::Fopen(outFileName,"w");
if (!fout)
{
cmOStringStream e;
@@ -514,8 +514,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
if ((res==0) && (copyFile.size()))
{
if(this->OutputFile.empty() ||
- !cmSystemTools::CopyFileAlways(this->OutputFile.c_str(),
- copyFile.c_str()))
+ !cmSystemTools::CopyFileAlways(this->OutputFile,
+ copyFile))
{
cmOStringStream emsg;
emsg << "Cannot copy output executable\n"
@@ -580,10 +580,10 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir)
std::string fullPath = binDir;
fullPath += "/";
fullPath += dir.GetFile(static_cast<unsigned long>(fileNum));
- if(cmSystemTools::FileIsDirectory(fullPath.c_str()))
+ if(cmSystemTools::FileIsDirectory(fullPath))
{
this->CleanupFiles(fullPath.c_str());
- cmSystemTools::RemoveADirectory(fullPath.c_str());
+ cmSystemTools::RemoveADirectory(fullPath);
}
else
{
@@ -599,7 +599,7 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir)
}
if(retry.Count == 0)
#else
- if(!cmSystemTools::RemoveFile(fullPath.c_str()))
+ if(!cmSystemTools::RemoveFile(fullPath))
#endif
{
std::string m = "Remove failed on file: " + fullPath;
@@ -649,7 +649,7 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName)
command += tmpOutputFile;
if(cmSystemTools::FileExists(command.c_str()))
{
- tmpOutputFile = cmSystemTools::CollapseFullPath(command.c_str());
+ tmpOutputFile = cmSystemTools::CollapseFullPath(command);
this->OutputFile = tmpOutputFile;
return;
}
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx
index 134f45b..947db82 100644
--- a/Source/cmDepends.cxx
+++ b/Source/cmDepends.cxx
@@ -94,7 +94,7 @@ bool cmDepends::Check(const char *makeFile, const char *internalFile,
// Get the CWD but do not call CollapseFullPath because
// we only need it to cd back, and the form does not matter
oldcwd = cmSystemTools::GetCurrentWorkingDirectory(false);
- cmSystemTools::ChangeDirectory(this->CompileDirectory.c_str());
+ cmSystemTools::ChangeDirectory(this->CompileDirectory);
}
// Check whether dependencies must be regenerated.
@@ -111,7 +111,7 @@ bool cmDepends::Check(const char *makeFile, const char *internalFile,
// Restore working directory.
if(oldcwd != ".")
{
- cmSystemTools::ChangeDirectory(oldcwd.c_str());
+ cmSystemTools::ChangeDirectory(oldcwd);
}
return okay;
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 8fc8347..4082d24 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -668,7 +668,7 @@ bool cmDependsFortran::CopyModule(const std::vector<std::string>& args)
if(cmDependsFortran::ModulesDiffer(mod_upper.c_str(), stamp.c_str(),
compilerId.c_str()))
{
- if(!cmSystemTools::CopyFileAlways(mod_upper.c_str(), stamp.c_str()))
+ if(!cmSystemTools::CopyFileAlways(mod_upper, stamp))
{
std::cerr << "Error copying Fortran module from \""
<< mod_upper << "\" to \"" << stamp
@@ -683,7 +683,7 @@ bool cmDependsFortran::CopyModule(const std::vector<std::string>& args)
if(cmDependsFortran::ModulesDiffer(mod_lower.c_str(), stamp.c_str(),
compilerId.c_str()))
{
- if(!cmSystemTools::CopyFileAlways(mod_lower.c_str(), stamp.c_str()))
+ if(!cmSystemTools::CopyFileAlways(mod_lower, stamp))
{
std::cerr << "Error copying Fortran module from \""
<< mod_lower << "\" to \"" << stamp
diff --git a/Source/cmDependsFortranParser.cxx b/Source/cmDependsFortranParser.cxx
index 7b49a9c..9d51025 100644
--- a/Source/cmDependsFortranParser.cxx
+++ b/Source/cmDependsFortranParser.cxx
@@ -144,12 +144,6 @@ static bool cmDependsFortranParserIsKeyword(const char* word,
}
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch contains default but no case. */
diff --git a/Source/cmDependsFortranParser.y b/Source/cmDependsFortranParser.y
index d814f30..a987c13 100644
--- a/Source/cmDependsFortranParser.y
+++ b/Source/cmDependsFortranParser.y
@@ -68,12 +68,6 @@ static bool cmDependsFortranParserIsKeyword(const char* word,
}
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch contains default but no case. */
diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx
index 586c0de..899f4d2 100644
--- a/Source/cmDependsJavaParser.cxx
+++ b/Source/cmDependsJavaParser.cxx
@@ -336,12 +336,6 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
#define jpStoreClass(str) \
yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str))
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch statement contains default but
diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y
index 944d4b5..b66dc6d 100644
--- a/Source/cmDependsJavaParser.y
+++ b/Source/cmDependsJavaParser.y
@@ -52,12 +52,6 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval)
#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str))
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch statement contains default but no case. */
diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx
index 77880c0..c12b42e 100644
--- a/Source/cmExprParser.cxx
+++ b/Source/cmExprParser.cxx
@@ -157,12 +157,6 @@ static void cmExprError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch statement contains default but
diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y
index 12c2e48..f2c85d0 100644
--- a/Source/cmExprParser.y
+++ b/Source/cmExprParser.y
@@ -52,12 +52,6 @@ static void cmExprError(yyscan_t yyscanner, const char* message);
/* Disable some warnings in the generated code. */
-#ifdef __BORLANDC__
-# pragma warn -8004 /* Variable assigned a value that is not used. */
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8060 /* possibly incorrect assignment */
-# pragma warn -8066 /* unreachable code */
-#endif
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
# pragma warning (disable: 4065) /* Switch statement contains default but no case. */
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 56a6edb..79d7bcaff 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -276,7 +276,7 @@ void cmExtraCodeBlocksGenerator
it->second[0]->GetMakefile()->GetHomeDirectory(),
jt->c_str());
std::vector<std::string> splitted;
- cmSystemTools::SplitPath(relative.c_str(), splitted, false);
+ cmSystemTools::SplitPath(relative, splitted, false);
// Split filename from path
std::string fileName = *(splitted.end()-1);
splitted.erase(splitted.end() - 1, splitted.end());
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 1beb3fd..2f69882 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -124,8 +124,8 @@ void cmExtraEclipseCDT4Generator::Generate()
"Enable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT instead.");
}
- if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
- this->HomeDirectory.c_str()))
+ if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory,
+ this->HomeDirectory))
{
mf->IssueMessage(cmake::WARNING, "The build directory is a subdirectory "
"of the source directory.\n"
@@ -495,8 +495,8 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
std::string linkSourceDirectory = this->GetEclipsePath(
mf->GetStartDirectory());
// .project dir can't be subdir of a linked resource dir
- if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
- linkSourceDirectory.c_str()))
+ if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory,
+ linkSourceDirectory))
{
this->AppendLinkedResource(fout, sourceLinkedResourceName,
this->GetEclipsePath(linkSourceDirectory),
@@ -590,7 +590,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
++fileIt)
{
std::string fullPath = (*fileIt)->GetFullPath();
- if (!cmSystemTools::FileIsDirectory(fullPath.c_str()))
+ if (!cmSystemTools::FileIsDirectory(fullPath))
{
std::string linkName4 = linkName3;
linkName4 += "/";
@@ -635,8 +635,8 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects(
// a linked resource must not point to a parent directory of .project or
// .project itself
if ((baseDir != linkSourceDirectory) &&
- !cmSystemTools::IsSubDirectory(baseDir.c_str(),
- linkSourceDirectory.c_str()))
+ !cmSystemTools::IsSubDirectory(baseDir,
+ linkSourceDirectory))
{
std::string linkName = "[Subprojects]/";
linkName += it->first;
@@ -663,7 +663,7 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
{
if (!inc->empty())
{
- std::string dir = cmSystemTools::CollapseFullPath(inc->c_str());
+ std::string dir = cmSystemTools::CollapseFullPath(*inc);
// handle framework include dirs on OSX, the remainder after the
// Frameworks/ part has to be stripped
@@ -819,7 +819,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
// exlude source directory from output search path
// - only if not named the same as an output directory
if (!cmSystemTools::FileIsDirectory(
- std::string(this->HomeOutputDirectory + "/" + *it).c_str()))
+ std::string(this->HomeOutputDirectory + "/" + *it)))
{
excludeFromOut += this->EscapeForXML(*it) + "/|";
}
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 1325cec..7ebd750 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -220,8 +220,6 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
cmSystemTools::SetPermissions(fileName.c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
mode | S_IWRITE
-#elif defined( __BORLANDC__ )
- mode | S_IWUSR
#else
mode | S_IWUSR | S_IWGRP
#endif
@@ -1504,7 +1502,7 @@ bool cmFileCopier::Run(std::vector<std::string> const& args)
{
// Split the input file into its directory and name components.
std::vector<std::string> fromPathComponents;
- cmSystemTools::SplitPath(files[i].c_str(), fromPathComponents);
+ cmSystemTools::SplitPath(files[i], fromPathComponents);
std::string fromName = *(fromPathComponents.end()-1);
std::string fromDir = cmSystemTools::JoinPath(fromPathComponents.begin(),
fromPathComponents.end()-1);
@@ -2203,7 +2201,7 @@ bool cmFileInstaller::HandleInstallDestination()
return false;
}
}
- if ( !cmSystemTools::FileIsDirectory(destination.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(destination) )
{
std::string errstring = "INSTALL destination: " + destination +
" is not a directory.";
@@ -2553,14 +2551,14 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args,
fileName += "/" + *i;
}
- if(cmSystemTools::FileIsDirectory(fileName.c_str()) &&
- !cmSystemTools::FileIsSymlink(fileName.c_str()) && recurse)
+ if(cmSystemTools::FileIsDirectory(fileName) &&
+ !cmSystemTools::FileIsSymlink(fileName) && recurse)
{
- cmSystemTools::RemoveADirectory(fileName.c_str());
+ cmSystemTools::RemoveADirectory(fileName);
}
else
{
- cmSystemTools::RemoveFile(fileName.c_str());
+ cmSystemTools::RemoveFile(fileName);
}
}
return true;
@@ -2584,7 +2582,7 @@ bool cmFileCommand::HandleCMakePathCommand(std::vector<std::string>
#else
char pathSep = ':';
#endif
- std::vector<cmsys::String> path = cmSystemTools::SplitString(i->c_str(),
+ std::vector<cmsys::String> path = cmSystemTools::SplitString(*i,
pathSep);
i++;
const char* var = i->c_str();
@@ -3241,7 +3239,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
// Open file for reading:
//
- FILE *fin = cmsys::SystemTools::Fopen(filename.c_str(), "rb");
+ FILE *fin = cmsys::SystemTools::Fopen(filename, "rb");
if(!fin)
{
std::string errStr = "UPLOAD cannot open file '";
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 10241f2..6376d42 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -182,9 +182,9 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
// already inside. Skip the unrooted path if it is relative to
// a user home directory or is empty.
std::string rootedDir;
- if(cmSystemTools::IsSubDirectory(ui->c_str(), ri->c_str())
+ if(cmSystemTools::IsSubDirectory(*ui, *ri)
|| (stagePrefix
- && cmSystemTools::IsSubDirectory(ui->c_str(), stagePrefix)))
+ && cmSystemTools::IsSubDirectory(*ui, stagePrefix)))
{
rootedDir = *ui;
}
@@ -195,7 +195,7 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
rootedDir += "/";
// Append the original path with its old root removed.
- rootedDir += cmSystemTools::SplitPathRootComponent(ui->c_str());
+ rootedDir += cmSystemTools::SplitPathRootComponent(*ui);
}
// Store the new path.
@@ -428,7 +428,7 @@ void cmFindCommon::AddPathInternal(std::string const& in_path,
// Convert to clean full path.
std::string fullPath =
- cmSystemTools::CollapseFullPath(in_path.c_str(), relbase);
+ cmSystemTools::CollapseFullPath(in_path, relbase);
// Insert the path if has not already been emitted.
if(this->SearchPathsEmitted.insert(fullPath).second)
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index fe5e45f..16deaab 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -107,7 +107,7 @@ void cmFindLibraryCommand::AddArchitecturePath(
// Follow "lib<suffix>".
std::string next_dir = cur_dir + suffix;
- if(cmSystemTools::FileIsDirectory(next_dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(next_dir))
{
next_dir += dir.substr(pos+3);
std::string::size_type next_pos = pos+3+strlen(suffix)+1;
@@ -115,7 +115,7 @@ void cmFindLibraryCommand::AddArchitecturePath(
}
// Follow "lib".
- if(cmSystemTools::FileIsDirectory(cur_dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(cur_dir))
{
this->AddArchitecturePath(dir, pos+3+1, suffix, false);
}
@@ -124,13 +124,13 @@ void cmFindLibraryCommand::AddArchitecturePath(
{
// Check for <dir><suffix>/.
std::string cur_dir = dir + suffix + "/";
- if(cmSystemTools::FileIsDirectory(cur_dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(cur_dir))
{
this->SearchPaths.push_back(cur_dir);
}
// Now add the original unchanged path
- if(cmSystemTools::FileIsDirectory(dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(dir))
{
this->SearchPaths.push_back(dir);
}
@@ -353,7 +353,7 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
if(cmSystemTools::FileExists(this->TestPath.c_str(), true))
{
this->BestPath =
- cmSystemTools::CollapseFullPath(this->TestPath.c_str());
+ cmSystemTools::CollapseFullPath(this->TestPath);
cmSystemTools::ConvertToUnixSlashes(this->BestPath);
return true;
}
@@ -382,7 +382,7 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
{
this->TestPath = path;
this->TestPath += origName;
- if(!cmSystemTools::FileIsDirectory(this->TestPath.c_str()))
+ if(!cmSystemTools::FileIsDirectory(this->TestPath))
{
// This is a matching file. Check if it is better than the
// best name found so far. Earlier prefixes are preferred,
@@ -506,9 +506,9 @@ std::string cmFindLibraryCommand::FindFrameworkLibraryNamesPerDir()
fwPath = *di;
fwPath += *ni;
fwPath += ".framework";
- if(cmSystemTools::FileIsDirectory(fwPath.c_str()))
+ if(cmSystemTools::FileIsDirectory(fwPath))
{
- return cmSystemTools::CollapseFullPath(fwPath.c_str());
+ return cmSystemTools::CollapseFullPath(fwPath);
}
}
}
@@ -532,9 +532,9 @@ std::string cmFindLibraryCommand::FindFrameworkLibraryDirsPerName()
fwPath = *di;
fwPath += *ni;
fwPath += ".framework";
- if(cmSystemTools::FileIsDirectory(fwPath.c_str()))
+ if(cmSystemTools::FileIsDirectory(fwPath))
{
- return cmSystemTools::CollapseFullPath(fwPath.c_str());
+ return cmSystemTools::CollapseFullPath(fwPath);
}
}
}
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 55a61f5..4633e71 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1335,7 +1335,7 @@ public:
void cmFindPackageCommand::LoadPackageRegistryDir(std::string const& dir)
{
cmsys::Directory files;
- if(!files.Load(dir.c_str()))
+ if(!files.Load(dir))
{
return;
}
@@ -1347,7 +1347,7 @@ void cmFindPackageCommand::LoadPackageRegistryDir(std::string const& dir)
fname += "/";
fname += files.GetFile(i);
- if(!cmSystemTools::FileIsDirectory(fname.c_str()))
+ if(!cmSystemTools::FileIsDirectory(fname))
{
// Hold this file hostage until it behaves.
cmFindPackageCommandHoldFile holdFile(fname.c_str());
@@ -1379,7 +1379,7 @@ bool cmFindPackageCommand::CheckPackageRegistryEntry(std::istream& is)
if(cmSystemTools::FileExists(fname.c_str()))
{
// The path exists. Look for the package here.
- if(!cmSystemTools::FileIsDirectory(fname.c_str()))
+ if(!cmSystemTools::FileIsDirectory(fname))
{
fname = cmSystemTools::GetFilenamePath(fname);
}
@@ -1419,7 +1419,7 @@ void cmFindPackageCommand::AddPrefixesBuilds()
cmSystemTools::ExpandRegistryValues(f);
cmSystemTools::ConvertToUnixSlashes(f);
if(cmSystemTools::FileIsFullPath(f.c_str()) &&
- cmSystemTools::FileIsDirectory(f.c_str()))
+ cmSystemTools::FileIsDirectory(f))
{
this->AddPathInternal(f, FullPath);
}
@@ -1847,7 +1847,7 @@ private:
// Construct a list of matches.
std::vector<std::string> matches;
cmsys::Directory d;
- d.Load(parent.c_str());
+ d.Load(parent);
for(unsigned long i=0; i < d.GetNumberOfFiles(); ++i)
{
const char* fname = d.GetFile(i);
@@ -1901,7 +1901,7 @@ private:
// Construct a list of matches.
std::vector<std::string> matches;
cmsys::Directory d;
- d.Load(parent.c_str());
+ d.Load(parent);
for(unsigned long i=0; i < d.GetNumberOfFiles(); ++i)
{
const char* fname = d.GetFile(i);
@@ -1955,7 +1955,7 @@ private:
// Look for matching files.
std::vector<std::string> matches;
cmsys::Directory d;
- d.Load(parent.c_str());
+ d.Load(parent);
for(unsigned long i=0; i < d.GetNumberOfFiles(); ++i)
{
const char* fname = d.GetFile(i);
@@ -2007,7 +2007,7 @@ private:
for(std::vector<std::string>::const_iterator fi = files.begin();
fi != files.end(); ++fi)
{
- if(cmSystemTools::FileIsDirectory(fi->c_str()))
+ if(cmSystemTools::FileIsDirectory(*fi))
{
if(this->Consider(*fi, lister))
{
@@ -2035,7 +2035,7 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in)
}
// Skip this if the prefix does not exist.
- if(!cmSystemTools::FileIsDirectory(prefix_in.c_str()))
+ if(!cmSystemTools::FileIsDirectory(prefix_in))
{
return false;
}
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index 5531cdf..f4cc4c2 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -136,7 +136,7 @@ cmFindPathCommand::FindHeaderInFramework(std::string const& file,
std::vector<std::string> files = globIt.GetFiles();
if(files.size())
{
- std::string fheader = cmSystemTools::CollapseFullPath(files[0].c_str());
+ std::string fheader = cmSystemTools::CollapseFullPath(files[0]);
if(this->IncludeFileInPath)
{
return fheader;
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index f6e37f6..b6577e1 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -97,7 +97,7 @@ std::string cmFindProgramCommand
std::string executable = GetBundleExecutable(appPath);
if (!executable.empty())
{
- return cmSystemTools::CollapseFullPath(executable.c_str());
+ return cmSystemTools::CollapseFullPath(executable);
}
}
}
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index 78ad4b2..600b793 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -152,7 +152,7 @@ void cmGeneratedFileStreamBase::Open(const char* name)
#endif
// Make sure the temporary file that will be used is not present.
- cmSystemTools::RemoveFile(this->TempName.c_str());
+ cmSystemTools::RemoveFile(this->TempName);
std::string dir = cmSystemTools::GetFilenamePath(this->TempName);
cmSystemTools::MakeDirectory(dir.c_str());
@@ -174,7 +174,7 @@ bool cmGeneratedFileStreamBase::Close()
if(!this->Name.empty() &&
this->Okay &&
(!this->CopyIfDifferent ||
- cmSystemTools::FilesDiffer(this->TempName.c_str(), resname.c_str())))
+ cmSystemTools::FilesDiffer(this->TempName, resname)))
{
// The destination is to be replaced. Rename the temporary to the
// destination atomically.
@@ -185,7 +185,7 @@ bool cmGeneratedFileStreamBase::Close()
{
this->RenameFile(gzname.c_str(), resname.c_str());
}
- cmSystemTools::RemoveFile(gzname.c_str());
+ cmSystemTools::RemoveFile(gzname);
}
else
{
@@ -198,7 +198,7 @@ bool cmGeneratedFileStreamBase::Close()
// Else, the destination was not replaced.
//
// Always delete the temporary file. We never want it to stay around.
- cmSystemTools::RemoveFile(this->TempName.c_str());
+ cmSystemTools::RemoveFile(this->TempName);
return replaced;
}
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 7fc1464..09d02ea 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -33,18 +33,10 @@ cmGeneratorExpression::cmGeneratorExpression(
cmsys::auto_ptr<cmCompiledGeneratorExpression>
cmGeneratorExpression::Parse(std::string const& input)
{
-#if !defined(__BORLANDC__)
return cmsys::auto_ptr<cmCompiledGeneratorExpression>(
new cmCompiledGeneratorExpression(
this->Backtrace ? *this->Backtrace : cmListFileBacktrace(NULL),
input));
-#else
- cmListFileBacktrace emptyBacktrace(NULL);
- return cmsys::auto_ptr<cmCompiledGeneratorExpression>(
- new cmCompiledGeneratorExpression(
- this->Backtrace ? *this->Backtrace : emptyBacktrace,
- input));
-#endif
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index c1478df..0010dba 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -1253,7 +1253,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
std::string tgtName = parameters.front();
cmGeneratorTarget* gt =
- context->Makefile->FindGeneratorTargetToUse(tgtName.c_str());
+ context->Makefile->FindGeneratorTargetToUse(tgtName);
if (!gt)
{
cmOStringStream e;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 14b5a92..1d1225f 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -772,8 +772,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
std::string tLocation = t->GetLocationForBuild();
tLocation = cmSystemTools::GetFilenamePath(tLocation);
std::string depLocation = cmSystemTools::GetFilenamePath(dep);
- depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
- tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
+ depLocation = cmSystemTools::CollapseFullPath(depLocation);
+ tLocation = cmSystemTools::CollapseFullPath(tLocation);
if(depLocation == tLocation)
{
this->Target->AddUtility(util);
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index fcc3da1..8fb2fa1 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -49,7 +49,7 @@ bool cmGetDirectoryPropertyCommand
}
// The local generators are associated with collapsed paths.
- sd = cmSystemTools::CollapseFullPath(sd.c_str());
+ sd = cmSystemTools::CollapseFullPath(sd);
// lookup the makefile from the directory name
cmLocalGenerator *lg =
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx
index 10406d2..77850af 100644
--- a/Source/cmGetFilenameComponentCommand.cxx
+++ b/Source/cmGetFilenameComponentCommand.cxx
@@ -97,11 +97,11 @@ bool cmGetFilenameComponentCommand
// If the path given is relative evaluate it relative to the
// current source directory.
result = cmSystemTools::CollapseFullPath(
- filename.c_str(), this->Makefile->GetCurrentDirectory());
+ filename, this->Makefile->GetCurrentDirectory());
if(args[2] == "REALPATH")
{
// Resolve symlinks if possible
- result = cmSystemTools::GetRealPath(result.c_str());
+ result = cmSystemTools::GetRealPath(result);
}
}
else
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 9a88191..3c59c25 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -259,7 +259,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
}
// The local generators are associated with collapsed paths.
- dir = cmSystemTools::CollapseFullPath(dir.c_str());
+ dir = cmSystemTools::CollapseFullPath(dir);
// Lookup the generator.
if(cmLocalGenerator* lg =
diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h
index 470dea4..120d2f8 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.h
+++ b/Source/cmGlobalBorlandMakefileGenerator.h
@@ -39,7 +39,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6a4adc0..a729c3d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -300,7 +300,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
cmSystemTools::SplitProgramPath(makeProgram.c_str(),
dir, file);
std::string saveFile = file;
- cmSystemTools::GetShortPath(makeProgram.c_str(), makeProgram);
+ cmSystemTools::GetShortPath(makeProgram, makeProgram);
cmSystemTools::SplitProgramPath(makeProgram.c_str(),
dir, file);
makeProgram = dir;
@@ -318,7 +318,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
// will run xcodebuild and if it sees the error text file busy
// it will stop forwarding output, and let the build finish.
// Then it will retry the build. It will continue this
- // untill no text file busy errors occur.
+ // until no text file busy errors occur.
std::string cmakexbuild =
this->CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_COMMAND");
cmakexbuild = cmakexbuild.substr(0, cmakexbuild.length()-5);
@@ -691,7 +691,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
compilerLangFile += "/CMake";
compilerLangFile += lang;
compilerLangFile += "Compiler.cmake";
- cmSystemTools::RemoveFile(compilerLangFile.c_str());
+ cmSystemTools::RemoveFile(compilerLangFile);
if(!this->CMakeInstance->GetIsInTryCompile())
{
this->PrintCompilerAdvice(noCompiler, lang,
@@ -758,7 +758,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
compilerLangFile += "/CMake";
compilerLangFile += lang;
compilerLangFile += "Compiler.cmake";
- cmSystemTools::RemoveFile(compilerLangFile.c_str());
+ cmSystemTools::RemoveFile(compilerLangFile);
}
} // end if in try compile
} // end need test language
@@ -1008,9 +1008,9 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l,
if (sscanf(linkerPref, "%d", &preference)!=1)
{
// backward compatibility: before 2.6 LINKER_PREFERENCE
- // was either "None" or "Prefered", and only the first character was
+ // was either "None" or "Preferred", and only the first character was
// tested. So if there is a custom language out there and it is
- // "Prefered", set its preference high
+ // "Preferred", set its preference high
if (linkerPref[0]=='P')
{
preference = 100;
@@ -1735,7 +1735,7 @@ int cmGlobalGenerator::Build(
* Run an executable command and put the stdout in output.
*/
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(bindir.c_str());
+ cmSystemTools::ChangeDirectory(bindir);
output += "Change Dir: ";
output += bindir;
output += "\n";
@@ -1765,7 +1765,7 @@ int cmGlobalGenerator::Build(
output += "\nGenerator: execution of make clean failed.\n";
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
return 1;
}
output += *outputPtr;
@@ -1792,7 +1792,7 @@ int cmGlobalGenerator::Build(
+ makeCommandStr + "\n";
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
return 1;
}
output += *outputPtr;
@@ -1806,7 +1806,7 @@ int cmGlobalGenerator::Build(
retVal = 1;
}
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
return retVal;
}
@@ -2723,7 +2723,7 @@ cmGlobalGenerator::GetDirectoryContent(std::string const& dir, bool needDisk)
{
// Load the directory content from disk.
cmsys::Directory d;
- if(d.Load(dir.c_str()))
+ if(d.Load(dir))
{
unsigned long n = d.GetNumberOfFiles();
for(unsigned long i = 0; i < n; ++i)
@@ -2830,8 +2830,8 @@ void cmGlobalGenerator::CheckRuleHashes(std::string const& pfile,
{
// The rule has changed. Delete the output so it will be
// built again.
- fname = cmSystemTools::CollapseFullPath(fname.c_str(), home.c_str());
- cmSystemTools::RemoveFile(fname.c_str());
+ fname = cmSystemTools::CollapseFullPath(fname, home.c_str());
+ cmSystemTools::RemoveFile(fname);
}
}
else
@@ -2843,7 +2843,7 @@ void cmGlobalGenerator::CheckRuleHashes(std::string const& pfile,
// that if the feature is turned back on and the rule has
// changed the file is still rebuilt.
std::string fpath =
- cmSystemTools::CollapseFullPath(fname.c_str(), home.c_str());
+ cmSystemTools::CollapseFullPath(fname, home.c_str());
if(cmSystemTools::FileExists(fpath.c_str()))
{
RuleHash hash;
@@ -2860,7 +2860,7 @@ void cmGlobalGenerator::WriteRuleHashes(std::string const& pfile)
// Now generate a new persistence file with the current hashes.
if(this->RuleHashes.empty())
{
- cmSystemTools::RemoveFile(pfile.c_str());
+ cmSystemTools::RemoveFile(pfile);
}
else
{
@@ -2965,7 +2965,7 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target)
}
else
{
- cmSystemTools::RemoveFile(file.c_str());
+ cmSystemTools::RemoveFile(file);
}
}
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index f166789..ddd7e91 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -39,7 +39,7 @@ class cmExportBuildFileGenerator;
class cmQtAutoGenerators;
/** \class cmGlobalGenerator
- * \brief Responable for overseeing the generation process for the entire tree
+ * \brief Responsible for overseeing the generation process for the entire tree
*
* Subclasses of this class generate makefiles for various
* platforms.
@@ -94,7 +94,7 @@ public:
void ClearEnabledLanguages();
void GetEnabledLanguages(std::vector<std::string>& lang) const;
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
@@ -108,7 +108,7 @@ public:
bool optional) const;
/**
- * Try to determine system infomation, get it from another generator
+ * Try to determine system information, get it from another generator
*/
virtual void EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
cmMakefile* mf);
@@ -198,7 +198,7 @@ public:
std::string GetLanguageFromExtension(const char* ext) const;
///! is an extension to be ignored
bool IgnoreFile(const char* ext) const;
- ///! What is the preference for linkers and this language (None or Prefered)
+ ///! What is the preference for linkers and this language (None or Preferred)
int GetLinkerPreference(const std::string& lang) const;
///! What is the object file extension for a given source file?
std::string GetLanguageOutputExtension(cmSourceFile const&) const;
diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h
index 344e013..fbb35f3 100644
--- a/Source/cmGlobalJOMMakefileGenerator.h
+++ b/Source/cmGlobalJOMMakefileGenerator.h
@@ -40,7 +40,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx
index 89d25c4..ee0c583 100644
--- a/Source/cmGlobalKdevelopGenerator.cxx
+++ b/Source/cmGlobalKdevelopGenerator.cxx
@@ -222,7 +222,7 @@ bool cmGlobalKdevelopGenerator
it!=files.end(); it++)
{
// get the full path to the file
- tmp=cmSystemTools::CollapseFullPath(it->c_str(), projectDir.c_str());
+ tmp=cmSystemTools::CollapseFullPath(*it, projectDir.c_str());
// just select the first source file
if (fileToOpen.empty())
{
@@ -274,7 +274,7 @@ void cmGlobalKdevelopGenerator
// kdevelop blacklist so they are not monitored for added or removed files
// since this is handled by adding files to the cmake files
cmsys::Directory d;
- if (d.Load(projectDir.c_str()))
+ if (d.Load(projectDir))
{
size_t numf = d.GetNumberOfFiles();
for (unsigned int i = 0; i < numf; i++)
@@ -285,7 +285,7 @@ void cmGlobalKdevelopGenerator
std::string tmp = projectDir;
tmp += "/";
tmp += nextFile;
- if (cmSystemTools::FileIsDirectory(tmp.c_str()))
+ if (cmSystemTools::FileIsDirectory(tmp))
{
tmp += "/CMakeCache.txt";
if ((nextFile == "CMakeFiles")
diff --git a/Source/cmGlobalMSYSMakefileGenerator.h b/Source/cmGlobalMSYSMakefileGenerator.h
index c4825bd..baecde7 100644
--- a/Source/cmGlobalMSYSMakefileGenerator.h
+++ b/Source/cmGlobalMSYSMakefileGenerator.h
@@ -39,7 +39,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h
index 4289422..fa8d9f2 100644
--- a/Source/cmGlobalMinGWMakefileGenerator.h
+++ b/Source/cmGlobalMinGWMakefileGenerator.h
@@ -38,7 +38,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h
index 2ff44e3..e7b03dd 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.h
+++ b/Source/cmGlobalNMakeMakefileGenerator.h
@@ -38,7 +38,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 50e1abb..498ae9a 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -205,7 +205,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
&& args.size() + buildstr.size() + assignments.size()
> (size_t) cmdLineLimit) {
buildstr += "_RSP_FILE";
- variable_assignments.clear();
+ variable_assignments.str(std::string());
cmGlobalNinjaGenerator::WriteVariable(variable_assignments,
"RSP_FILE", rspfile, "", 1);
assignments += variable_assignments.str();
@@ -771,7 +771,7 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand(
if (!cmSystemTools::FileIsFullPath(sourceFileName.c_str()))
{
sourceFileName = cmSystemTools::CollapseFullPath(
- sourceFileName.c_str(),
+ sourceFileName,
this->GetCMakeInstance()->GetHomeOutputDirectory());
}
@@ -851,7 +851,7 @@ cmGlobalNinjaGenerator
case cmTarget::STATIC_LIBRARY:
case cmTarget::MODULE_LIBRARY:
outputs.push_back(ng->ConvertToNinjaPath(
- target->GetFullPath(configName, false, realname).c_str()));
+ target->GetFullPath(configName, false, realname)));
break;
case cmTarget::OBJECT_LIBRARY:
@@ -970,7 +970,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
typedef std::vector<std::string>::const_iterator vect_it;
for(vect_it j = files.begin(); j != files.end(); ++j)
{
- knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
+ knownDependencies.insert( ng->ConvertToNinjaPath( *j ) );
}
//get list files which are implicit dependencies as well and will be phony
//for rebuild manifest
@@ -978,7 +978,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
typedef std::vector<std::string>::const_iterator vect_it;
for(vect_it j = lf.begin(); j != lf.end(); ++j)
{
- knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
+ knownDependencies.insert( ng->ConvertToNinjaPath( *j ) );
}
}
knownDependencies.insert( "CMakeCache.txt" );
@@ -994,7 +994,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
typedef std::vector<std::string>::const_iterator vect_it;
for(vect_it j = files.begin(); j != files.end(); ++j)
{
- knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
+ knownDependencies.insert( ng->ConvertToNinjaPath( *j ) );
}
}
@@ -1002,7 +1002,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
i != this->TargetAliases.end();
++i)
{
- knownDependencies.insert( ng->ConvertToNinjaPath(i->first.c_str()) );
+ knownDependencies.insert( ng->ConvertToNinjaPath(i->first) );
}
//remove all source files we know will exist.
@@ -1011,7 +1011,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
i != this->AssumedSourceDependencies.end();
++i)
{
- knownDependencies.insert( ng->ConvertToNinjaPath(i->first.c_str()) );
+ knownDependencies.insert( ng->ConvertToNinjaPath(i->first) );
}
//insert outputs from all WirteBuild commands
@@ -1042,17 +1042,27 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
std::back_inserter(unkownExplicitDepends));
+ std::string const rootBuildDirectory =
+ this->GetCMakeInstance()->GetHomeOutputDirectory();
for (std::vector<std::string>::const_iterator
i = unkownExplicitDepends.begin();
i != unkownExplicitDepends.end();
++i)
{
- cmNinjaDeps deps(1,*i);
- this->WritePhonyBuild(os,
- "",
- deps,
- deps);
- }
+ //verify the file is in the build directory
+ std::string const absDepPath = cmSystemTools::CollapseFullPath(
+ *i, rootBuildDirectory.c_str());
+ bool const inBuildDir = cmSystemTools::IsSubDirectory(absDepPath,
+ rootBuildDirectory);
+ if(inBuildDir)
+ {
+ cmNinjaDeps deps(1,*i);
+ this->WritePhonyBuild(os,
+ "",
+ deps,
+ deps);
+ }
+ }
}
void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os)
@@ -1119,7 +1129,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
for(std::vector<std::string>::const_iterator fi = lf.begin();
fi != lf.end(); ++fi)
{
- implicitDeps.push_back(ng->ConvertToNinjaPath(fi->c_str()));
+ implicitDeps.push_back(ng->ConvertToNinjaPath(*fi));
}
}
implicitDeps.push_back("CMakeCache.txt");
@@ -1128,6 +1138,16 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()),
implicitDeps.end());
+ cmNinjaVars variables;
+ // Use 'console' pool to get non buffered output of the CMake re-run call
+ // Available since Ninja 1.5
+ if(cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
+ ninjaVersion().c_str(),
+ "1.5") == false)
+ {
+ variables["pool"] = "console";
+ }
+
this->WriteBuild(os,
"Re-run CMake if any of its inputs changed.",
"RERUN_CMAKE",
@@ -1135,7 +1155,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
/*explicitDeps=*/ cmNinjaDeps(),
implicitDeps,
/*orderOnlyDeps=*/ cmNinjaDeps(),
- /*variables=*/ cmNinjaVars());
+ variables);
this->WritePhonyBuild(os,
"A missing CMake input file is not an error.",
@@ -1154,6 +1174,17 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const
return "ninja";
}
+std::string cmGlobalNinjaGenerator::ninjaVersion() const
+{
+ std::string version;
+ std::string command = ninjaCmd() + " --version";
+ cmSystemTools::RunSingleCommand(command.c_str(),
+ &version, 0, 0,
+ cmSystemTools::OUTPUT_NONE);
+
+ return version;
+}
+
void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
{
WriteRule(*this->RulesFileStream,
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 4cbbeea..f666ee3 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -297,6 +297,8 @@ public:
void AddTargetAlias(const std::string& alias, cmTarget* target);
virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
+
+ std::string ninjaVersion() const;
protected:
/// Overloaded methods. @see cmGlobalGenerator::Generate()
@@ -335,8 +337,7 @@ private:
std::string ninjaCmd() const;
-
- /// The file containing the build statement. (the relation ship of the
+ /// The file containing the build statement. (the relationship of the
/// compilation DAG).
cmGeneratedFileStream* BuildFileStream;
/// The file containing the rule statements. (The action attached to each
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index f44dd12..c61c36e 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -71,7 +71,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 3af7b51..686dcdf 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -49,7 +49,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index 57c2660..58efb25 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -42,7 +42,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 04a74db..201a6a6 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -52,7 +52,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h
index c24d5fe..0a191cd 100644
--- a/Source/cmGlobalVisualStudio9Generator.h
+++ b/Source/cmGlobalVisualStudio9Generator.h
@@ -32,7 +32,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void WriteSLNHeader(std::ostream& fout);
diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h
index 2057a42..0e577b5 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.h
+++ b/Source/cmGlobalWatcomWMakeGenerator.h
@@ -38,7 +38,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 4fe04fc..9d7b784 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -44,7 +44,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/**
- * Try to determine system infomation such as shared library
+ * Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index 0a4f5c9..0a1d280 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -90,7 +90,7 @@ bool cmIncludeCommand
}
std::string fname_abs =
- cmSystemTools::CollapseFullPath(fname.c_str(),
+ cmSystemTools::CollapseFullPath(fname,
this->Makefile->GetStartDirectory());
cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator()
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index ec500d9..c3c9c55 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -167,7 +167,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
script += "/";
script += args[i];
}
- if(cmSystemTools::FileIsDirectory(script.c_str()))
+ if(cmSystemTools::FileIsDirectory(script))
{
this->SetError("given a directory as value of SCRIPT argument.");
return false;
@@ -1111,7 +1111,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
// Make sure the name is a directory.
if(cmSystemTools::FileExists(dir.c_str()) &&
- !cmSystemTools::FileIsDirectory(dir.c_str()))
+ !cmSystemTools::FileIsDirectory(dir))
{
cmOStringStream e;
e << args[0] << " given non-directory \""
@@ -1393,7 +1393,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName,
}
// Make sure the file is not a directory.
- if(gpos == file.npos && cmSystemTools::FileIsDirectory(file.c_str()))
+ if(gpos == file.npos && cmSystemTools::FileIsDirectory(file))
{
cmOStringStream e;
e << modeName << " given directory \"" << (*fileIt) << "\" to install.";
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 3fc5b69..1c39563 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -19,9 +19,6 @@
#include <cmsys/RegularExpression.hxx>
-#ifdef __BORLANDC__
-# pragma warn -8060 /* possibly incorrect assignment */
-#endif
//----------------------------------------------------------------------------
struct cmListFileParser
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4bd9191..69b56c6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -221,19 +221,19 @@ void cmLocalGenerator::SetupPathConversions()
std::string outdir;
outdir =
cmSystemTools::CollapseFullPath(this->Makefile->GetHomeDirectory());
- cmSystemTools::SplitPath(outdir.c_str(), this->HomeDirectoryComponents);
+ cmSystemTools::SplitPath(outdir, this->HomeDirectoryComponents);
outdir =
cmSystemTools::CollapseFullPath(this->Makefile->GetStartDirectory());
- cmSystemTools::SplitPath(outdir.c_str(), this->StartDirectoryComponents);
+ cmSystemTools::SplitPath(outdir, this->StartDirectoryComponents);
outdir = cmSystemTools::CollapseFullPath
(this->Makefile->GetHomeOutputDirectory());
- cmSystemTools::SplitPath(outdir.c_str(),
+ cmSystemTools::SplitPath(outdir,
this->HomeOutputDirectoryComponents);
outdir = cmSystemTools::CollapseFullPath
(this->Makefile->GetStartOutputDirectory());
- cmSystemTools::SplitPath(outdir.c_str(),
+ cmSystemTools::SplitPath(outdir,
this->StartOutputDirectoryComponents);
}
@@ -1247,7 +1247,7 @@ cmLocalGenerator::ConvertToOutputForExistingCommon(const std::string& remote,
cmSystemTools::FileExists(remote.c_str()))
{
std::string tmp;
- if(cmSystemTools::GetShortPath(remote.c_str(), tmp))
+ if(cmSystemTools::GetShortPath(remote, tmp))
{
return this->Convert(tmp, NONE, format, true);
}
@@ -1287,9 +1287,11 @@ cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToIncludeReference(std::string const& path,
- OutputFormat format)
+ OutputFormat format,
+ bool forceFullPaths)
{
- return this->ConvertToOutputForExisting(path, START_OUTPUT, format);
+ return this->ConvertToOutputForExisting(
+ path, forceFullPaths? FULL : START_OUTPUT, format);
}
//----------------------------------------------------------------------------
@@ -1297,6 +1299,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
const std::vector<std::string> &includes,
cmGeneratorTarget* target,
const std::string& lang,
+ bool forceFullPaths,
bool forResponseFile,
const std::string& config)
{
@@ -1368,7 +1371,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
{
std::string frameworkDir = *i;
frameworkDir += "/../";
- frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
+ frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
if(emitted.insert(frameworkDir).second)
{
if (sysFwSearchFlag && target &&
@@ -1401,7 +1404,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
flagUsed = true;
}
std::string includePath =
- this->ConvertToIncludeReference(*i, shellFormat);
+ this->ConvertToIncludeReference(*i, shellFormat, forceFullPaths);
if(quotePaths && includePath.size() && includePath[0] != '\"')
{
includeFlags << "\"";
@@ -1610,10 +1613,10 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
{
// Emit this directory only if it is a subdirectory of the
// top-level source or binary tree.
- if(cmSystemTools::ComparePath(i->c_str(), topSourceDir) ||
- cmSystemTools::ComparePath(i->c_str(), topBinaryDir) ||
- cmSystemTools::IsSubDirectory(i->c_str(), topSourceDir) ||
- cmSystemTools::IsSubDirectory(i->c_str(), topBinaryDir))
+ if(cmSystemTools::ComparePath(*i, topSourceDir) ||
+ cmSystemTools::ComparePath(*i, topBinaryDir) ||
+ cmSystemTools::IsSubDirectory(*i, topSourceDir) ||
+ cmSystemTools::IsSubDirectory(*i, topBinaryDir))
{
if(emitted.insert(*i).second)
{
@@ -2106,11 +2109,11 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName,
{
tLocation = target->GetLocation(config);
tLocation = cmSystemTools::GetFilenamePath(tLocation);
- tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
+ tLocation = cmSystemTools::CollapseFullPath(tLocation);
}
std::string depLocation = cmSystemTools::GetFilenamePath(
std::string(inName));
- depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
+ depLocation = cmSystemTools::CollapseFullPath(depLocation);
if(depLocation != tLocation)
{
// it is a full path to a depend that has the same name
@@ -2740,7 +2743,7 @@ std::string cmLocalGenerator::Convert(const std::string& source,
result);
break;
case FULL:
- result = cmSystemTools::CollapseFullPath(result.c_str());
+ result = cmSystemTools::CollapseFullPath(result);
break;
case NONE:
break;
@@ -2804,7 +2807,7 @@ std::string cmLocalGenerator::Convert(RelativeRoot remote,
if(!local.empty() && (!optional || this->UseRelativePaths))
{
std::vector<std::string> components;
- cmSystemTools::SplitPath(local.c_str(), components);
+ cmSystemTools::SplitPath(local, components);
std::string result = this->ConvertToRelativePath(components, remotePath);
return this->ConvertToOutputFormat(result, output);
}
@@ -2824,7 +2827,7 @@ std::string cmLocalGenerator::FindRelativePathTopSource()
{
std::string parentTop = parent->FindRelativePathTopSource();
if(cmSystemTools::IsSubDirectory(
- this->Makefile->GetStartDirectory(), parentTop.c_str()))
+ this->Makefile->GetStartDirectory(), parentTop))
{
return parentTop;
}
@@ -2844,7 +2847,7 @@ std::string cmLocalGenerator::FindRelativePathTopBinary()
{
std::string parentTop = parent->FindRelativePathTopBinary();
if(cmSystemTools::IsSubDirectory(
- this->Makefile->GetStartOutputDirectory(), parentTop.c_str()))
+ this->Makefile->GetStartOutputDirectory(), parentTop))
{
return parentTop;
}
@@ -2930,12 +2933,12 @@ cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local,
// Identify the longest shared path component between the remote
// path and the local path.
std::vector<std::string> remote;
- cmSystemTools::SplitPath(in_remote.c_str(), remote);
+ cmSystemTools::SplitPath(in_remote, remote);
unsigned int common=0;
while(common < remote.size() &&
common < local.size() &&
- cmSystemTools::ComparePath(remote[common].c_str(),
- local[common].c_str()))
+ cmSystemTools::ComparePath(remote[common],
+ local[common]))
{
++common;
}
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index b25b9ab..3a9d5be 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -160,6 +160,7 @@ public:
std::string GetIncludeFlags(const std::vector<std::string> &includes,
cmGeneratorTarget* target,
const std::string& lang,
+ bool forceFullPaths = false,
bool forResponseFile = false,
const std::string& config = "");
@@ -215,7 +216,8 @@ public:
OutputFormat format = SHELL);
virtual std::string ConvertToIncludeReference(std::string const& path,
- OutputFormat format = SHELL);
+ OutputFormat format = SHELL,
+ bool forceFullPaths = false);
/** Called from command-line hook to clear dependencies. */
virtual void ClearDependencies(cmMakefile* /* mf */,
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 2ac8363..9225f64 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -151,9 +151,10 @@ cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib,
std::string
cmLocalNinjaGenerator::ConvertToIncludeReference(std::string const& path,
- OutputFormat format)
+ OutputFormat format,
+ bool forceFullPaths)
{
- return this->Convert(path, HOME_OUTPUT, format);
+ return this->Convert(path, forceFullPaths? FULL : HOME_OUTPUT, format);
}
//----------------------------------------------------------------------------
@@ -189,6 +190,7 @@ void cmLocalNinjaGenerator::WriteBuildFileTop()
{
// For the build file.
this->WriteProjectHeader(this->GetBuildFileStream());
+ this->WriteNinjaRequiredVersion(this->GetBuildFileStream());
this->WriteNinjaFilesInclusion(this->GetBuildFileStream());
// For the rule file.
@@ -205,6 +207,30 @@ void cmLocalNinjaGenerator::WriteProjectHeader(std::ostream& os)
cmGlobalNinjaGenerator::WriteDivider(os);
}
+void cmLocalNinjaGenerator::WriteNinjaRequiredVersion(std::ostream& os)
+{
+ // Default required version
+ // Ninja generator uses 'deps' and 'msvc_deps_prefix' introduced in 1.3
+ std::string requiredVersion = "1.3";
+
+ // Ninja generator uses the 'console' pool if available (>= 1.5)
+ std::string usedVersion = this->GetGlobalNinjaGenerator()->ninjaVersion();
+ if(cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
+ usedVersion.c_str(),
+ "1.5") == false)
+ {
+ requiredVersion = "1.5";
+ }
+
+ cmGlobalNinjaGenerator::WriteComment(os,
+ "Minimal version of Ninja required by this file");
+ os
+ << "ninja_required_version = "
+ << requiredVersion
+ << std::endl << std::endl
+ ;
+}
+
void cmLocalNinjaGenerator::WritePools(std::ostream& os)
{
cmGlobalNinjaGenerator::WriteDivider(os);
@@ -326,7 +352,7 @@ void cmLocalNinjaGenerator::AppendCustomCommandDeps(
i != deps.end(); ++i) {
std::string dep;
if (this->GetRealDependency(*i, this->GetConfigName(), dep))
- ninjaDeps.push_back(ConvertToNinjaPath(dep.c_str()));
+ ninjaDeps.push_back(ConvertToNinjaPath(dep));
}
}
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index 11321b8..01e16df 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -74,7 +74,7 @@ public:
map_to_ninja_path(cmLocalNinjaGenerator *LocalGen)
: LocalGenerator(LocalGen) {}
std::string operator()(const std::string &path) {
- return LocalGenerator->ConvertToNinjaPath(path.c_str());
+ return LocalGenerator->ConvertToNinjaPath(path);
}
};
@@ -108,7 +108,8 @@ public:
protected:
virtual std::string ConvertToIncludeReference(std::string const& path,
- OutputFormat format = SHELL);
+ OutputFormat format = SHELL,
+ bool forceFullPaths = false);
private:
@@ -117,6 +118,7 @@ private:
void WriteBuildFileTop();
void WriteProjectHeader(std::ostream& os);
+ void WriteNinjaRequiredVersion(std::ostream& os);
void WriteNinjaFilesInclusion(std::ostream& os);
void WriteProcessedMakefile(std::ostream& os);
void WritePools(std::ostream& os);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 23513fa..c18e027 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -700,7 +700,7 @@ cmLocalUnixMakefileGenerator3
// name. This is needed to avoid funny quoting problems on
// lines with shell redirection operators.
std::string scmd;
- if(cmSystemTools::GetShortPath(cmd.c_str(), scmd))
+ if(cmSystemTools::GetShortPath(cmd, scmd))
{
return this->Convert(scmd, NONE, SHELL);
}
@@ -1733,7 +1733,7 @@ void cmLocalUnixMakefileGenerator3::CheckMultipleOutputs(bool verbose)
<< depender << "\" does not exist." << std::endl;
cmSystemTools::Stdout(msg.str().c_str());
}
- cmSystemTools::RemoveFile(dependee.c_str());
+ cmSystemTools::RemoveFile(dependee);
}
}
}
@@ -1988,7 +1988,7 @@ void cmLocalUnixMakefileGenerator3::ClearDependencies(cmMakefile* mf,
// Remove the internal dependency check file to force
// regeneration.
std::string internalDependFile = dir + "/depend.internal";
- cmSystemTools::RemoveFile(internalDependFile.c_str());
+ cmSystemTools::RemoveFile(internalDependFile);
}
}
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 11a9627..eb45423 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -796,6 +796,20 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
<< "\t\t\tUseOfMFC=\"" << mfcFlag << "\"\n"
<< "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n";
+ if (this->FortranProject)
+ {
+ // Intel Fortran >= 15.0 uses TargetName property.
+ std::string targetNameFull = target.GetFullName(configName);
+ std::string targetName =
+ cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
+ std::string targetExt =
+ cmSystemTools::GetFilenameLastExtension(targetNameFull);
+ fout <<
+ "\t\t\tTargetName=\"" << this->EscapeForXML(targetName) << "\"\n"
+ "\t\t\tTargetExt=\"" << this->EscapeForXML(targetExt) << "\"\n"
+ ;
+ }
+
// If unicode is enabled change the character set to unicode, if not
// then default to MBCS.
if(targetOptions.UsingUnicode())
diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx
index 52832db..1499e57 100644
--- a/Source/cmMakeDepend.cxx
+++ b/Source/cmMakeDepend.cxx
@@ -329,9 +329,9 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
}
path = path + fname;
if(cmSystemTools::FileExists(path.c_str(), true)
- && !cmSystemTools::FileIsDirectory(path.c_str()))
+ && !cmSystemTools::FileIsDirectory(path))
{
- std::string fp = cmSystemTools::CollapseFullPath(path.c_str());
+ std::string fp = cmSystemTools::CollapseFullPath(path);
this->DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp;
return fp;
}
@@ -346,9 +346,9 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
}
path = path + fname;
if(cmSystemTools::FileExists(path.c_str(), true)
- && !cmSystemTools::FileIsDirectory(path.c_str()))
+ && !cmSystemTools::FileIsDirectory(path))
{
- std::string fp = cmSystemTools::CollapseFullPath(path.c_str());
+ std::string fp = cmSystemTools::CollapseFullPath(path);
this->DirectoryToFileToPathMap[extraPath][fname] = fp;
return fp;
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8806205..8cc1e88 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1832,7 +1832,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
{
if(!cmSystemTools::IsOff(files[cc].c_str()))
{
- files[cc] = cmSystemTools::CollapseFullPath(files[cc].c_str());
+ files[cc] = cmSystemTools::CollapseFullPath(files[cc]);
}
if ( cc > 0 )
{
@@ -1937,11 +1937,11 @@ void cmMakefile::CheckForUnused(const char* reason,
bt.push_back(lfc);
}
if (this->CheckSystemVars ||
- cmSystemTools::IsSubDirectory(path.c_str(),
+ cmSystemTools::IsSubDirectory(path,
this->GetHomeDirectory()) ||
- (cmSystemTools::IsSubDirectory(path.c_str(),
+ (cmSystemTools::IsSubDirectory(path,
this->GetHomeOutputDirectory()) &&
- !cmSystemTools::IsSubDirectory(path.c_str(),
+ !cmSystemTools::IsSubDirectory(path,
cmake::GetCMakeFilesDirectory())))
{
cmOStringStream msg;
@@ -2878,7 +2878,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
bt.push_back(lfc);
msg << "uninitialized variable \'" << lookup << "\'";
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
- msg.str().c_str(), bt);
+ msg.str(), bt);
}
}
}
@@ -3556,7 +3556,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
{
this->Internal->IsSourceFileTryCompile = fast;
// does the binary directory exist ? If not create it...
- if (!cmSystemTools::FileIsDirectory(bindir.c_str()))
+ if (!cmSystemTools::FileIsDirectory(bindir))
{
cmSystemTools::MakeDirectory(bindir.c_str());
}
@@ -3564,7 +3564,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
// change to the tests directory and run cmake
// use the cmake object instead of calling cmake
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
- cmSystemTools::ChangeDirectory(bindir.c_str());
+ cmSystemTools::ChangeDirectory(bindir);
// make sure the same generator is used
// use this program as the cmake to be run, it should not
@@ -3579,7 +3579,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cmSystemTools::Error(
"Internal CMake error, TryCompile bad GlobalGenerator");
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
this->Internal->IsSourceFileTryCompile = false;
return 1;
}
@@ -3653,7 +3653,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cmSystemTools::Error(
"Internal CMake error, TryCompile configure of cmake failed");
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
this->Internal->IsSourceFileTryCompile = false;
return 1;
}
@@ -3663,7 +3663,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cmSystemTools::Error(
"Internal CMake error, TryCompile generation of cmake failed");
// return to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
this->Internal->IsSourceFileTryCompile = false;
return 1;
}
@@ -3677,7 +3677,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
output,
this);
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
this->Internal->IsSourceFileTryCompile = false;
return ret;
}
@@ -4036,7 +4036,7 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
{
cmSystemTools::SetPermissions(soutfile.c_str(), perm);
}
- cmSystemTools::RemoveFile(tempOutputFile.c_str());
+ cmSystemTools::RemoveFile(tempOutputFile);
}
return res;
}
@@ -5208,7 +5208,7 @@ HaveCFeatureAvailable(cmTarget const* target, const std::string& feature) const
cmOStringStream e;
e << "The C_STANDARD property on target \"" << target->GetName()
<< "\" contained an invalid value: \"" << existingCStandard << "\".";
- this->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
return false;
}
@@ -5459,7 +5459,7 @@ AddRequiredTargetCFeature(cmTarget *target, const std::string& feature) const
cmOStringStream e;
e << "The C_STANDARD property on target \"" << target->GetName()
<< "\" contained an invalid value: \"" << existingCStandard << "\".";
- this->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
return false;
}
}
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 164290a..824513b 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -466,7 +466,7 @@ public:
this->cmStartDirectory = dir;
cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
this->cmStartDirectory =
- cmSystemTools::CollapseFullPath(this->cmStartDirectory.c_str());
+ cmSystemTools::CollapseFullPath(this->cmStartDirectory);
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
this->cmStartDirectory.c_str());
}
@@ -479,7 +479,7 @@ public:
this->StartOutputDirectory = lib;
cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory);
this->StartOutputDirectory =
- cmSystemTools::CollapseFullPath(this->StartOutputDirectory.c_str());
+ cmSystemTools::CollapseFullPath(this->StartOutputDirectory);
cmSystemTools::MakeDirectory(this->StartOutputDirectory.c_str());
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
this->StartOutputDirectory.c_str());
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 7849d12..1adcb8a 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1577,7 +1577,7 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags(std::string const& l)
{
std::string frameworkDir = *i;
frameworkDir += "/../";
- frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
+ frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
emitted.insert(frameworkDir);
}
}
@@ -1962,7 +1962,7 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
std::string includeFlags =
this->LocalGenerator->GetIncludeFlags(includes, this->GeneratorTarget,
- lang, useResponseFile);
+ lang, false, useResponseFile);
if(includeFlags.empty())
{
return;
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index e344df4..0cc3e3b 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -375,14 +375,14 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmTarget& target = *this->GetTarget();
const std::string cfgName = this->GetConfigName();
std::string targetOutput = ConvertToNinjaPath(
- target.GetFullPath(cfgName).c_str());
+ target.GetFullPath(cfgName));
std::string targetOutputReal = ConvertToNinjaPath(
target.GetFullPath(cfgName,
/*implib=*/false,
- /*realpath=*/true).c_str());
+ /*realpath=*/true));
std::string targetOutputImplib = ConvertToNinjaPath(
target.GetFullPath(cfgName,
- /*implib=*/true).c_str());
+ /*implib=*/true));
if (target.IsAppBundleOnApple())
{
@@ -394,11 +394,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
targetOutput = outpath;
targetOutput += "/";
targetOutput += this->TargetNameOut;
- targetOutput = this->ConvertToNinjaPath(targetOutput.c_str());
+ targetOutput = this->ConvertToNinjaPath(targetOutput);
targetOutputReal = outpath;
targetOutputReal += "/";
targetOutputReal += this->TargetNameReal;
- targetOutputReal = this->ConvertToNinjaPath(targetOutputReal.c_str());
+ targetOutputReal = this->ConvertToNinjaPath(targetOutputReal);
}
else if (target.IsFrameworkOnApple())
{
@@ -531,7 +531,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if (mf->IsOn("CMAKE_COMPILER_IS_MINGW"))
{
const std::string objPath = GetTarget()->GetSupportDirectory();
- vars["OBJECT_DIR"] = ConvertToNinjaPath(objPath.c_str());
+ vars["OBJECT_DIR"] = ConvertToNinjaPath(objPath);
EnsureDirectoryExists(objPath);
// ar.exe can't handle backslashes in rsp files (implicitly used by gcc)
std::string& linkLibraries = vars["LINK_LIBRARIES"];
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 816e6d8..80213d8 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -277,7 +277,7 @@ std::string
cmNinjaTargetGenerator
::GetSourceFilePath(cmSourceFile const* source) const
{
- return ConvertToNinjaPath(source->GetFullPath().c_str());
+ return ConvertToNinjaPath(source->GetFullPath());
}
std::string
@@ -298,7 +298,7 @@ cmNinjaTargetGenerator
std::string cmNinjaTargetGenerator::GetTargetOutputDir() const
{
std::string dir = this->Target->GetDirectory(this->GetConfigName());
- return ConvertToNinjaPath(dir.c_str());
+ return ConvertToNinjaPath(dir);
}
std::string
@@ -346,11 +346,11 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
}
vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- ConvertToNinjaPath(pdbPath.c_str()),
+ ConvertToNinjaPath(pdbPath),
cmLocalGenerator::SHELL);
vars["TARGET_COMPILE_PDB"] =
this->GetLocalGenerator()->ConvertToOutputFormat(
- ConvertToNinjaPath(compilePdbPath.c_str()),
+ ConvertToNinjaPath(compilePdbPath),
cmLocalGenerator::SHELL);
EnsureParentDirectoryExists(pdbPath);
@@ -564,7 +564,7 @@ cmNinjaTargetGenerator
std::string def = this->GeneratorTarget->GetModuleDefinitionFile(config);
if(!def.empty())
{
- this->ModuleDefinitionFile = this->ConvertToNinjaPath(def.c_str());
+ this->ModuleDefinitionFile = this->ConvertToNinjaPath(def);
}
this->GetBuildFileStream() << "\n";
@@ -628,11 +628,11 @@ cmNinjaTargetGenerator
std::string objectDir = this->Target->GetSupportDirectory();
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- ConvertToNinjaPath(objectDir.c_str()),
+ ConvertToNinjaPath(objectDir),
cmLocalGenerator::SHELL);
std::string objectFileDir = cmSystemTools::GetFilenamePath(objectFileName);
vars["OBJECT_FILE_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- ConvertToNinjaPath(objectFileDir.c_str()),
+ ConvertToNinjaPath(objectFileDir),
cmLocalGenerator::SHELL);
this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetTarget(), vars);
@@ -650,7 +650,7 @@ cmNinjaTargetGenerator
if (!cmSystemTools::FileIsFullPath(sourceFileName.c_str()))
{
escapedSourceFileName = cmSystemTools::CollapseFullPath(
- escapedSourceFileName.c_str(),
+ escapedSourceFileName,
this->GetGlobalGenerator()->GetCMakeInstance()->
GetHomeOutputDirectory());
}
@@ -754,7 +754,7 @@ void
cmNinjaTargetGenerator
::EnsureParentDirectoryExists(const std::string& path) const
{
- EnsureDirectoryExists(cmSystemTools::GetParentDirectory(path.c_str()));
+ EnsureDirectoryExists(cmSystemTools::GetParentDirectory(path));
}
@@ -775,14 +775,14 @@ cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()(
// Get the input file location.
std::string input = source.GetFullPath();
input =
- this->Generator->GetLocalGenerator()->ConvertToNinjaPath(input.c_str());
+ this->Generator->GetLocalGenerator()->ConvertToNinjaPath(input);
// Get the output file location.
std::string output = macdir;
output += "/";
output += cmSystemTools::GetFilenameName(input);
output =
- this->Generator->GetLocalGenerator()->ConvertToNinjaPath(output.c_str());
+ this->Generator->GetLocalGenerator()->ConvertToNinjaPath(output);
// Write a build statement to copy the content into the bundle.
this->Generator->GetGlobalGenerator()->WriteMacOSXContentBuild(input,
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index 786e6e2..9a086ca 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -112,7 +112,7 @@ void cmOSXBundleGenerator::CreateFramework(
oldName = frameworkVersion;
newName = versions;
newName += "/Current";
- cmSystemTools::RemoveFile(newName.c_str());
+ cmSystemTools::RemoveFile(newName);
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
this->Makefile->AddCMakeOutputFile(newName);
@@ -121,7 +121,7 @@ void cmOSXBundleGenerator::CreateFramework(
oldName += name;
newName = contentdir;
newName += name;
- cmSystemTools::RemoveFile(newName.c_str());
+ cmSystemTools::RemoveFile(newName);
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
this->Makefile->AddCMakeOutputFile(newName);
@@ -132,7 +132,7 @@ void cmOSXBundleGenerator::CreateFramework(
oldName = "Versions/Current/Resources";
newName = contentdir;
newName += "Resources";
- cmSystemTools::RemoveFile(newName.c_str());
+ cmSystemTools::RemoveFile(newName);
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
this->Makefile->AddCMakeOutputFile(newName);
}
@@ -144,7 +144,7 @@ void cmOSXBundleGenerator::CreateFramework(
oldName = "Versions/Current/Headers";
newName = contentdir;
newName += "Headers";
- cmSystemTools::RemoveFile(newName.c_str());
+ cmSystemTools::RemoveFile(newName);
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
this->Makefile->AddCMakeOutputFile(newName);
}
@@ -156,7 +156,7 @@ void cmOSXBundleGenerator::CreateFramework(
oldName = "Versions/Current/PrivateHeaders";
newName = contentdir;
newName += "PrivateHeaders";
- cmSystemTools::RemoveFile(newName.c_str());
+ cmSystemTools::RemoveFile(newName);
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
this->Makefile->AddCMakeOutputFile(newName);
}
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index 007364c..3cdd2f6 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -140,7 +140,7 @@ bool cmOrderDirectoriesConstraint::FileMayConflict(std::string const& dir,
{
// The file conflicts only if it is not the same as the original
// file due to a symlink or hardlink.
- return !cmSystemTools::SameFile(this->FullPath.c_str(), file.c_str());
+ return !cmSystemTools::SameFile(this->FullPath, file);
}
// Check if the file will be built by cmake.
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index cb070cc..7e4be89 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -488,7 +488,7 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
{
cmSourceFile* sf = *fileIt;
std::string absFile = cmsys::SystemTools::GetRealPath(
- sf->GetFullPath().c_str());
+ sf->GetFullPath());
bool skipMoc = cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC"));
bool generated = cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"));
@@ -766,7 +766,7 @@ void cmQtAutoGenerators::SetupAutoUicTarget(cmTarget const* target,
{
cmSourceFile* sf = *fileIt;
std::string absFile = cmsys::SystemTools::GetRealPath(
- sf->GetFullPath().c_str());
+ sf->GetFullPath());
if (!skipped.insert(absFile).second)
{
@@ -890,7 +890,7 @@ void cmQtAutoGenerators::SetupAutoRccTarget(cmTarget const* target)
if (ext == "qrc")
{
std::string absFile = cmsys::SystemTools::GetRealPath(
- sf->GetFullPath().c_str());
+ sf->GetFullPath());
bool skip = cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"));
if (!skip)
@@ -1013,7 +1013,7 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(cmMakefile* makefile,
const std::string& config)
{
std::string filename(
- cmSystemTools::CollapseFullPath(targetDirectory.c_str()));
+ cmSystemTools::CollapseFullPath(targetDirectory));
cmSystemTools::ConvertToUnixSlashes(filename);
filename += "/AutogenInfo.cmake";
@@ -1158,7 +1158,7 @@ bool cmQtAutoGenerators::ReadOldMocDefinitionsFile(cmMakefile* makefile,
const std::string& targetDirectory)
{
std::string filename(
- cmSystemTools::CollapseFullPath(targetDirectory.c_str()));
+ cmSystemTools::CollapseFullPath(targetDirectory));
cmSystemTools::ConvertToUnixSlashes(filename);
filename += "/AutomocOldMocDefinitions.cmake";
@@ -1176,13 +1176,13 @@ cmQtAutoGenerators::WriteOldMocDefinitionsFile(
const std::string& targetDirectory)
{
std::string filename(
- cmSystemTools::CollapseFullPath(targetDirectory.c_str()));
+ cmSystemTools::CollapseFullPath(targetDirectory));
cmSystemTools::ConvertToUnixSlashes(filename);
filename += "/AutomocOldMocDefinitions.cmake";
- std::fstream outfile;
+ cmsys::ofstream outfile;
outfile.open(filename.c_str(),
- std::ios::out | std::ios::trunc);
+ std::ios::trunc);
outfile << "set(AM_OLD_COMPILE_SETTINGS "
<< cmLocalGenerator::EscapeForCMake(
this->CurrentCompileSettingsStr) << ")\n";
@@ -1222,7 +1222,7 @@ void cmQtAutoGenerators::Init()
{
// Go up twice to get to the framework root
std::vector<std::string> pathComponents;
- cmsys::SystemTools::SplitPath(path.c_str(), pathComponents);
+ cmsys::SystemTools::SplitPath(path, pathComponents);
std::string frameworkPath =cmsys::SystemTools::JoinPath(
pathComponents.begin(), pathComponents.end() - 2);
frameworkPaths.insert(frameworkPath);
@@ -1451,9 +1451,9 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
}
// source file that includes all remaining moc files (_automoc.cpp file)
- std::fstream outfile;
+ cmsys::ofstream outfile;
outfile.open(this->OutMocCppFilename.c_str(),
- std::ios::out | std::ios::trunc);
+ std::ios::trunc);
outfile << automocSource;
outfile.close();
@@ -1484,7 +1484,7 @@ void cmQtAutoGenerators::ParseCppFile(const std::string& absFilename,
}
const std::string absPath = cmsys::SystemTools::GetFilenamePath(
- cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/';
+ cmsys::SystemTools::GetRealPath(absFilename)) + '/';
const std::string scannedFileBasename = cmsys::SystemTools::
GetFilenameWithoutLastExtension(absFilename);
std::string macroName;
@@ -1672,7 +1672,7 @@ void cmQtAutoGenerators::StrictParseCppFile(const std::string& absFilename,
}
const std::string absPath = cmsys::SystemTools::GetFilenamePath(
- cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/';
+ cmsys::SystemTools::GetRealPath(absFilename)) + '/';
const std::string scannedFileBasename = cmsys::SystemTools::
GetFilenameWithoutLastExtension(absFilename);
@@ -1802,7 +1802,7 @@ void cmQtAutoGenerators::ParseForUic(const std::string& absFilename,
std::string::size_type matchOffset = 0;
const std::string realName =
- cmsys::SystemTools::GetRealPath(absFilename.c_str());
+ cmsys::SystemTools::GetRealPath(absFilename);
matchOffset = 0;
if ((strstr(contentsString.c_str(), "ui_") != NULL)
@@ -1836,7 +1836,7 @@ cmQtAutoGenerators::SearchHeadersForCppFile(const std::string& absFilename,
const std::string basename =
cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename);
const std::string absPath = cmsys::SystemTools::GetFilenamePath(
- cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/';
+ cmsys::SystemTools::GetRealPath(absFilename)) + '/';
for(std::vector<std::string>::const_iterator ext = headerExtensions.begin();
ext != headerExtensions.end();
@@ -1904,8 +1904,8 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
{
const std::string mocFilePath = this->Builddir + mocFileName;
int sourceNewerThanMoc = 0;
- bool success = cmsys::SystemTools::FileTimeCompare(sourceFile.c_str(),
- mocFilePath.c_str(),
+ bool success = cmsys::SystemTools::FileTimeCompare(sourceFile,
+ mocFilePath,
&sourceNewerThanMoc);
if (this->GenerateAll || !success || sourceNewerThanMoc >= 0)
{
@@ -1968,7 +1968,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
std::cerr << "AUTOGEN: error: process for " << mocFilePath <<" failed:\n"
<< output << std::endl;
this->RunMocFailed = true;
- cmSystemTools::RemoveFile(mocFilePath.c_str());
+ cmSystemTools::RemoveFile(mocFilePath);
}
return true;
}
@@ -1984,14 +1984,14 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName,
}
const std::string path = cmsys::SystemTools::GetFilenamePath(
- realName.c_str()) + '/';
+ realName) + '/';
std::string ui_output_file = "ui_" + uiFileName + ".h";
std::string ui_input_file = path + uiFileName + ".ui";
int sourceNewerThanUi = 0;
- bool success = cmsys::SystemTools::FileTimeCompare(ui_input_file.c_str(),
- (this->Builddir + ui_output_file).c_str(),
+ bool success = cmsys::SystemTools::FileTimeCompare(ui_input_file,
+ this->Builddir + ui_output_file,
&sourceNewerThanUi);
if (this->GenerateAll || !success || sourceNewerThanUi >= 0)
{
@@ -2042,7 +2042,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName,
std::cerr << "AUTOUIC: error: process for " << ui_output_file <<
" failed:\n" << output << std::endl;
this->RunUicFailed = true;
- cmSystemTools::RemoveFile(ui_output_file.c_str());
+ cmSystemTools::RemoveFile(ui_output_file);
return false;
}
return true;
@@ -2075,8 +2075,8 @@ bool cmQtAutoGenerators::GenerateQrc()
+ ".dir/qrc_" + basename + ".cpp";
int sourceNewerThanQrc = 0;
- bool success = cmsys::SystemTools::FileTimeCompare(si->c_str(),
- rcc_output_file.c_str(),
+ bool success = cmsys::SystemTools::FileTimeCompare(*si,
+ rcc_output_file,
&sourceNewerThanQrc);
if (this->GenerateAll || !success || sourceNewerThanQrc >= 0)
{
@@ -2118,7 +2118,7 @@ bool cmQtAutoGenerators::GenerateQrc()
std::cerr << "AUTORCC: error: process for " << rcc_output_file <<
" failed:\n" << output << std::endl;
this->RunRccFailed = true;
- cmSystemTools::RemoveFile(rcc_output_file.c_str());
+ cmSystemTools::RemoveFile(rcc_output_file);
return false;
}
}
diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx
index c624d17..653d764 100644
--- a/Source/cmSetPropertyCommand.cxx
+++ b/Source/cmSetPropertyCommand.cxx
@@ -204,7 +204,7 @@ bool cmSetPropertyCommand::HandleDirectoryMode()
}
// The local generators are associated with collapsed paths.
- dir = cmSystemTools::CollapseFullPath(dir.c_str());
+ dir = cmSystemTools::CollapseFullPath(dir);
// Lookup the generator.
if(cmLocalGenerator* lg =
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index b833d3f..6fe5c62 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -179,7 +179,7 @@ bool cmSourceFile::FindFullPath(std::string* error)
tryPath += "/";
}
tryPath += this->Location.GetName();
- tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str(), *di);
+ tryPath = cmSystemTools::CollapseFullPath(tryPath, *di);
if(this->TryFullPath(tryPath, ""))
{
return true;
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx
index 1c2454e..efc4376 100644
--- a/Source/cmSourceFileLocation.cxx
+++ b/Source/cmSourceFileLocation.cxx
@@ -63,7 +63,7 @@ cmSourceFileLocation
if (cmSystemTools::FileIsFullPath(this->Directory.c_str()))
{
this->Directory
- = cmSystemTools::CollapseFullPath(this->Directory.c_str());
+ = cmSystemTools::CollapseFullPath(this->Directory);
}
this->Name = cmSystemTools::GetFilenameName(name);
this->UpdateExtension(name);
@@ -92,7 +92,7 @@ void cmSourceFileLocation::DirectoryUseSource()
{
this->Directory =
cmSystemTools::CollapseFullPath(
- this->Directory.c_str(), this->Makefile->GetCurrentDirectory());
+ this->Directory, this->Makefile->GetCurrentDirectory());
this->AmbiguousDirectory = false;
}
}
@@ -105,7 +105,7 @@ void cmSourceFileLocation::DirectoryUseBinary()
{
this->Directory =
cmSystemTools::CollapseFullPath(
- this->Directory.c_str(), this->Makefile->GetCurrentOutputDirectory());
+ this->Directory, this->Makefile->GetCurrentOutputDirectory());
this->AmbiguousDirectory = false;
}
}
@@ -280,10 +280,10 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
// Compare possible directory combinations.
std::string const& srcDir =
cmSystemTools::CollapseFullPath(
- this->Directory.c_str(), this->Makefile->GetCurrentDirectory());
+ this->Directory, this->Makefile->GetCurrentDirectory());
std::string const& binDir =
cmSystemTools::CollapseFullPath(
- this->Directory.c_str(), this->Makefile->GetCurrentOutputDirectory());
+ this->Directory, this->Makefile->GetCurrentOutputDirectory());
if(srcDir != loc.Directory &&
binDir != loc.Directory)
{
@@ -295,10 +295,10 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
// Compare possible directory combinations.
std::string const& srcDir =
cmSystemTools::CollapseFullPath(
- loc.Directory.c_str(), loc.Makefile->GetCurrentDirectory());
+ loc.Directory, loc.Makefile->GetCurrentDirectory());
std::string const& binDir =
cmSystemTools::CollapseFullPath(
- loc.Directory.c_str(), loc.Makefile->GetCurrentOutputDirectory());
+ loc.Directory, loc.Makefile->GetCurrentOutputDirectory());
if(srcDir != this->Directory &&
binDir != this->Directory)
{
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 8baf7b3..ffabd7a 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -28,12 +28,6 @@
#define CMAKE_NO_ANSI_FOR_SCOPE
#endif
-#ifdef __BORLANDC__
-# pragma warn -8030 /* Temporary used for parameter */
-# pragma warn -8027 /* 'for' not inlined. */
-# pragma warn -8026 /* 'exception' not inlined. */
-# pragma warn -8004 /* value never used */
-#endif
#ifdef __ICL
#pragma warning ( disable : 985 )
@@ -78,10 +72,6 @@ public:
#if defined(_MSC_VER)
# pragma warning (push,1)
#endif
-#if defined(__BORLANDC__)
-# pragma warn -8008 /* condition is always false (RESET BELOW!) */
-# pragma warn -8066 /* unreachable code (RESET BELOW!) */
-#endif
#ifndef CMAKE_NO_ANSI_STREAM_HEADERS
# include <fstream>
@@ -112,10 +102,6 @@ public:
#include <set>
#include <deque>
-#if defined(__BORLANDC__)
-# pragma warn .8008 /* condition is always false (disabled above) */
-# pragma warn .8066 /* unreachable code (disabled above) */
-#endif
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
@@ -134,10 +120,6 @@ public:
// include blockers are put in place that prevent including the
// C-style versions from ever including the sub-headers. Therefore we
// have to include the sub-headers here to get the using declarations.
-#if defined(__BORLANDC__)
-# include <mem.h> /* mem... functions from string.h */
-# include <search.h> /* search functions from stdlib.h */
-#endif
#if !defined(_WIN32) && defined(__COMO__)
@@ -412,8 +394,7 @@ inline bool cmHasLiteralSuffixImpl(const char* str1,
}
#if defined(_MSC_VER) && _MSC_VER < 1300 \
- || defined(__GNUC__) && __GNUC__ < 3 \
- || defined(__BORLANDC__)
+ || defined(__GNUC__) && __GNUC__ < 3
#define cmArrayBegin(a) a
#define cmArraySize(a) (sizeof(a)/sizeof(*a))
diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h
index acd636c..981e03e 100644
--- a/Source/cmStandardLexer.h
+++ b/Source/cmStandardLexer.h
@@ -25,25 +25,6 @@
# pragma warning ( disable : 4786 )
#endif
-#if defined(__BORLANDC__)
-# pragma warn -8008 /* condition always returns true */
-# pragma warn -8066 /* unreachable code */
-#endif
-
-/* Borland system header defines these macros without first undef-ing them. */
-#if defined(__BORLANDC__) && __BORLANDC__ >= 0x580
-# undef INT8_MIN
-# undef INT16_MIN
-# undef INT32_MIN
-# undef INT8_MAX
-# undef INT16_MAX
-# undef INT32_MAX
-# undef UINT8_MAX
-# undef UINT16_MAX
-# undef UINT32_MAX
-# include <stdint.h>
-#endif
-
/* Make sure SGI termios does not define ECHO differently. */
#if defined(__sgi) && !defined(__GNUC__)
# include <sys/termios.h>
diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx
index cdde916..93ad4f3 100644
--- a/Source/cmSubdirCommand.cxx
+++ b/Source/cmSubdirCommand.cxx
@@ -42,7 +42,7 @@ bool cmSubdirCommand
std::string srcPath =
std::string(this->Makefile->GetCurrentDirectory()) +
"/" + i->c_str();
- if (cmSystemTools::FileIsDirectory(srcPath.c_str()))
+ if (cmSystemTools::FileIsDirectory(srcPath))
{
std::string binPath =
std::string(this->Makefile->GetCurrentOutputDirectory()) +
@@ -51,7 +51,7 @@ bool cmSubdirCommand
excludeFromAll, preorder, false);
}
// otherwise it is a full path
- else if ( cmSystemTools::FileIsDirectory(i->c_str()) )
+ else if ( cmSystemTools::FileIsDirectory(*i) )
{
// we must compute the binPath from the srcPath, we just take the last
// element from the source path and use that
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index fbb4416..6b7009a 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -52,8 +52,7 @@
#include <sys/stat.h>
#if defined(_WIN32) && \
- (defined(_MSC_VER) || defined(__WATCOMC__) || \
- defined(__BORLANDC__) || defined(__MINGW32__))
+ (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__))
# include <io.h>
#endif
@@ -97,7 +96,7 @@ cm_archive_entry_pathname(struct archive_entry *entry)
{
#if cmsys_STL_HAS_WSTRING
return cmsys::Encoding::ToNarrow(
- archive_entry_pathname_w(entry)).c_str();
+ archive_entry_pathname_w(entry));
#else
return archive_entry_pathname(entry);
#endif
@@ -881,7 +880,7 @@ std::string cmSystemTools::FileExistsInParentDirectories(const char* fname,
break;
}
prevDir = dir;
- dir = cmSystemTools::GetParentDirectory(dir.c_str());
+ dir = cmSystemTools::GetParentDirectory(dir);
}
return "";
}
@@ -1014,7 +1013,7 @@ void cmSystemTools::Glob(const std::string& directory,
cmsys::Directory d;
cmsys::RegularExpression reg(regexp.c_str());
- if (d.Load(directory.c_str()))
+ if (d.Load(directory))
{
size_t numf;
unsigned int i;
@@ -1044,7 +1043,7 @@ void cmSystemTools::GlobDirs(const std::string& path,
std::string finishPath = path.substr(pos+2);
cmsys::Directory d;
- if (d.Load(startPath.c_str()))
+ if (d.Load(startPath))
{
for (unsigned int i = 0; i < d.GetNumberOfFiles(); ++i)
{
@@ -1054,7 +1053,7 @@ void cmSystemTools::GlobDirs(const std::string& path,
std::string fname = startPath;
fname +="/";
fname += d.GetFile(i);
- if(cmSystemTools::FileIsDirectory(fname.c_str()))
+ if(cmSystemTools::FileIsDirectory(fname))
{
fname += finishPath;
cmSystemTools::GlobDirs(fname, files);
@@ -1168,7 +1167,7 @@ bool cmSystemTools::SimpleGlob(const std::string& glob,
bool res = false;
cmsys::Directory d;
- if (d.Load(path.c_str()))
+ if (d.Load(path))
{
for (unsigned int i = 0; i < d.GetNumberOfFiles(); ++i)
{
@@ -1182,11 +1181,11 @@ bool cmSystemTools::SimpleGlob(const std::string& glob,
}
fname += d.GetFile(i);
std::string sfname = d.GetFile(i);
- if ( type > 0 && cmSystemTools::FileIsDirectory(fname.c_str()) )
+ if ( type > 0 && cmSystemTools::FileIsDirectory(fname) )
{
continue;
}
- if ( type < 0 && !cmSystemTools::FileIsDirectory(fname.c_str()) )
+ if ( type < 0 && !cmSystemTools::FileIsDirectory(fname) )
{
continue;
}
@@ -1354,8 +1353,8 @@ std::string cmSystemTools::CollapseCombinedPath(std::string const& dir,
std::vector<std::string> dirComponents;
std::vector<std::string> fileComponents;
- cmSystemTools::SplitPath(dir.c_str(), dirComponents);
- cmSystemTools::SplitPath(file.c_str(), fileComponents);
+ cmSystemTools::SplitPath(dir, dirComponents);
+ cmSystemTools::SplitPath(file, fileComponents);
if(fileComponents.empty())
{
@@ -1649,9 +1648,6 @@ namespace{
fprintf(out, " -> %s", archive_entry_symlink(entry));
}
}
-#ifdef __BORLANDC__
-# pragma warn -8066 /* unreachable code */
-#endif
long copy_data(struct archive *ar, struct archive *aw)
{
@@ -2176,7 +2172,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
if(cmSystemTools::FindProgramPath(argv0, exe, errorMsg))
{
// remove symlinks
- exe = cmSystemTools::GetRealPath(exe.c_str());
+ exe = cmSystemTools::GetRealPath(exe);
exe_dir =
cmSystemTools::GetFilenamePath(exe);
}
@@ -2227,7 +2223,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
cmsys::ifstream fin(src_dir_txt.c_str());
std::string src_dir;
if(fin && cmSystemTools::GetLineFromStream(fin, src_dir) &&
- cmSystemTools::FileIsDirectory(src_dir.c_str()))
+ cmSystemTools::FileIsDirectory(src_dir))
{
cmSystemToolsCMakeRoot = src_dir;
}
@@ -2237,7 +2233,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
src_dir_txt = dir + "/CMakeFiles/CMakeSourceDir.txt";
cmsys::ifstream fin2(src_dir_txt.c_str());
if(fin2 && cmSystemTools::GetLineFromStream(fin2, src_dir) &&
- cmSystemTools::FileIsDirectory(src_dir.c_str()))
+ cmSystemTools::FileIsDirectory(src_dir))
{
cmSystemToolsCMakeRoot = src_dir;
}
@@ -2333,7 +2329,7 @@ bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath,
#endif
// If the file is not a symlink we have no guess for its soname.
- if(!cmSystemTools::FileIsSymlink(fullPath.c_str()))
+ if(!cmSystemTools::FileIsSymlink(fullPath))
{
return false;
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b476a27..ee62f06 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2171,7 +2171,7 @@ cmTarget::GetIncludeDirectories(const std::string& config) const
it = impl->Libraries.begin();
it != impl->Libraries.end(); ++it)
{
- std::string libDir = cmSystemTools::CollapseFullPath(it->c_str());
+ std::string libDir = cmSystemTools::CollapseFullPath(*it);
static cmsys::RegularExpression
frameworkCheck("(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
@@ -4555,7 +4555,7 @@ bool cmTarget::ComputeOutputDir(const std::string& config,
// specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile.
out = (cmSystemTools::CollapseFullPath
- (out.c_str(), this->Makefile->GetStartOutputDirectory()));
+ (out, this->Makefile->GetStartOutputDirectory()));
// The generator may add the configuration's subdirectory.
if(!conf.empty())
@@ -4621,7 +4621,7 @@ bool cmTarget::ComputePDBOutputDir(const std::string& kind,
// specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile.
out = (cmSystemTools::CollapseFullPath
- (out.c_str(), this->Makefile->GetStartOutputDirectory()));
+ (out, this->Makefile->GetStartOutputDirectory()));
// The generator may add the configuration's subdirectory.
if(!conf.empty())
@@ -5286,7 +5286,7 @@ cmTarget::GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const
{
continue;
}
- cmTarget *objLib = this->Makefile->FindTargetToUse(objLibName.c_str());
+ cmTarget *objLib = this->Makefile->FindTargetToUse(objLibName);
if(objLib)
{
objlibs.push_back(objLib);
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index cc6e139..8f2deeb 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -239,7 +239,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
copyDest += "-";
copyDest += this->RunResultVariable;
copyDest += cmSystemTools::GetFilenameExtension(this->OutputFile);
- cmSystemTools::CopyFileAlways(this->OutputFile.c_str(), copyDest.c_str());
+ cmSystemTools::CopyFileAlways(this->OutputFile, copyDest);
std::string resultFileName = this->Makefile->GetHomeOutputDirectory();
resultFileName += "/TryRunResults.cmake";
diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx
index af955ec..cc9f220 100644
--- a/Source/cmWriteFileCommand.cxx
+++ b/Source/cmWriteFileCommand.cxx
@@ -63,8 +63,6 @@ bool cmWriteFileCommand
cmSystemTools::SetPermissions(fileName.c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
mode | S_IWRITE
-#elif defined( __BORLANDC__ )
- mode | S_IWUSR
#else
mode | S_IWUSR | S_IWGRP
#endif
diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c
index 24de2b2..4738920 100644
--- a/Source/cm_sha2.c
+++ b/Source/cm_sha2.c
@@ -103,9 +103,6 @@ typedef cm_sha2_uint32_t sha_word32; /* Exactly 4 bytes */
typedef cm_sha2_uint64_t sha_word64; /* Exactly 8 bytes */
#define SHA_UINT32_C(x) cmIML_INT_UINT32_C(x)
#define SHA_UINT64_C(x) cmIML_INT_UINT64_C(x)
-#if defined(__BORLANDC__)
-# pragma warn -8004 /* variable assigned value that is never used */
-#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wcast-align"
#endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 09d270d..dc1b113 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -647,7 +647,7 @@ void cmake::SetArgs(const std::vector<std::string>& args,
{
directoriesSet = true;
std::string path = arg.substr(2);
- path = cmSystemTools::CollapseFullPath(path.c_str());
+ path = cmSystemTools::CollapseFullPath(path);
cmSystemTools::ConvertToUnixSlashes(path);
this->SetHomeDirectory(path);
}
@@ -663,7 +663,7 @@ void cmake::SetArgs(const std::vector<std::string>& args,
{
directoriesSet = true;
std::string path = arg.substr(2);
- path = cmSystemTools::CollapseFullPath(path.c_str());
+ path = cmSystemTools::CollapseFullPath(path);
cmSystemTools::ConvertToUnixSlashes(path);
this->SetHomeOutputDirectory(path);
}
@@ -723,7 +723,7 @@ void cmake::SetArgs(const std::vector<std::string>& args,
else if(arg.find("--graphviz=",0) == 0)
{
std::string path = arg.substr(strlen("--graphviz="));
- path = cmSystemTools::CollapseFullPath(path.c_str());
+ path = cmSystemTools::CollapseFullPath(path);
cmSystemTools::ConvertToUnixSlashes(path);
this->GraphVizFile = path;
if ( this->GraphVizFile.empty() )
@@ -1212,7 +1212,7 @@ int cmake::DoPreConfigureChecks()
cacheStart += "/CMakeLists.txt";
std::string currentStart = this->GetHomeDirectory();
currentStart += "/CMakeLists.txt";
- if(!cmSystemTools::SameFile(cacheStart.c_str(), currentStart.c_str()))
+ if(!cmSystemTools::SameFile(cacheStart, currentStart))
{
std::string message = "The source \"";
message += currentStart;
@@ -1377,9 +1377,7 @@ int cmake::ActualConfigure()
}
else
{
-#if defined(__BORLANDC__) && defined(_WIN32)
- this->SetGlobalGenerator(new cmGlobalBorlandMakefileGenerator);
-#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
std::string installedCompiler;
// Try to find the newest VS installed on the computer and
// use that as a default if -G is not specified
@@ -1948,7 +1946,7 @@ void cmake::UpdateConversionPathTable()
{
// two entries per line
table >> a; table >> b;
- cmSystemTools::AddTranslationPath( a.c_str(), b.c_str());
+ cmSystemTools::AddTranslationPath( a, b);
}
}
}
@@ -2043,7 +2041,7 @@ int cmake::CheckBuildSystem()
pi != products.end(); ++pi)
{
if(!(cmSystemTools::FileExists(pi->c_str()) ||
- cmSystemTools::FileIsSymlink(pi->c_str())))
+ cmSystemTools::FileIsSymlink(*pi)))
{
if(verbose)
{
@@ -2166,7 +2164,7 @@ void cmake::TruncateOutputLog(const char* fname)
}
if ( !this->CacheManager->GetCacheValue("CMAKE_CACHEFILE_DIR") )
{
- cmSystemTools::RemoveFile(fullPath.c_str());
+ cmSystemTools::RemoveFile(fullPath);
return;
}
off_t fsize = st.st_size;
@@ -2392,7 +2390,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
std::string resultFile;
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
std::string destPath = cwd + "/__cmake_systeminformation";
- cmSystemTools::RemoveADirectory(destPath.c_str());
+ cmSystemTools::RemoveADirectory(destPath);
if (!cmSystemTools::MakeDirectory(destPath.c_str()))
{
std::cerr << "Error: --system-information must be run from a "
@@ -2474,7 +2472,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
}
// now run cmake on the CMakeLists file
- cmSystemTools::ChangeDirectory(destPath.c_str());
+ cmSystemTools::ChangeDirectory(destPath);
std::vector<std::string> args2;
args2.push_back(args[0]);
args2.push_back(destPath);
@@ -2490,12 +2488,12 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
}
// change back to the original directory
- cmSystemTools::ChangeDirectory(cwd.c_str());
+ cmSystemTools::ChangeDirectory(cwd);
// echo results to stdout if needed
if (writeToStdout)
{
- FILE* fin = cmsys::SystemTools::Fopen(resultFile.c_str(), "r");
+ FILE* fin = cmsys::SystemTools::Fopen(resultFile, "r");
if(fin)
{
const int bufferSize = 4096;
@@ -2514,7 +2512,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
}
// clean up the directory
- cmSystemTools::RemoveADirectory(destPath.c_str());
+ cmSystemTools::RemoveADirectory(destPath);
return 0;
}
@@ -2770,7 +2768,7 @@ int cmake::Build(const std::string& dir,
const std::vector<std::string>& nativeOptions,
bool clean)
{
- if(!cmSystemTools::FileIsDirectory(dir.c_str()))
+ if(!cmSystemTools::FileIsDirectory(dir))
{
std::cerr << "Error: " << dir << " is not a directory\n";
return 1;
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index a0c67e0..f5436ff 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -128,7 +128,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
// Copy directory content
if (args[1] == "copy_directory" && args.size() == 4)
{
- if(!cmSystemTools::CopyADirectory(args[2].c_str(), args[3].c_str()))
+ if(!cmSystemTools::CopyADirectory(args[2], args[3]))
{
std::cerr << "Error copying directory from \""
<< args[2] << "\" to \"" << args[3]
@@ -155,7 +155,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
// Compare files
if (args[1] == "compare_files" && args.size() == 4)
{
- if(cmSystemTools::FilesDiffer(args[2].c_str(), args[3].c_str()))
+ if(cmSystemTools::FilesDiffer(args[2], args[3]))
{
std::cerr << "Files \""
<< args[2] << "\" to \"" << args[3]
@@ -269,8 +269,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
else if (args[1] == "remove_directory" && args.size() == 3)
{
- if(cmSystemTools::FileIsDirectory(args[2].c_str()) &&
- !cmSystemTools::RemoveADirectory(args[2].c_str()))
+ if(cmSystemTools::FileIsDirectory(args[2]) &&
+ !cmSystemTools::RemoveADirectory(args[2]))
{
std::cerr << "Error removing directory \"" << args[2]
<< "\".\n";
@@ -293,7 +293,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{
// Complain if the file could not be removed, still exists,
// and the -f option was not given.
- if(!cmSystemTools::RemoveFile(args[cc].c_str()) && !force &&
+ if(!cmSystemTools::RemoveFile(args[cc]) && !force &&
cmSystemTools::FileExists(args[cc].c_str()))
{
return 1;
@@ -309,7 +309,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{
// Complain if the file could not be removed, still exists,
// and the -f option was not given.
- if(!cmSystemTools::Touch(args[cc].c_str(), true))
+ if(!cmSystemTools::Touch(args[cc], true))
{
return 1;
}
@@ -323,7 +323,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{
// Complain if the file could not be removed, still exists,
// and the -f option was not given.
- if(!cmSystemTools::Touch(args[cc].c_str(), false))
+ if(!cmSystemTools::Touch(args[cc], false))
{
return 1;
}
@@ -453,10 +453,10 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
// basically remove the directory
std::string dirName = args[2];
dirName += "/Progress";
- cmSystemTools::RemoveADirectory(dirName.c_str());
+ cmSystemTools::RemoveADirectory(dirName);
// is the last argument a filename that exists?
- FILE *countFile = cmsys::SystemTools::Fopen(args[3].c_str(),"r");
+ FILE *countFile = cmsys::SystemTools::Fopen(args[3],"r");
int count;
if (countFile)
{
@@ -476,7 +476,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
// write the count into the directory
std::string fName = dirName;
fName += "/count.txt";
- FILE *progFile = cmsys::SystemTools::Fopen(fName.c_str(),"w");
+ FILE *progFile = cmsys::SystemTools::Fopen(fName,"w");
if (progFile)
{
fprintf(progFile,"%i\n",count);
@@ -497,7 +497,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
// read the count
fName = dirName;
fName += "/count.txt";
- progFile = cmsys::SystemTools::Fopen(fName.c_str(),"r");
+ progFile = cmsys::SystemTools::Fopen(fName,"r");
int count = 0;
if (!progFile)
{
@@ -517,7 +517,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
fName = dirName;
fName += "/";
fName += args[i];
- progFile = cmsys::SystemTools::Fopen(fName.c_str(),"w");
+ progFile = cmsys::SystemTools::Fopen(fName,"w");
if (progFile)
{
fprintf(progFile,"empty");
@@ -525,7 +525,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
}
}
int fileNum = static_cast<int>
- (cmsys::Directory::GetNumberOfFilesInDirectory(dirName.c_str()));
+ (cmsys::Directory::GetNumberOfFilesInDirectory(dirName));
if (count > 0)
{
// print the progress
@@ -660,10 +660,10 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
// Create a local generator configured for the directory in
// which dependencies will be scanned.
- homeDir = cmSystemTools::CollapseFullPath(homeDir.c_str());
- startDir = cmSystemTools::CollapseFullPath(startDir.c_str());
- homeOutDir = cmSystemTools::CollapseFullPath(homeOutDir.c_str());
- startOutDir = cmSystemTools::CollapseFullPath(startOutDir.c_str());
+ homeDir = cmSystemTools::CollapseFullPath(homeDir);
+ startDir = cmSystemTools::CollapseFullPath(startDir);
+ homeOutDir = cmSystemTools::CollapseFullPath(homeOutDir);
+ startOutDir = cmSystemTools::CollapseFullPath(startOutDir);
cm.SetHomeDirectory(homeDir);
cm.SetStartDirectory(startDir);
cm.SetHomeOutputDirectory(homeOutDir);
@@ -885,9 +885,9 @@ int cmcmd::SymlinkExecutable(std::vector<std::string>& args)
bool cmcmd::SymlinkInternal(std::string const& file, std::string const& link)
{
if(cmSystemTools::FileExists(link.c_str()) ||
- cmSystemTools::FileIsSymlink(link.c_str()))
+ cmSystemTools::FileIsSymlink(link))
{
- cmSystemTools::RemoveFile(link.c_str());
+ cmSystemTools::RemoveFile(link);
}
#if defined(_WIN32) && !defined(__CYGWIN__)
return cmSystemTools::CopyFileAlways(file.c_str(), link.c_str());
@@ -1318,7 +1318,7 @@ int cmcmd::VisualStudioLinkIncremental(std::vector<std::string>& args,
}
std::string manifestFile = targetName;
manifestFile += ".embed.manifest";
- std::string fullPath= cmSystemTools::CollapseFullPath(manifestFile.c_str());
+ std::string fullPath= cmSystemTools::CollapseFullPath(manifestFile);
fout << type << " /* CREATEPROCESS_MANIFEST_RESOURCE_ID "
"*/ 24 /* RT_MANIFEST */ " << "\"" << fullPath << "\"";
fout.close();
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index fdc5c00..fb17ebb 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -9,7 +9,7 @@ set(SRCS)
# and also generate assembler files from C:
if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode" AND
NOT CMAKE_OSX_ARCHITECTURES)
- if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|Clang|AppleClang|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX))
+ if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|HP|SunPro|XL)$") OR (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND UNIX))
set(C_FLAGS "${CMAKE_C_FLAGS}")
separate_arguments(C_FLAGS)
if(CMAKE_OSX_SYSROOT AND CMAKE_C_SYSROOT_FLAG AND NOT ";${C_FLAGS};" MATCHES ";${CMAKE_C_SYSROOT_FLAG};")
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 25cc846..e1e90a1 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1501,7 +1501,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set_tests_properties ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall)
# Test static linking on toolchains known to support it.
- if("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU)$"
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN
AND EXISTS "/usr/lib/libm.a")
add_test(LinkStatic ${CMAKE_CTEST_COMMAND}
@@ -2339,6 +2339,23 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
"Process file.*CoverageTest.java.*Total LOC:.*17.*Percentage Coverage: 76.47*"
ENVIRONMENT COVFILE=)
+ # test coverage for Delphi-code-Coverage
+ configure_file(
+ "${CMake_SOURCE_DIR}/Tests/DelphiCoverage/DartConfiguration.tcl.in"
+ "${CMake_BINARY_DIR}/Testing/DelphiCoverage/DartConfiguration.tcl")
+ file(COPY "${CMake_SOURCE_DIR}/Tests/DelphiCoverage/src"
+ DESTINATION "${CMake_BINARY_DIR}/Testing/DelphiCoverage")
+ file(COPY "${CMake_SOURCE_DIR}/Tests/DelphiCoverage/UTCovTest(UTCovTest.pas).html"
+ DESTINATION "${CMake_BINARY_DIR}/Testing/DelphiCoverage")
+ add_test(NAME CTestDelphiCoverage
+ COMMAND cmake -E chdir
+ ${CMake_BINARY_DIR}/Testing/DelphiCoverage
+ $<TARGET_FILE:ctest> -T Coverage --debug)
+ set_tests_properties(CTestDelphiCoverage PROPERTIES
+ PASS_REGULAR_EXPRESSION
+ "Process file.*UTCovTest.pas.*Total LOC:.*20.*Percentage Coverage: 95.*"
+ ENVIRONMENT COVFILE=)
+
function(add_config_tests cfg)
set(base "${CMake_BINARY_DIR}/Tests/CTestConfig")
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
index 450c204..8c01b32 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
@@ -8,6 +8,13 @@ endif()
if(CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL "ON")
set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries")
+
+ # test package summary override
+ set(CPACK_RPM_PACKAGE_SUMMARY "default summary")
+ set(CPACK_RPM_libraries_PACKAGE_SUMMARY "libraries summary")
+
+ # test package description override
+ set(CPACK_RPM_libraries_PACKAGE_DESCRIPTION "libraries description")
endif()
if(CPACK_GENERATOR MATCHES "DEB")
@@ -20,4 +27,4 @@ endif()
#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE)
#set(CPACK_COMPONENTS_GROUPING)
set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
-#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) \ No newline at end of file
+#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 0b6d07d..4d56218 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -123,3 +123,62 @@ if(expected_file_mask)
message(FATAL_ERROR "error: expected_count=${expected_count} does not match actual_count=${actual_count}: CPackComponents test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error})")
endif()
endif()
+
+# Validate content
+if(CPackGen MATCHES "RPM")
+ find_program(RPM_EXECUTABLE rpm)
+ if(NOT RPM_EXECUTABLE)
+ message(FATAL_ERROR "error: missing rpm executable required by the test")
+ endif()
+
+ set(CPACK_RPM_PACKAGE_SUMMARY "default summary")
+ set(CPACK_RPM_libraries_PACKAGE_SUMMARY "libraries summary")
+ set(CPACK_RPM_libraries_PACKAGE_DESCRIPTION "libraries description")
+ set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION
+ "An extremely useful application that makes use of MyLib")
+ set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+ "C/C\\+\\+ header files for use with MyLib")
+
+ if(${CPackComponentWay} STREQUAL "IgnoreGroup")
+ foreach(check_file ${expected_file})
+ string(REGEX MATCH ".*libraries.*" check_file_libraries_match ${check_file})
+ string(REGEX MATCH ".*headers.*" check_file_headers_match ${check_file})
+ string(REGEX MATCH ".*applications.*" check_file_applications_match ${check_file})
+ string(REGEX MATCH ".*Unspecified.*" check_file_Unspecified_match ${check_file})
+
+ execute_process(COMMAND ${RPM_EXECUTABLE} -pqi ${check_file}
+ OUTPUT_VARIABLE check_file_content
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ if(check_file_libraries_match)
+ set(check_file_match_expected_summary ".*${CPACK_RPM_libraries_PACKAGE_SUMMARY}.*")
+ set(check_file_match_expected_description ".*${CPACK_RPM_libraries_PACKAGE_DESCRIPTION}.*")
+ elseif(check_file_headers_match)
+ set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
+ set(check_file_match_expected_description ".*${CPACK_COMPONENT_HEADERS_DESCRIPTION}.*")
+ elseif(check_file_applications_match)
+ set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
+ set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*")
+ elseif(check_file_Unspecified_match)
+ set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
+ set(check_file_match_expected_description ".*DESCRIPTION.*")
+ else()
+ message(FATAL_ERROR "error: unexpected rpm package '${check_file}'")
+ endif()
+
+ string(REGEX MATCH ${check_file_match_expected_summary} check_file_match_summary ${check_file_content})
+
+ if(NOT check_file_match_summary)
+ message(FATAL_ERROR "error: '${check_file}' rpm package summary does not match expected value - regex '${check_file_match_expected_summary}'")
+ endif()
+
+ string(REGEX MATCH ${check_file_match_expected_description} check_file_match_description ${check_file_content})
+
+ if(NOT check_file_match_description)
+ message(FATAL_ERROR "error: '${check_file}' rpm package description does not match expected value - regex '${check_file_match_expected_description}'")
+ endif()
+ endforeach()
+ elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
+ endif()
+endif()
diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt
index 3ad0b26..2023e74 100644
--- a/Tests/CTestTestMemcheck/CMakeLists.txt
+++ b/Tests/CTestTestMemcheck/CMakeLists.txt
@@ -103,11 +103,11 @@ unset(CTEST_EXTRA_CONFIG)
unset(CTEST_EXTRA_CODE)
unset(CMAKELISTS_EXTRA_CODE)
+#-----------------------------------------------------------------------------
# add ThreadSanitizer test
set(CTEST_EXTRA_CODE
"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\")
")
-
set(CMAKELISTS_EXTRA_CODE
"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\"
-P \"${CMAKE_CURRENT_SOURCE_DIR}/testThreadSanitizer.cmake\")
@@ -119,11 +119,11 @@ set_tests_properties(CTestTestMemcheckDummyThreadSanitizer PROPERTIES
set(CMAKELISTS_EXTRA_CODE )
set(CTEST_EXTRA_CODE)
+#-----------------------------------------------------------------------------
# add LeakSanitizer test
set(CTEST_EXTRA_CODE
-"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\")
+"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\")
")
-
set(CMAKELISTS_EXTRA_CODE
"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\"
-P \"${CMAKE_CURRENT_SOURCE_DIR}/testLeakSanitizer.cmake\")
@@ -134,11 +134,12 @@ set(CTEST_EXTRA_CODE)
set_tests_properties(CTestTestMemcheckDummyLeakSanitizer PROPERTIES
PASS_REGULAR_EXPRESSION
".*Memory checking results:.*Direct leak - 2.*Indirect leak - 1.*")
+
+#-----------------------------------------------------------------------------
# add AddressSanitizer test
set(CTEST_EXTRA_CODE
-"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\")
+"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\")
")
-
set(CMAKELISTS_EXTRA_CODE
"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\"
-P \"${CMAKE_CURRENT_SOURCE_DIR}/testAddressSanitizer.cmake\")
@@ -150,6 +151,41 @@ set_tests_properties(CTestTestMemcheckDummyAddressSanitizer PROPERTIES
PASS_REGULAR_EXPRESSION
".*Memory checking results:.*heap-buffer-overflow - 1.*")
+#-----------------------------------------------------------------------------
+# add MemorySanitizer test
+set(CTEST_EXTRA_CODE
+"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\")
+")
+
+set(CMAKELISTS_EXTRA_CODE
+"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\"
+-P \"${CMAKE_CURRENT_SOURCE_DIR}/testMemorySanitizer.cmake\")
+")
+gen_mc_test_internal(DummyMemorySanitizer "" -DMEMCHECK_TYPE=MemorySanitizer)
+set(CMAKELISTS_EXTRA_CODE )
+set(CTEST_EXTRA_CODE)
+set_tests_properties(CTestTestMemcheckDummyMemorySanitizer PROPERTIES
+ PASS_REGULAR_EXPRESSION
+ ".*Memory checking results:.*use-of-uninitialized-value - 1.*")
+
+#-----------------------------------------------------------------------------
+# add UndefinedBehaviorSanitizer test
+set(CTEST_EXTRA_CODE
+"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\")
+")
+
+set(CMAKELISTS_EXTRA_CODE
+"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\"
+-P \"${CMAKE_CURRENT_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\")
+")
+gen_mc_test_internal(DummyUndefinedBehaviorSanitizer "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer)
+set(CMAKELISTS_EXTRA_CODE )
+set(CTEST_EXTRA_CODE)
+set_tests_properties(CTestTestMemcheckDummyUndefinedBehaviorSanitizer PROPERTIES
+ PASS_REGULAR_EXPRESSION
+ ".*Memory checking results:.*left shift of negative value -256 - 1.*")
+
+#-----------------------------------------------------------------------------
gen_mc_test(DummyPurify "\${PSEUDO_PURIFY}")
gen_mc_test(DummyValgrind "\${PSEUDO_VALGRIND}")
diff --git a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake
index a073151..3082e4b 100644
--- a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake
+++ b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake
@@ -1,4 +1,4 @@
-# this file simulates a program that has been built with thread sanitizer
+# this file simulates a program that has been built with address sanitizer
# options
message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]")
@@ -12,8 +12,7 @@ endif()
# clear the log file
file(REMOVE "${LOG_FILE}.2343")
-# create an error of each type of thread santizer
-# these names come from tsan_report.cc in llvm
+# create an example error from address santizer
file(APPEND "${LOG_FILE}.2343"
"=================================================================
diff --git a/Tests/CTestTestMemcheck/testMemorySanitizer.cmake b/Tests/CTestTestMemcheck/testMemorySanitizer.cmake
new file mode 100644
index 0000000..c87af9a
--- /dev/null
+++ b/Tests/CTestTestMemcheck/testMemorySanitizer.cmake
@@ -0,0 +1,27 @@
+# this file simulates a program that has been built with thread sanitizer
+# options
+
+message("MSAN_OPTIONS = [$ENV{MSAN_OPTIONS}]")
+string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{MSAN_OPTIONS}")
+message("LOG_FILE=[${LOG_FILE}]")
+
+# if we are not asked to simulate address sanitizer don't do it
+if(NOT "$ENV{MSAN_OPTIONS}]" MATCHES "simulate_sanitizer.1")
+ return()
+endif()
+# clear the log file
+file(REMOVE "${LOG_FILE}.2343")
+
+# create an error of each type of thread santizer
+# these names come from tsan_report.cc in llvm
+
+file(APPEND "${LOG_FILE}.2343"
+"=================================================================
+==28423== WARNING: MemorySanitizer: use-of-uninitialized-value
+ #0 0x7f4364210dd9 in main (/home/kitware/msan/msan-bin/umr+0x7bdd9)
+ #1 0x7f4362d9376c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
+ #2 0x7f4364210b0c in _start (/home/kitware/msan/msan-bin/umr+0x7bb0c)
+
+SUMMARY: MemorySanitizer: use-of-uninitialized-value ??:0 main
+Exiting
+")
diff --git a/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake b/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake
new file mode 100644
index 0000000..8ef3c0a
--- /dev/null
+++ b/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake
@@ -0,0 +1,21 @@
+# this file simulates a program that has been built with undefined behavior
+# sanitizer options
+
+message("UBSAN_OPTIONS = [$ENV{UBSAN_OPTIONS}]")
+string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{UBSAN_OPTIONS}")
+message("LOG_FILE=[${LOG_FILE}]")
+
+# if we are not asked to simulate address sanitizer don't do it
+if(NOT "$ENV{UBSAN_OPTIONS}]" MATCHES "simulate_sanitizer.1")
+ return()
+endif()
+# clear the log file
+file(REMOVE "${LOG_FILE}.2343")
+
+# create an error like undefined behavior santizer creates;
+# these names come from ubsan_diag.cc and ubsan_handlers.cc
+# in llvm
+
+file(APPEND "${LOG_FILE}.2343"
+"<unknown>: runtime error: left shift of negative value -256
+")
diff --git a/Tests/DelphiCoverage/DartConfiguration.tcl.in b/Tests/DelphiCoverage/DartConfiguration.tcl.in
new file mode 100644
index 0000000..4edcea6
--- /dev/null
+++ b/Tests/DelphiCoverage/DartConfiguration.tcl.in
@@ -0,0 +1,8 @@
+# This file is configured by CMake automatically as DartConfiguration.tcl
+# If you choose not to use CMake, this file may be hand configured, by
+# filling in the required variables.
+
+
+# Configuration directories and files
+SourceDirectory: ${CMake_BINARY_DIR}/Testing/DelphiCoverage
+BuildDirectory: ${CMake_BINARY_DIR}/Testing/DelphiCoverage
diff --git a/Tests/DelphiCoverage/UTCovTest(UTCovTest.pas).html b/Tests/DelphiCoverage/UTCovTest(UTCovTest.pas).html
new file mode 100644
index 0000000..9caaea3
--- /dev/null
+++ b/Tests/DelphiCoverage/UTCovTest(UTCovTest.pas).html
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+ <title>Delphi CodeCoverage Coverage Report</title>
+<style type="text/css">
+table {border-spacing:0; border-collapse:collapse;}
+table, td, th {border: 1px solid black;}
+td, th {background: white; margin: 0; padding: 2px 0.5em 2px 0.5em}
+td {border-width: 0 1px 0 0;}
+th {border-width: 1px 1px 1px 0;}
+p, h1, h2, h3, th {font-family: verdana,arial,sans-serif; font-size: 10pt;}
+td {font-family: courier,monospace; font-size: 10pt;}
+th {background: #CCCCCC;}
+table.o tr td:nth-child(1) {font-weight: bold;}
+table.o tr td:nth-child(2) {text-align: right;}
+table.o tr td {border-width: 1px;}
+table.s {width: 100%;}
+table.s tr td {padding: 0 0.25em 0 0.25em;}
+table.s tr td:first-child {text-align: right; font-weight: bold;}
+table.s tr.notcovered td {background: #DDDDFF;}
+table.s tr.nocodegen td {background: #FFFFEE;}
+table.s tr.covered td {background: #CCFFCC;}
+table.s tr.covered td:first-child {color: green;}
+table.s {border-width: 1px 0 1px 1px;}
+table.sum tr td {border-width: 1px;}
+table.sum tr th {text-align:right;}
+table.sum tr th:first-child {text-align:center;}
+table.sum tr td {text-align:right;}
+table.sum tr td:first-child {text-align:left;}
+</style>
+</head>
+<body>
+<p>Coverage report for <strong>UTCovTest (C:\Users\joe.snyder\Work\OSEHRA\VistA\Packages\Order Entry Results Reporting\CPRS\Testing\Tests\UTCovTest.pas)</strong>.</p>
+<p> Generated at 10/3/2014 12:24:11 PM by <a href="http://code.google.com/p/delphi-code-coverage/" title="Code Coverage for Delphi 5+">DelphiCodeCoverage</a> - an open source tool for Delphi Code Coverage.</p>
+<p> Statistics for C:\Users\joe.snyder\Work\OSEHRA\VistA\Packages\Order Entry Results Reporting\CPRS\Testing\Tests\UTCovTest.pas </p>
+<table class="o"><tr><td>Number of lines covered</td><td>19</td></tr><tr><td>Number of lines with code gen</td><td>19</td></tr><tr><td>Line coverage</td><td>100%</td></tr></table>
+<br /><br />
+<table class="s">
+<tr class="nocodegen"><td>1</td><td><pre style="display:inline;">//---------------------------------------------------------------------------</pre></td></tr>
+<tr class="nocodegen"><td>2</td><td><pre style="display:inline;">// Copyright 2012 The Open Source Electronic Health Record Agent</pre></td></tr>
+<tr class="nocodegen"><td>3</td><td><pre style="display:inline;">//</pre></td></tr>
+<tr class="nocodegen"><td>4</td><td><pre style="display:inline;">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</pre></td></tr>
+<tr class="nocodegen"><td>5</td><td><pre style="display:inline;">// you may not use this file except in compliance with the License.</pre></td></tr>
+<tr class="nocodegen"><td>6</td><td><pre style="display:inline;">// You may obtain a copy of the License at</pre></td></tr>
+<tr class="nocodegen"><td>7</td><td><pre style="display:inline;">//</pre></td></tr>
+<tr class="nocodegen"><td>8</td><td><pre style="display:inline;">// &nbsp; &nbsp; http://www.apache.org/licenses/LICENSE-2.0</pre></td></tr>
+<tr class="nocodegen"><td>9</td><td><pre style="display:inline;">//</pre></td></tr>
+<tr class="nocodegen"><td>10</td><td><pre style="display:inline;">// Unless required by applicable law or agreed to in writing, software</pre></td></tr>
+<tr class="nocodegen"><td>11</td><td><pre style="display:inline;">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</pre></td></tr>
+<tr class="nocodegen"><td>12</td><td><pre style="display:inline;">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</pre></td></tr>
+<tr class="nocodegen"><td>13</td><td><pre style="display:inline;">// See the License for the specific language governing permissions and</pre></td></tr>
+<tr class="nocodegen"><td>14</td><td><pre style="display:inline;">// limitations under the License.</pre></td></tr>
+<tr class="nocodegen"><td>15</td><td><pre style="display:inline;">//---------------------------------------------------------------------------</pre></td></tr>
+<tr class="nocodegen"><td>16</td><td><pre style="display:inline;">unit UTCovTest;</pre></td></tr>
+<tr class="nocodegen"><td>17</td><td><pre style="display:inline;">interface</pre></td></tr>
+<tr class="nocodegen"><td>18</td><td><pre style="display:inline;">uses UnitTest, TestFrameWork,SysUtils,Windows;</pre></td></tr>
+<tr class="nocodegen"><td>19</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="nocodegen"><td>20</td><td><pre style="display:inline;">implementation</pre></td></tr>
+<tr class="nocodegen"><td>21</td><td><pre style="display:inline;">type</pre></td></tr>
+<tr class="nocodegen"><td>22</td><td><pre style="display:inline;">UTCovTestTests=class(TTestCase)</pre></td></tr>
+<tr class="nocodegen"><td>23</td><td><pre style="display:inline;"> &nbsp;public</pre></td></tr>
+<tr class="nocodegen"><td>24</td><td><pre style="display:inline;"> &nbsp;procedure SetUp; override;</pre></td></tr>
+<tr class="nocodegen"><td>25</td><td><pre style="display:inline;"> &nbsp;procedure TearDown; override;</pre></td></tr>
+<tr class="nocodegen"><td>26</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="nocodegen"><td>27</td><td><pre style="display:inline;"> &nbsp;published</pre></td></tr>
+<tr class="nocodegen"><td>28</td><td><pre style="display:inline;"> &nbsp; &nbsp;procedure TestCov1;</pre></td></tr>
+<tr class="nocodegen"><td>29</td><td><pre style="display:inline;"> &nbsp; &nbsp;procedure TestCov2;</pre></td></tr>
+<tr class="nocodegen"><td>30</td><td><pre style="display:inline;"> &nbsp; &nbsp;procedure TestCov3;</pre></td></tr>
+<tr class="nocodegen"><td>31</td><td><pre style="display:inline;"> &nbsp;end;</pre></td></tr>
+<tr class="nocodegen"><td>32</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="nocodegen"><td>33</td><td><pre style="display:inline;">procedure NotRun;</pre></td></tr>
+<tr class="nocodegen"><td>34</td><td><pre style="display:inline;">begin</pre></td></tr>
+<tr class="nocodegen"><td>35</td><td><pre style="display:inline;"> &nbsp; &nbsp;WriteLn(&apos;This line will never run&apos;);</pre></td></tr>
+<tr class="nocodegen"><td>36</td><td><pre style="display:inline;">end;</pre></td></tr>
+<tr class="nocodegen"><td>37</td><td><pre style="display:inline;">procedure UTCovTestTests.SetUp;</pre></td></tr>
+<tr class="nocodegen"><td>38</td><td><pre style="display:inline;">begin</pre></td></tr>
+<tr class="covered"><td>39</td><td><pre style="display:inline;">end;</pre></td></tr>
+<tr class="nocodegen"><td>40</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="nocodegen"><td>41</td><td><pre style="display:inline;">procedure UTCovTestTests.TearDown;</pre></td></tr>
+<tr class="nocodegen"><td>42</td><td><pre style="display:inline;">begin</pre></td></tr>
+<tr class="covered"><td>43</td><td><pre style="display:inline;">end;</pre></td></tr>
+<tr class="nocodegen"><td>44</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="nocodegen"><td>45</td><td><pre style="display:inline;">procedure UTCovTestTests.TestCov1;</pre></td></tr>
+<tr class="covered"><td>46</td><td><pre style="display:inline;">begin</pre></td></tr>
+<tr class="nocodegen"><td>47</td><td><pre style="display:inline;"> &nbsp;{</pre></td></tr>
+<tr class="nocodegen"><td>48</td><td><pre style="display:inline;"> &nbsp;Block comment lines</pre></td></tr>
+<tr class="nocodegen"><td>49</td><td><pre style="display:inline;"> &nbsp;}</pre></td></tr>
+<tr class="covered"><td>50</td><td><pre style="display:inline;"> &nbsp;CheckEquals(1,2-1);</pre></td></tr>
+<tr class="covered"><td>51</td><td><pre style="display:inline;">end;</pre></td></tr>
+<tr class="nocodegen"><td>52</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="nocodegen"><td>53</td><td><pre style="display:inline;">procedure UTCovTestTests.TestCov2;</pre></td></tr>
+<tr class="nocodegen"><td>54</td><td><pre style="display:inline;">var</pre></td></tr>
+<tr class="nocodegen"><td>55</td><td><pre style="display:inline;"> &nbsp;i:DWORD;</pre></td></tr>
+<tr class="covered"><td>56</td><td><pre style="display:inline;">begin</pre></td></tr>
+<tr class="covered"><td>57</td><td><pre style="display:inline;"> &nbsp;for i := 0 to 1 do</pre></td></tr>
+<tr class="covered"><td>58</td><td><pre style="display:inline;"> &nbsp; &nbsp;WriteLn( IntToStr(i));</pre></td></tr>
+<tr class="nocodegen"><td>59</td><td><pre style="display:inline;"> &nbsp;// Comment</pre></td></tr>
+<tr class="covered"><td>60</td><td><pre style="display:inline;"> &nbsp;CheckEquals(i,2);</pre></td></tr>
+<tr class="covered"><td>61</td><td><pre style="display:inline;">end;</pre></td></tr>
+<tr class="nocodegen"><td>62</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="nocodegen"><td>63</td><td><pre style="display:inline;">procedure UTCovTestTests.TestCov3;</pre></td></tr>
+<tr class="nocodegen"><td>64</td><td><pre style="display:inline;">var</pre></td></tr>
+<tr class="nocodegen"><td>65</td><td><pre style="display:inline;"> i : DWORD;</pre></td></tr>
+<tr class="covered"><td>66</td><td><pre style="display:inline;">begin</pre></td></tr>
+<tr class="covered"><td>67</td><td><pre style="display:inline;"> &nbsp;i := 0;</pre></td></tr>
+<tr class="covered"><td>68</td><td><pre style="display:inline;"> &nbsp;while i &lt; 5 do</pre></td></tr>
+<tr class="covered"><td>69</td><td><pre style="display:inline;"> &nbsp; i := i+1;</pre></td></tr>
+<tr class="covered"><td>70</td><td><pre style="display:inline;"> &nbsp;CheckEquals(i,5);</pre></td></tr>
+<tr class="covered"><td>71</td><td><pre style="display:inline;">end;</pre></td></tr>
+<tr class="nocodegen"><td>72</td><td><pre style="display:inline;"></pre></td></tr>
+<tr class="covered"><td>73</td><td><pre style="display:inline;">begin</pre></td></tr>
+<tr class="covered"><td>74</td><td><pre style="display:inline;"> &nbsp;UnitTest.addSuite(UTCovTestTests.Suite);</pre></td></tr>
+<tr class="covered"><td>75</td><td><pre style="display:inline;">end.</pre></td></tr>
+</table>
+</body>
+</html>
diff --git a/Tests/DelphiCoverage/src/UTCovTest.pas b/Tests/DelphiCoverage/src/UTCovTest.pas
new file mode 100644
index 0000000..66db3c0
--- /dev/null
+++ b/Tests/DelphiCoverage/src/UTCovTest.pas
@@ -0,0 +1,75 @@
+//---------------------------------------------------------------------------
+// Copyright 2012 The Open Source Electronic Health Record Agent
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//---------------------------------------------------------------------------
+unit UTCovTest;
+interface
+uses UnitTest, TestFrameWork,SysUtils,Windows;
+
+implementation
+type
+UTCovTestTests=class(TTestCase)
+ public
+ procedure SetUp; override;
+ procedure TearDown; override;
+
+ published
+ procedure TestCov1;
+ procedure TestCov2;
+ procedure TestCov3;
+ end;
+
+procedure NotRun;
+begin
+ WriteLn('This line will never run');
+end;
+procedure UTCovTestTests.SetUp;
+begin
+end;
+
+procedure UTCovTestTests.TearDown;
+begin
+end;
+
+procedure UTCovTestTests.TestCov1;
+begin
+ {
+ Block comment lines
+ }
+ CheckEquals(1,2-1);
+end;
+
+procedure UTCovTestTests.TestCov2;
+var
+ i:DWORD;
+begin
+ for i := 0 to 1 do
+ WriteLn( IntToStr(i));
+ // Comment
+ CheckEquals(i,2);
+end;
+
+procedure UTCovTestTests.TestCov3;
+var
+ i : DWORD;
+begin
+ i := 0;
+ while i < 5 do
+ i := i+1;
+ CheckEquals(i,5);
+end;
+
+begin
+ UnitTest.addSuite(UTCovTestTests.Suite);
+end. \ No newline at end of file
diff --git a/Tests/ForceInclude/CMakeLists.txt b/Tests/ForceInclude/CMakeLists.txt
index 5c02ebb..e231054 100644
--- a/Tests/ForceInclude/CMakeLists.txt
+++ b/Tests/ForceInclude/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3.20110103)
project(ForceInclude C)
# Make sure the proper compiler is in use.
-if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
message(FATAL_ERROR "The ForceInclude test works only with MSVC or Intel")
endif()
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 1982a60..8700c94 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -13,11 +13,11 @@ message("CMAKE_Fortran_COMPILER = ${CMAKE_Fortran_COMPILER}")
message("CMAKE_Fortran_FLAGS = ${CMAKE_Fortran_FLAGS}")
set(_SHARED SHARED)
-if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "^(XL|VisualAge)$")
+if(CMAKE_Fortran_COMPILER_ID MATCHES "^(XL|VisualAge)$")
# We do not implement SHARED Fortran libs on AIX yet!
# Workaround: Set LINKER_LANGUAGE to C, which uses 'xlc' and Fortran implicits.
set(_SHARED STATIC)
-elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
+elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
# g77 2.96 does not support shared libs on Itanium because g2c is not -fPIC
execute_process(COMMAND ${CMAKE_Fortran_COMPILER} --version
OUTPUT_VARIABLE output ERROR_VARIABLE output)
@@ -29,10 +29,10 @@ endif()
# Pick a module .def file with the properly mangled symbol name.
set(world_def "")
if(WIN32 AND NOT CYGWIN)
- if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(world_def world_gnu.def)
- elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel" OR
- "${CMAKE_GENERATOR}" MATCHES "Visual Studio") # Intel plugin
+ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel" OR
+ CMAKE_GENERATOR MATCHES "Visual Studio") # Intel plugin
set(world_def world_icl.def)
endif()
endif()
@@ -119,7 +119,7 @@ endfunction()
# call the test_fortran_c_interface_module function
if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES
"(Intel:MSVC|Absoft:GNU)"
- OR ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "${CMAKE_C_COMPILER_ID}" ))
+ OR (CMAKE_Fortran_COMPILER_ID MATCHES CMAKE_C_COMPILER_ID ))
test_fortran_c_interface_module()
else()
message("Fortran does not match c compiler")
@@ -128,7 +128,7 @@ else()
# hack to make g77 work after CL has been enabled
# as a languge, cmake needs language specific versions
# of these variables....
- if(WIN32 AND "${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ if(WIN32 AND CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_CREATE_CONSOLE_EXE )
set(CMAKE_LIBRARY_PATH_FLAG "-L")
set(CMAKE_LINK_LIBRARY_FLAG "-l")
@@ -137,8 +137,8 @@ else()
# gnu and sunpro do not use the same flags here...
# however if LDFLAGS is used to set -m64 it causes odd stuf
# with the fortran build
- if( ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
- AND ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "SunPro"))
+ if( (CMAKE_C_COMPILER_ID MATCHES "GNU")
+ AND (CMAKE_Fortran_COMPILER_ID MATCHES "SunPro"))
set(CMAKE_EXE_LINKER_FLAGS "")
set(CMAKE_Fortran_FLAGS "")
endif()
diff --git a/Tests/FortranC/CMakeLists.txt b/Tests/FortranC/CMakeLists.txt
index f335583..79c670d 100644
--- a/Tests/FortranC/CMakeLists.txt
+++ b/Tests/FortranC/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
project(FortranC C Fortran)
# Skip this test for compilers not known to be compatible.
-if(NOT ("${CMAKE_C_COMPILER_ID}" STREQUAL "${CMAKE_Fortran_COMPILER_ID}" OR
+if(NOT (CMAKE_C_COMPILER_ID STREQUAL CMAKE_Fortran_COMPILER_ID OR
"${CMAKE_C_COMPILER_ID}-${CMAKE_Fortran_COMPILER_ID}" MATCHES "^(MSVC-Intel)$"))
message(STATUS "${CMAKE_C_COMPILER_ID} C and ${CMAKE_Fortran_COMPILER_ID} Fortran not known to be compatible!")
return()
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index a3f83c9..f55e727 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -8,13 +8,14 @@ set_property(TARGET FortranOnlylib PROPERTY Fortran_FORMAT FIXED)
set_property(SOURCE world.f PROPERTY Fortran_FORMAT FREE)
# create an executable that calls hello and world
-add_executable(FortranOnly testf.f)
-target_link_libraries(FortranOnly FortranOnlylib)
+add_executable(FortranOnly1 testf.f)
+set_property(TARGET FortranOnly1 PROPERTY OUTPUT_NAME FortranOnly)
+target_link_libraries(FortranOnly1 FortranOnlylib)
-# create a custom command that runs FortranOnly and puts
+# create a custom command that runs FortranOnly1 and puts
# the output into the file testfhello.txt
add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt
- COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly
+ COMMAND FortranOnly1
> testfhello.txt)
# create a second executable FortranOnly2 that has
# testfhello.txt has an source file so that it will
@@ -27,15 +28,15 @@ add_custom_target(checktestf2 ALL
COMMAND ${CMAKE_COMMAND}
-P ${FortranOnly_SOURCE_DIR}/checktestf2.cmake)
-# create a custom target that runs FortranOnly exectuable and creates
+# create a custom target that runs FortranOnly1 exectuable and creates
# a file out.txt that should have hello world in it.
add_custom_target(sayhello ALL
- COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly > out.txt
+ COMMAND FortranOnly1 > out.txt
)
# make sure stuff is built in the right order
add_dependencies(checktestf2 FortranOnly2)
-add_dependencies(sayhello FortranOnly)
-add_dependencies(FortranOnly2 FortranOnly)
+add_dependencies(sayhello FortranOnly1)
+add_dependencies(FortranOnly2 FortranOnly1)
# add a custom target that checkes that out.txt has the correct
# content
diff --git a/Tests/LinkStatic/CMakeLists.txt b/Tests/LinkStatic/CMakeLists.txt
index 2062c43..200d4e5 100644
--- a/Tests/LinkStatic/CMakeLists.txt
+++ b/Tests/LinkStatic/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.4.20110303 FATAL_ERROR)
project(LinkStatic C)
-if(NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU)$")
+if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU")
message(FATAL_ERROR "This test works only with the GNU compiler!")
endif()
diff --git a/Tests/ModuleDefinition/CMakeLists.txt b/Tests/ModuleDefinition/CMakeLists.txt
index a30f643..bfbb343 100644
--- a/Tests/ModuleDefinition/CMakeLists.txt
+++ b/Tests/ModuleDefinition/CMakeLists.txt
@@ -13,7 +13,7 @@ add_custom_command(OUTPUT example_dll_gen.def
add_library(example_dll_gen SHARED example_dll_gen.c example_dll_gen.def)
# Test /DEF:<file> flag recognition for VS.
-if(MSVC OR "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+if(MSVC OR CMAKE_C_COMPILER_ID STREQUAL "Intel")
add_library(example_dll_2 SHARED example_dll_2.c)
set_property(TARGET example_dll_2 PROPERTY LINK_FLAGS
/DEF:"${ModuleDefinition_SOURCE_DIR}/example_dll_2.def")
diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt
index 90af600..180f9fe 100644
--- a/Tests/PDBDirectoryAndName/CMakeLists.txt
+++ b/Tests/PDBDirectoryAndName/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
project(PDBDirectoryAndName C)
# Make sure the proper compiler is in use.
-if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
message(FATAL_ERROR "The PDBDirectoryAndName test works only with MSVC or Intel")
endif()
diff --git a/Tests/PrecompiledHeader/CMakeLists.txt b/Tests/PrecompiledHeader/CMakeLists.txt
index 6958131..98bdd88 100644
--- a/Tests/PrecompiledHeader/CMakeLists.txt
+++ b/Tests/PrecompiledHeader/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.6)
project(PrecompiledHeader C)
# Make sure the proper compiler is in use.
-if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
message(FATAL_ERROR "The PrecompiledHeader test works only with MSVC or Intel")
endif()
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index cdfdcc1..8ff0cfd 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -114,7 +114,7 @@ endif()
set(EXPR_OP1 "/")
if((NOT MSVC OR PP_NMAKE) AND
- NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+ NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
# MSVC cl, Intel icl: %
# When the cl compiler is invoked from the command line then % must
# be written %% (to distinguish from %ENV% syntax). However cl does
diff --git a/Tests/RunCMake/FPHSA/FindPseudo.cmake b/Tests/RunCMake/FPHSA/FindPseudo.cmake
new file mode 100644
index 0000000..dc3558b
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/FindPseudo.cmake
@@ -0,0 +1,6 @@
+# pseudo find_module
+
+set(FOOBAR TRUE)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Pseudo REQUIRED_VARS FOOBAR VERSION_VAR Pseudo_VERSION)
diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
index 0d48fa9..bb7743c 100644
--- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
@@ -1,3 +1,28 @@
include(RunCMake)
run_cmake(BadFoundVar)
+
+# The pseudo module will "find" a package with the given version. Check if the
+# version selection code in FPHSA works correctly.
+set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=1.2.3.4.5")
+run_cmake(any_version)
+
+# test EXACT mode with every subcomponent
+run_cmake(exact_1)
+run_cmake(exact_1.2)
+run_cmake(exact_1.2.3)
+run_cmake(exact_1.2.3.4)
+
+# now test every component with an invalid version
+run_cmake(exact_0)
+run_cmake(exact_2)
+run_cmake(exact_1.1)
+run_cmake(exact_1.3)
+run_cmake(exact_1.2.2)
+run_cmake(exact_1.2.4)
+run_cmake(exact_1.2.3.3)
+run_cmake(exact_1.2.3.5)
+
+# check if searching for a version 0 works
+list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0")
+run_cmake(exact_0_matching)
diff --git a/Tests/RunCMake/FPHSA/any_version.cmake b/Tests/RunCMake/FPHSA/any_version.cmake
new file mode 100644
index 0000000..b34a540
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/any_version.cmake
@@ -0,0 +1 @@
+find_package(Pseudo REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_0-result.txt b/Tests/RunCMake/FPHSA/exact_0-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_0-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_0.cmake b/Tests/RunCMake/FPHSA/exact_0.cmake
new file mode 100644
index 0000000..432887b
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_0.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 0 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_0_matching.cmake b/Tests/RunCMake/FPHSA/exact_0_matching.cmake
new file mode 100644
index 0000000..432887b
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_0_matching.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 0 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.1-result.txt b/Tests/RunCMake/FPHSA/exact_1.1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_1.1.cmake b/Tests/RunCMake/FPHSA/exact_1.1.cmake
new file mode 100644
index 0000000..d967da9
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.1.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.1 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.2.cmake b/Tests/RunCMake/FPHSA/exact_1.2.2.cmake
new file mode 100644
index 0000000..e959f61
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.2.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.2.2 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake
new file mode 100644
index 0000000..af53cc8
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.2.3.3 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake
new file mode 100644
index 0000000..1e2baa6
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.2.3.4 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake
new file mode 100644
index 0000000..ddb0d13
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.2.3.5 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.cmake
new file mode 100644
index 0000000..bf9b2a3
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.3.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.2.3 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.4.cmake b/Tests/RunCMake/FPHSA/exact_1.2.4.cmake
new file mode 100644
index 0000000..548a079
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.4.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.2.4 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.2.cmake b/Tests/RunCMake/FPHSA/exact_1.2.cmake
new file mode 100644
index 0000000..080d961
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.2.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.2 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.3-result.txt b/Tests/RunCMake/FPHSA/exact_1.3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_1.3.cmake b/Tests/RunCMake/FPHSA/exact_1.3.cmake
new file mode 100644
index 0000000..e36b0c5
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.3.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1.3 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_1.cmake b/Tests/RunCMake/FPHSA/exact_1.cmake
new file mode 100644
index 0000000..adadbc4
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_1.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 1 EXACT REQUIRED)
diff --git a/Tests/RunCMake/FPHSA/exact_2-result.txt b/Tests/RunCMake/FPHSA/exact_2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FPHSA/exact_2.cmake b/Tests/RunCMake/FPHSA/exact_2.cmake
new file mode 100644
index 0000000..55353a8
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/exact_2.cmake
@@ -0,0 +1 @@
+find_package(Pseudo 2 EXACT REQUIRED)
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index a4d9490..e497503 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -265,7 +265,7 @@ TEST_FAIL(CXX_RUN_SHOULD_FAIL "CHECK_CXX_SOURCE_RUNS() succeeded, but should hav
TEST_ASSERT(CXX_RUN_SHOULD_WORK "CHECK_CXX_SOURCE_RUNS() failed")
foreach(lang C CXX)
- if(NOT "${CMAKE_${lang}_COMPILER_ID}" MATCHES "^(PathScale)$")
+ if(NOT CMAKE_${lang}_COMPILER_ID STREQUAL "PathScale")
set(${lang}_DD --)
endif()
endforeach()
@@ -280,7 +280,7 @@ include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(${CXX_DD}-_this_is_not_a_flag_ CXX_BOGUS_FLAG)
TEST_FAIL(CXX_BOGUS_FLAG "CHECK_CXX_COMPILER_FLAG() succeeded, but should have failed")
-if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
unset(C_STRICT_PROTOTYPES CACHE)
CHECK_C_COMPILER_FLAG("-Werror;-Wstrict-prototypes" C_STRICT_PROTOTYPES)
TEST_ASSERT(C_STRICT_PROTOTYPES "CHECK_C_COMPILER_FLAG failed -Werror -Wstrict-prototypes")
diff --git a/Tests/VSResource/CMakeLists.txt b/Tests/VSResource/CMakeLists.txt
index c5cb336..17eb041 100644
--- a/Tests/VSResource/CMakeLists.txt
+++ b/Tests/VSResource/CMakeLists.txt
@@ -18,6 +18,11 @@ if(CMAKE_RC_COMPILER MATCHES windres)
message(STATUS "CMAKE_RC_COMPILER MATCHES windres")
add_definitions(/DCMAKE_RCDEFINE=test.txt)
add_definitions(/DCMAKE_RCDEFINE_NO_QUOTED_STRINGS)
+ if(MSYS AND CMAKE_CURRENT_BINARY_DIR MATCHES " ")
+ # windres cannot handle spaces in include dir, and
+ # for the MSys shell we do not convert to shortpath.
+ set(CMAKE_RC_NO_INCLUDE 1)
+ endif()
elseif(MSVC60)
# VS6 rc compiler does not deal well with spaces in a "/D" value, but it can
# handle the quoting
@@ -30,10 +35,17 @@ else()
set(TEXTFILE_FROM_SOURCE_DIR "textfile, spaces in name, from binary dir")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test.txt
"${CMAKE_CURRENT_BINARY_DIR}/test with spaces.txt" @ONLY)
- include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_definitions(/DCMAKE_RCDEFINE="test with spaces.txt")
endif()
+if(CMAKE_RC_NO_INCLUDE)
+ add_definitions(/DCMAKE_RC_NO_INCLUDE)
+else()
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include.rc.in
+ "${CMAKE_CURRENT_BINARY_DIR}/include.rc" @ONLY)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+endif()
+
add_executable(VSResource main.cpp test.rc)
set_property(TARGET VSResource
diff --git a/Tests/VSResource/include.rc.in b/Tests/VSResource/include.rc.in
new file mode 100644
index 0000000..f0f6859
--- /dev/null
+++ b/Tests/VSResource/include.rc.in
@@ -0,0 +1 @@
+// This file should be included.
diff --git a/Tests/VSResource/test.rc b/Tests/VSResource/test.rc
index 4ce4b53..0de4683 100644
--- a/Tests/VSResource/test.rc
+++ b/Tests/VSResource/test.rc
@@ -1,4 +1,7 @@
#ifdef CMAKE_RCDEFINE
+# ifndef CMAKE_RC_NO_INCLUDE
+# include <include.rc>
+# endif
// This line can compile with either an unquoted or a quoted string
1025 TEXTFILE CMAKE_RCDEFINE
diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt
index a2359cc..a16b5cd 100644
--- a/Utilities/KWIML/test/CMakeLists.txt
+++ b/Utilities/KWIML/test/CMakeLists.txt
@@ -20,7 +20,7 @@ set_property(DIRECTORY
# Suppress printf/scanf format warnings; we test if the sizes match.
foreach(lang C CXX)
- if(KWIML_LANGUAGE_${lang} AND "${CMAKE_${lang}_COMPILER_ID}" STREQUAL GNU)
+ if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format")
endif()
endforeach()
diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake
index 5f4da8f..841f244 100644
--- a/Utilities/Release/upload_release.cmake
+++ b/Utilities/Release/upload_release.cmake
@@ -1,6 +1,6 @@
set(CTEST_RUN_CURRENT_SCRIPT 0)
if(NOT VERSION)
- set(VERSION 3.0)
+ set(VERSION 3.1)
endif()
if(NOT DEFINED PROJECT_PREFIX)
set(PROJECT_PREFIX cmake-${VERSION})
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 03f10a0..97fd2ff 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -19,11 +19,6 @@ SET(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
-# Disable warnings on Borland to avoid changing 3rd party code.
-IF(BORLAND)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
-ENDIF(BORLAND)
-
# If we are on AIX, do the _ALL_SOURCE magic
IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
SET(_ALL_SOURCE 1)
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index f1459d4..b150408 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -56,13 +56,11 @@ SET(CMAKE_REQUIRED_LIBRARIES)
SET(CMAKE_REQUIRED_FLAGS)
# Disable warnings to avoid changing 3rd party code.
-IF("${CMAKE_C_COMPILER_ID}" MATCHES
+IF(CMAKE_C_COMPILER_ID MATCHES
"^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
-ELSEIF("${CMAKE_C_COMPILER_ID}" MATCHES "^(PathScale)$")
+ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
-ELSEIF(BORLAND)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
ENDIF()
# Enable CTest/CDash support
@@ -666,14 +664,14 @@ ENDMACRO(CHECK_CRYPTO_WIN CRYPTO_LIST)
MACRO(CHECK_ICONV LIB TRY_ICONV_CONST)
IF(NOT HAVE_ICONV)
CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
- IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+ IF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
#
# During checking iconv proto type, we should use -Werror to avoid the
# success of iconv detection with a warnig which success is a miss
# detection. So this needs for all build mode(even it's a release mode).
#
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
- ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+ ENDIF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
IF (MSVC)
# NOTE: /WX option is the same as gcc's -Werror option.
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /WX")
diff --git a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c
index 088ecea..c666551 100644
--- a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c
+++ b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c
@@ -85,7 +85,7 @@ static int archive_write_lzop_free(struct archive_write_filter *);
#if defined(HAVE_LZO_LZOCONF_H) && defined(HAVE_LZO_LZO1X_H)
/* Maximum block size. */
#define BLOCK_SIZE (256 * 1024)
-/* Block infomation is composed of uncompressed size(4 bytes),
+/* Block information is composed of uncompressed size(4 bytes),
* compressed size(4 bytes) and the checksum of uncompressed data(4 bytes)
* in this lzop writer. */
#define BLOCK_INfO_SIZE 12
diff --git a/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c b/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c
index 4d343ea..b0c8018 100644
--- a/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c
+++ b/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c
@@ -1115,7 +1115,7 @@ write_mtree_entry_tree(struct archive_write *a)
do {
if (mtree->output_global_set) {
/*
- * Collect attribute infomation to know which value
+ * Collect attribute information to know which value
* is frequently used among the children.
*/
attr_counter_set_reset(mtree);
diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt
index 23549c5..c03147f 100644
--- a/Utilities/cmliblzma/CMakeLists.txt
+++ b/Utilities/cmliblzma/CMakeLists.txt
@@ -201,13 +201,11 @@ INCLUDE_DIRECTORIES(
)
# Disable warnings to avoid changing 3rd party code.
-IF("${CMAKE_C_COMPILER_ID}" MATCHES
+IF(CMAKE_C_COMPILER_ID MATCHES
"^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
-ELSEIF("${CMAKE_C_COMPILER_ID}" MATCHES "^(PathScale)$")
+ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
-ELSEIF(BORLAND)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
ENDIF()
ADD_LIBRARY(cmliblzma ${LZMA_SRCS})
diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt
index f161056..66e8be2 100644
--- a/Utilities/cmzlib/CMakeLists.txt
+++ b/Utilities/cmzlib/CMakeLists.txt
@@ -18,12 +18,10 @@ IF(WIN32)
IF(BUILD_SHARED_LIBS)
SET(ZLIB_DLL 1)
IF(NOT UNIX)
- IF(NOT BORLAND)
- IF(NOT MINGW)
- SET(ZLIB_SRCS ${ZLIB_SRCS} zlib.def zlib.rc )
- ENDIF(NOT MINGW)
- ENDIF(NOT BORLAND)
- ENDIF(NOT UNIX)
+ IF(NOT MINGW)
+ SET(ZLIB_SRCS ${ZLIB_SRCS} zlib.def zlib.rc )
+ ENDIF(NOT MINGW)
+ ENDIF(NOT UNIX)
ENDIF(BUILD_SHARED_LIBS)
ENDIF(WIN32)