summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt23
-rw-r--r--ChangeLog.manual575
-rw-r--r--Docs/CMakeLists.txt5
-rw-r--r--Docs/bash-completion/CMakeLists.txt2
-rw-r--r--Docs/bash-completion/cmake8
-rw-r--r--Docs/bash-completion/cpack6
-rw-r--r--Docs/bash-completion/ctest2
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake3
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake6
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake39
-rw-r--r--Modules/CheckCCompilerFlag.cmake3
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake3
-rw-r--r--Modules/Compiler/Clang.cmake1
-rw-r--r--Modules/FindCUDA.cmake17
-rw-r--r--Modules/FindHDF5.cmake38
-rw-r--r--Modules/FindImageMagick.cmake6
-rw-r--r--Modules/FindLua.cmake153
-rw-r--r--Modules/FindPNG.cmake14
-rw-r--r--Modules/FindTCL.cmake2
-rw-r--r--Modules/FortranCInterface/Detect.cmake2
-rw-r--r--Modules/Platform/Darwin.cmake25
-rw-r--r--Modules/Platform/QNX.cmake3
-rw-r--r--Modules/Platform/Windows-MSVC.cmake18
-rw-r--r--Source/CMakeLists.txt12
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/cmCPackDocumentVariables.cxx2
-rw-r--r--Source/CTest/cmParseGTMCoverage.cxx4
-rw-r--r--Source/CursesDialog/CMakeLists.txt2
-rw-r--r--Source/cmConfigure.cmake.h.in2
-rw-r--r--Source/cmDocumentGeneratorExpressions.h3
-rw-r--r--Source/cmDocumentVariables.cxx114
-rw-r--r--Source/cmDocumentation.cxx4
-rw-r--r--Source/cmExportInstallFileGenerator.cxx2
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx4
-rw-r--r--Source/cmGeneratorExpression.cxx25
-rw-r--r--Source/cmGeneratorExpression.h2
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx40
-rw-r--r--Source/cmGeneratorExpressionParser.cxx20
-rw-r--r--Source/cmGeneratorTarget.cxx6
-rw-r--r--Source/cmGlobalGenerator.cxx12
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h3
-rw-r--r--Source/cmGlobalVisualStudio12Generator.h5
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx23
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h2
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx88
-rw-r--r--Source/cmListFileCache.cxx2
-rw-r--r--Source/cmLocalGenerator.cxx14
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx18
-rw-r--r--Source/cmMakefile.cxx58
-rw-r--r--Source/cmMakefileTargetGenerator.cxx10
-rw-r--r--Source/cmPolicies.cxx70
-rw-r--r--Source/cmQtAutomoc.cxx46
-rw-r--r--Source/cmTarget.cxx29
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx32
-rw-r--r--Source/cmake.cxx10
-rw-r--r--Tests/Architecture/CMakeLists.txt4
-rw-r--r--Tests/BuildDepends/CMakeLists.txt2
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt4
-rw-r--r--Tests/CMakeOnly/AllFindModules/CMakeLists.txt11
-rw-r--r--Tests/CMakeTests/CMakeLists.txt9
-rw-r--r--Tests/CMakeTests/PolicyCheckTest.cmake.in154
-rw-r--r--Tests/Contracts/Trilinos/CMakeLists.txt (renamed from Tests/Contracts/Trilinos-10-6/CMakeLists.txt)6
-rw-r--r--Tests/Contracts/Trilinos/Dashboard.cmake.in (renamed from Tests/Contracts/Trilinos-10-6/Dashboard.cmake.in)4
-rw-r--r--Tests/Contracts/Trilinos/EnvScript.cmake (renamed from Tests/Contracts/Trilinos-10-6/EnvScript.cmake)0
-rw-r--r--Tests/Contracts/Trilinos/Patch.cmake (renamed from Tests/Contracts/Trilinos-10-6/Patch.cmake)0
-rw-r--r--Tests/Contracts/Trilinos/RunTest.cmake (renamed from Tests/Contracts/Trilinos-10-6/RunTest.cmake)2
-rw-r--r--Tests/Contracts/Trilinos/ValidateBuild.cmake.in (renamed from Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in)6
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt35
-rw-r--r--Tests/ExportImport/Export/testSharedLibRequiredUser.cpp10
-rw-r--r--Tests/ExportImport/Export/testSharedLibRequiredUser.h12
-rw-r--r--Tests/ExportImport/Export/testSharedLibRequiredUser2.cpp8
-rw-r--r--Tests/ExportImport/Export/testSharedLibRequiredUser2.h14
-rw-r--r--Tests/ExportImport/Import/try_compile/CMakeLists.txt27
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt7
-rw-r--r--Tests/GeneratorExpression/check-part3.cmake10
-rw-r--r--Tests/IncludeDirectories/CMP0021/CMakeLists.txt14
-rw-r--r--Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h2
-rw-r--r--Tests/IncludeDirectories/CMP0021/main.cpp11
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt4
-rw-r--r--Tests/MakeClean/ToClean/CMakeLists.txt12
-rw-r--r--Tests/QtAutomoc/CMakeLists.txt2
-rw-r--r--Tests/QtAutomoc/gadget.cpp4
-rw-r--r--Tests/QtAutomoc/gadget.h18
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake2
-rw-r--r--Tests/RunCMake/CMP0004/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0019/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt9
-rw-r--r--Tests/RunCMake/CTest/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompatibleInterface/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompilerChange/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Configure/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Configure/FailCopyFileABI-check.cmake3
-rw-r--r--Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExternalData/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FPHSA/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/File_Generate/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorExpression/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/IncompatibleQt/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Languages/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ObjectLibrary/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/PositionIndependentCode/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace-stdout.txt2
-rw-r--r--Tests/RunCMake/Syntax/ParenNoSpace.cmake2
-rw-r--r--Tests/RunCMake/Syntax/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/TargetPolicies/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_dependencies/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/alias_targets/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/build_command/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_package/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/get_filename_component/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/if/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_directories/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_external_msproject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/list/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/target_link_libraries/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/try_compile/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/variable_watch/CMakeLists.txt2
-rw-r--r--Utilities/CMakeLists.txt5
-rw-r--r--Utilities/cmcompress/CMakeLists.txt2
-rw-r--r--Utilities/cmcurl/CMakeLists.txt4
-rw-r--r--Utilities/cmexpat/CMakeLists.txt2
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt2
-rw-r--r--Utilities/cmzlib/CMakeLists.txt2
-rwxr-xr-xbootstrap25
133 files changed, 1749 insertions, 406 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75d372d..1fbbe08 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,7 +231,7 @@ macro (CMAKE_BUILD_UTILITIES)
set(KWSYS_USE_Process 1)
set(KWSYS_USE_CommandLineArguments 1)
set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
- set(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
+ set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}")
add_subdirectory(Source/kwsys)
set(kwsys_folder "Utilities/KWSys")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
@@ -460,26 +460,27 @@ set(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
# install tree.
set(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
-set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
+set(CMAKE_DATA_DIR "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for data (relative to prefix).")
-set(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
+set(CMAKE_DOC_DIR "doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for documentation (relative to prefix).")
-set(CMAKE_MAN_DIR "/man" CACHE STRING
+set(CMAKE_MAN_DIR "man" CACHE STRING
"Install location for man pages (relative to prefix).")
mark_as_advanced(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR)
if(CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Force doc, data and man dirs to conform to cygwin layout.
- set(CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}")
- set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}")
- set(CMAKE_MAN_DIR "/share/man")
+ set(CMAKE_DOC_DIR "share/doc/cmake-${CMake_VERSION}")
+ set(CMAKE_DATA_DIR "share/cmake-${CMake_VERSION}")
+ set(CMAKE_MAN_DIR "share/man")
# let the user know we just forced these values
message(STATUS "Setup for Cygwin packaging")
message(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}")
message(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}")
message(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}")
endif()
-string(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}")
-string(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}")
+string(REGEX REPLACE "^/" "" CMAKE_DATA_DIR "${CMAKE_DATA_DIR}")
+string(REGEX REPLACE "^/" "" CMAKE_DOC_DIR "${CMAKE_DOC_DIR}")
+string(REGEX REPLACE "^/" "" CMAKE_MAN_DIR "${CMAKE_MAN_DIR}")
if(BUILD_TESTING)
include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
@@ -625,12 +626,12 @@ add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
--system-information -G "${CMAKE_TEST_GENERATOR}" )
# Install license file as it requires.
-install(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST})
+install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR})
# Install script directories.
install(
DIRECTORY Modules Templates
- DESTINATION "${CMake_DATA_DEST}"
+ DESTINATION ${CMAKE_DATA_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 134b4aa..0e84fb6 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,578 @@
+Changes in CMake 2.8.12 (since 2.8.12-rc4)
+------------------------------------------
+Brad King (4):
+ Xcode: Fix test architecture selection for Xcode >= 5
+ Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure
+ Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
+ Xcode: Fix OBJECT library support for Xcode 5 (#14254)
+
+Stephen Kelly (1):
+ Genex: Fix processing multiple include directories for relative paths
+
+Changes in CMake 2.8.12-rc4 (since 2.8.12-rc3)
+----------------------------------------------
+Brad King (8):
+ VS: Future-proof Intel project format selection
+ MSVC: Drop /link from executable link lines with Ninja
+ FindCUDA: Always list custom command outputs in their targets
+ FindPNG: Honor old PNG_LIBRARY if provided (#14398)
+ FindHDF5: Fix regression in per-configuration library selection
+ bash-completion: Future-proof --help-*-list "cXXXX version" filtering
+ OS X: Search system SDKs for frameworks
+ Use first custom command for the same output (#14446)
+
+Patrick Gansterer (3):
+ MSVC: Fix version test for linking corelibc on Windows CE (#14420)
+ MSVC: Fix WinCE arch family preprocessor symbol (#14436)
+ VS: Use version-specific subsystem for WinCE compiler id (#14440)
+
+Rolf Eike Beer (1):
+ bootstrap: try better workaround for builds on Linux/HPPA
+
+Stephen Kelly (3):
+ Add differing target property content to policy CMP0022 warning
+ Fix CMP0022 warning when no old-style property is set
+ genex: Fix preprocessing with incomplete content (#14410).
+
+Changes in CMake 2.8.12-rc3 (since 2.8.12-rc2)
+----------------------------------------------
+Robert Maynard (1):
+ cmMakefile: Do not track CMake temporary files.
+
+Changes in CMake 2.8.12-rc2 (since 2.8.12-rc1)
+----------------------------------------------
+Brad King (2):
+ Fix RunCMake.Configure test expectation newline matching
+ Clean up install rules of CMake itself (#14371)
+
+Clinton Stimpson (1):
+ OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
+
+Eric Bélanger (1):
+ FindImageMagick: Find libraries named with HDRI support (#14348)
+
+Raphael Kubo da Costa (1):
+ FindTCL: Add BSD paths for Tcl/Tk 8.6
+
+Robert Maynard (2):
+ VS: Generate ToolsVersion matching each VS version
+ cmMakefile: Do not track configured files known to be temporary
+
+Rolf Eike Beer (1):
+ CheckC*CompilerFlag: add documentation what to expect from a positive result
+
+Stephen Kelly (6):
+ Fix OLD behavior of CMP0021.
+ try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES
+ try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES
+ Genex: Fix evaluation of MAP_IMPORTED_CONFIG_<CONFIG>
+ Fix some whitespace errors in docs.
+ Normalize system directories from the interface target property
+
+Yury G. Kudryashov (1):
+ CPack: Fix a typo in documentation
+
+Zack Galbreath (1):
+ CTest: Fix GTM coverage parsing line offset bug
+
+Changes in CMake 2.8.12-rc1 (since 2.8.11.2)
+--------------------------------------------
+Adam J. Weigold (1):
+ CPackWIX: Add support for custom WiX templates
+
+Alex Neundorf (12):
+ CMakeSystem: include toolchain file after setting CMAKE_HOST_ (#13796)
+ Add support files for C, C++ and ASM for the IAR toolchain.
+ Add regexps for the IAR toolchain to the vendor list.
+ Add IAR to the CMakeDetectC(XX)CompilerID.c(pp).in
+ cmake-gui: use shortcut F only for "Find in Output"
+ Eclipse: fix #14204 and #14205: no file links to directories
+ automoc: add a global AUTOMOC_TARGETS_FOLDER property
+ install: do not strip dll import libraries (#14123)
+ ExportTargets: add one more comment to the generated file.
+ Add documentation for the --graphviz support
+ graphvizoptions: add copyright notice
+ add macros cmake_print_properties() and cmake_print_variables()
+
+Alexander Mohr (1):
+ VS: Detect MSVC compiler id on ARM toolchain
+
+Andreas Mohr (10):
+ Fix spelling and typos (affecting users)
+ Fix spelling and typos (affecting binary data / module messages)
+ Fix spelling and typos (non-binary)
+ Fix spelling and typos (product names)
+ FindwxWidgets: add DOC strings with usual style
+ Explain distribution of Win9x binary on all Windows versions.
+ VS10: add detailed comment about MIDL processing
+ Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES)
+ Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames
+ Docs: Clarify wording "flag used" => "flag (to|will) be used"
+
+Ben Boeckel (12):
+ set_property: Do not remove a property when APPENDing nothing
+ Tests/RunCMake: Document stripping of expected output
+ export: Error when exporting a target without a language
+ variable_watch: Store client data as pointers
+ variable_watch: Add a deleter for the client data
+ variable_watch: Match client_data when finding duplicates
+ variable_watch: Allow specifying the data to match in RemoveWatch
+ variable_watch: Prevent making extra entries in the watch map
+ variable_watch: Fix a typo in the error message
+ variable_watch: Don't share memory for callbacks
+ variable_watch: Check newValue for NULL
+ variable_watch: Add test for watching a variable multiple times
+
+Bill Hoffman (1):
+ Do not set CMAKE_MATCH_ variables when not neeeded
+
+Bjoern Thiel (1):
+ SelectLibraryConfigurations: Fix for cached <base>_LIBRARY
+
+Brad King (91):
+ VS: Separate compiler and linker PDB files (#11899, #14062)
+ MSVC: Invoke 'link' directly for executables
+ Ninja: Fix OBJECT_DIR placeholder path conversion
+ VS 10: Escape ; as %3B in preprocessor definitions (#14073)
+ CTest: Simplify ctest_* command source/build dir lookup
+ get_filename_component: Add explicit unit tests
+ get_filename_component: Add DIRECTORY option (#14091)
+ Xcode: Use explicitFileType to mark source types (#14093)
+ Check{C,CXX}CompilerFlag: Test using C locale (#14102)
+ Windows: Search '/' prefix only when cross compiling (#10994)
+ Recognize ld with toolchain prefix (#13960)
+ VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
+ Begin post-2.8.11 development
+ Sanitize linker name to parse implicit link line (#14154)
+ VS: Allow /Fa to set AssemblerListingLocation (#14153)
+ Tests/IncludeDirectories: Avoid shared library with no symbols
+ if: Add test for IS_DIRECTORY
+ try_compile: Add test for bad call error cases
+ try_compile: Refactor argument processing
+ variable_watch: Add test for MODIFIED_ACCESS report
+ bootstrap: Compile KWSys SystemTools with UTIME(S|NSAT) values
+ variable_watch: Remove leftover debugging code (#14187)
+ variable_watch: Print accesses as "CMake Debug Log" messages
+ Docs: Clarify CMAKE_PARENT_LIST_FILE (#14194)
+ get_filename_component: Test ABSOLUTE of .. after root component
+ try_compile: Add signature to allow multiple SOURCES
+ enable_language: Clarify documentation
+ Split cmBootstrapCommands.cxx into two sources
+ Document CMAKE_INSTALL_PREFIX in CMAKE_SYSTEM_PREFIX_PATH
+ cmake: Document "-E tar" support for .zip (#14225)
+ FindBoost: Clarify failure on missing 'static' libs (#14235)
+ CMakeDetermineVSServicePack: Improve documentation
+ CMakeDetermineVSServicePack: Add VS 11 update 1 and 2 (#14239)
+ Document ENV syntax as a "variable" (#14245)
+ Embarcadero: Use response files only for includes, objects, and libs
+ Escape target flags taken from COMPILE_OPTIONS
+ Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handling
+ CMakeDetermineVSServicePack: Add VS 11 update 3
+ Document removal of 'register' from flex/bison output
+ VS12: Find proper MSBuild for VSProjectInSubdir test
+ Fortran: Use explicit type in Fortran 90 check
+ project: Document top-level CMakeLists.txt requirement
+ ExternalProject: Document multiple COMMAND lines
+ include: Clarify variable access scope for included file
+ VS: Fix /MAP:mapfile flag mapping (#14282)
+ cmake: On configure error suggest looking at CMake*.log files
+ try_compile: Escape CMAKE_<lang>_FLAGS in test projects (#14268)
+ try_compile: Add COPY_FILE_ERROR option to capture failure
+ FindPNG: Add versioned library names for 1.6 (#14289)
+ cmake: Fix resource leak reported by cppcheck
+ VS,Xcode: Drop incorrect legacy dependency trace (#14291)
+ OS X: Add copyright notices to Darwin-*-Fortran.cmake
+ VS: Avoid leaking child process output back to IDE (#14266)
+ Fix ExportImport test cmp0022NEW build on Watcom
+ add_test: Document test name restrictions (#14298)
+ UseJava: Update notice of copyright by Kitware
+ add_custom_command: Manage backtrace memory correctly (#14299)
+ Teach compiler ABI check to tolerate try_compile COPY_FILE failure
+ Test COMPILE_DEFINITIONS target property get/set/get round-trip
+ Check*CompilerFlag: Document use of CMAKE_REQUIRED_DEFINITIONS (#14309)
+ sha2: Avoid type-punned pointer dereference (#14314)
+ VS 6: Tell BuildDepends test to tolerate ninjadep failure
+ cmMakefile: Do not track configured files known to be temporary
+ libarchive: Update README-CMake.txt for new snapshot
+ libarchive: Include cm_zlib.h to get zlib used by CMake
+ libarchive: Silence API deprecation warnings
+ libarchive: Avoid struct init with variable
+ libarchive: Remove build options not used by CMake
+ libarchive: Backport to CMake 2.8.2
+ VS10: Honor user-specified /SUBSYSTEM: flag (#14326)
+ VS10: Escape include paths in XML project files (#14331)
+ OS X: Search for SDK based on deployment target (#14324)
+ bootstrap: Do not suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot (#14324)
+ OS X: Enable command-line build without tools in PATH
+ VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput
+ cmake-gui: Fix build rules for Qt5 on Windows
+ Include cmMakefile.h before cm*Lexer.h to get stdint.h first
+ Skip CTestLimitDashJ test on Borland
+ Add RunCMake.Syntax test to cover argument parsing
+ cmListFileLexer: Fix line number after backslash in string
+ cmListFileLexer: Split normal and legacy unquoted arguments
+ cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
+ Add RunCMake.Syntax test cases for command invocation styles
+ cmListFileCache: Convert CMake language parser to class
+ Warn about arguments not separated by whitespace
+ Warn about unquoted arguments that look like long brackets
+ cmListFileLexer: Modify flex output to avoid Borland warning
+ Cygwin: Avoid legacy warnings in RunCMake.* tests
+ Update version introducing CMP0021, CMP0022, and CMP0023
+ OS X: Do not default to non-existent deployment target SDK
+ Do not warn about left paren not separated by a space
+
+Christian Maaser (1):
+ VS: Add support for .NET target framework version
+
+Clinton Stimpson (12):
+ Improve documentation for CPACK_PACKAGE_INSTALL_REGISTRY_KEY.
+ Refactor how bundles and frameworks are supported.
+ Xcode: Add support for shared library versioning
+ OS X: Fix getting of CFBundle LOCATION property.
+ OS X: Add RPATH support for Mac.
+ Xcode: Add rpath support in Xcode generator.
+ OS X: Add support for @rpath in export files.
+ OS X: Add test for rpaths on Mac.
+ OS X: Improvements for getting install name of dylib.
+ OS X: Enable rpath support on Mac OS X when find_library() is used.
+ OS X: Fix regression handling frameworks for Ninja
+ OS X: If necessary, use xcrun to help find otool used to query install names.
+
+Cédric OCHS (1):
+ Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
+
+Daniele E. Domenichelli (15):
+ FindGTK2: Move check for pangocairo in gtk module
+ FindGTK2: Detect gthread library
+ FindFreetype: Detect Freetype installed by GtkMM installer for win
+ FindGTK2: Do not fail on MSVC11 if vc100 libraries are available
+ FindGTK2: Add GTK2_DEFINITIONS variable
+ SelectLibraryConfigurations: Do not cache the _LIBRARY variable
+ SelectLibraryConfigurations: Use -NOTFOUND instead of copying the vars
+ FindGTK2: Use GTK_XXX_LIBRARY_DEBUG libraries in debug mode
+ FindGTK2: Append _LIBRARY to var name in _GTK2_FIND_LIBRARY
+ FindGTK2: Append _INCLUDE_DIR to var name in _GTK2_FIND_INCLUDE_DIR
+ FindGTK2: Update local changelog
+ FindGTK2: Remove GTK2_SKIP_MARK_AS_ADVANCED option
+ FindGTK2: gthread-2.0 folder does not exist
+ FindGTK2: Detect gmodule library
+ FindGTK2: Detect pangoft2 and pangoxft libraries
+
+David Coppa (1):
+ OpenBSD: Enable ELF parsing and editing (#14241)
+
+David Golub (1):
+ CPack/NSIS: Obtain path from which to uninstall from registry (#14124)
+
+Eric NOULARD (5):
+ Add support for componentized USER spec file
+ CPackRPM add mechanism to remove path from generated list of file in RPM spec.
+ CPackRPM add /usr/lib64 to the list of builtin to-be-excluded path
+ CPackRPM protect '@' character in filename processed in the spec file.
+ CPackRPM make the changelog line conform to expected format
+
+Fredrik Axelsson (1):
+ CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967)
+
+Funda Wang (1):
+ FindImageMagick: Find v6 include dir (#14174)
+
+Graham Markall (2):
+ OS X: Add Fortran library version flags (#14249)
+ UseJava: Pass sources to javac using response file (#13028)
+
+Gregoire Lejeune (1):
+ Allow using Java in a cross-compilation toolchain
+
+Ian Monroe (2):
+ Ninja: use cd /D to set directory on Windows
+ CPackWIX: Fix MSI package layout regression from parent
+
+Igor Murzov (2):
+ bash-completion: Add -S,-SP options arguments completion
+ bash-completion: Fix/improve generator names extraction
+
+Jack O'Connor (1):
+ Eclipse: Add a missing space in the documentation
+
+Jason Spiro (1):
+ MinGW: Find mingw32-make included with Code::Blocks IDE (#14302)
+
+John Farrier (2):
+ VS: Add Windows Forms Support
+ VS: Add VS_GLOBAL_ROOTNAMESPACE target property
+
+Jonas Andersen (1):
+ VS: Add Resx configuration to the vcxproj file
+
+LibArchive Upstream (1):
+ libarchive 3.1.2 (reduced)
+
+Marc Bartholomaeus (4):
+ cmake-gui: Add search functions for Output window (#9733)
+ cmake-gui: Add search functions to the context menu of the Output widget
+ cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E
+ cmake-gui: Add function for going to next error message in Output window
+
+Marcel Loose (1):
+ FindCUDA: Remove duplicate entries from INCLUDE_DIRECTORIES.
+
+Marius Schamschula (1):
+ FindX11: Search in /opt/X11 for OS X 10.8 (#14232)
+
+Mathias Gaunard (1):
+ FindCUDA: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.
+
+Matt McCormick (1):
+ ExternalProject: Allow blank SVN_USERNAME/SVN_PASSWORD (#14128)
+
+Matthew Bentham (1):
+ Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
+
+Matthew Woehlke (3):
+ UseJava.cmake: fully use cmake_parse_arguments in add_jar
+ FindProtobuf: also find pthread
+ UseJava.cmake: document add_jar compat shim
+
+Nicolas Despres (1):
+ Optimize custom command full-path dependency lookup
+
+Nils Gladitz (1):
+ Add cmake_host_system_information command
+
+Patrick Gansterer (20):
+ Add option to use stdout/stderr of original terminal in cmake --build
+ Unify the way the flags of a static library are read
+ Add support for CMAKE_STATIC_LINKER_FLAGS
+ Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
+ Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
+ Add additonal tests for the linker flags
+ VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
+ VS6: Hardcode id_machine_6 for compiler detection
+ VS10: Do not set the TargetMachine when detecting the compiler
+ VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
+ VS: Replace ArchitectureId with PlatformName
+ VS12: Remove duplicated overload of UseFolderProperty()
+ Fix detection of WinCE SDKs with 64bit verion of CMake
+ VS: Unify how the name of the generator is specified
+ VS10: Add support for assembler code (#11536)
+ WIN: Use COFF file header header for architecture detection (#14083)
+ Improve const-correctness in cmVisualStudioGeneratorOptions
+ Fix setting of the entry point symbol for Windows CE (#14088)
+ Add support for new Windows CE compiler
+ VS11: Add support for Windows CE SDKs
+
+Paul Kunysch (1):
+ CTest: Add test for running many tests in parallel
+
+Pavel Shramov (1):
+ cmDependsC: Collapse relative include paths
+
+Petr Kmoch (5):
+ Add projectDir parameter to GenerateBuildCommand
+ VS: Create parser for Visual Studio .sln files
+ VS: Use .sln parser to build targets in subdirs with msbuild (#13623)
+ VS: Add test for building MSBuild project in subdir
+ ctest_build: Pass projectDir to GenerateBuildCommand
+
+Reid Kleckner (1):
+ Ninja: Make cmcldeps depfile output more consistent with 'ninja -t msvc'
+
+Richard Ulrich (3):
+ CPackWIX: Handle multiple shortcuts in the start menu
+ CPackWIX: Add option to specify the language(s) of the installer
+ CMakeCPack: Provide an upgrade guid for WiX
+
+Robert Maynard (9):
+ cmMakefile: Refactor AddCMakeDependFile and AddCMakeOutputFile.
+ Ninja: Track configured files so we can regenerate them.
+ cmMakefile: Track configured files so we can regenerate them (#13582)
+ Add a test to expose a bug with add_custom_command and ninja.
+ Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static
+ Ninja: Custom Command file depends don't need to exist before building
+ FindCUDA: Search for libraries in <prefix>/lib/<arch>/nvidida-current.
+ Ninja: Properly convert all paths to unix style before we do set intersection.
+ Ninja: Update BuildDepends test to verify cmcldeps depfiles.
+
+Robin Lee (1):
+ FindOpenSSL: Fix spelling of CMAKE_CROSSCOMPILING (#14075)
+
+Rolf Eike Beer (25):
+ FindOpenGL: simplify OS selection code
+ FindOpenGL: require headers to be found on non-Windows platforms (#13746)
+ Tests: create output files for all memory checkers
+ CTest: use an output file for Valgrind (#14110)
+ CTest: remove unreachable code and CTestTestMemcheckUnknown test
+ Tests: remove code duplication in CTestTestMemCheck tests
+ Tests: verify that memory checker output files are always present
+ CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
+ Tests: add test for non-existent Valgrind suppression file
+ CTest: fix comment documenting cmBoundsCheckerParser class
+ Tests: add a test with custom options passed to valgrind
+ CTest: make sure never to report negative test times (#14132)
+ Doc: fix example for FAIL_REGULAR_EXPRESSION
+ CTest: break after first regex match on output
+ Tests: ignore Guard Malloc messages in MemChecker tests
+ CTest: avoid useless changing of directory
+ Tests: fix build of dummy memtester on AIX
+ wizard: fix warnings
+ wizard: simplify control flow
+ cmTarget: drop the unused local typedef LinkLine
+ Tests: ignore GuardMalloc messages on all Apple build, not just XCode ones
+ replace string(... MATCHES "^const$) with string(... STREQUAL "const")
+ Revert "CTest: fix pre and post test commands with spaces" (#13887)
+ FindPNG: improve library detection (#14301)
+ CTest: create one output file per memcheck (#14303)
+
+Sean McBride (1):
+ Remove some uses of obsolete 'register' storage specifier
+
+Sebastian Leske (1):
+ Document CMAKE_<LANG>_FLAGS variable (#14305)
+
+Stephen Kelly (126):
+ Make the QtAutomoc test compile with either Qt 4 or Qt 5
+ Add a test for Qt5Automoc
+ Remove an endif() followed by an if() for the same condition.
+ Fix some copyastos in the DetermineRCCompiler file.
+ Test transitive includes from setting the LINK_LIBRARIES property.
+ Test the use of target transitive compile definitions with moc.
+ Fix handling of commas in arbitrary content in genexes.
+ Fix style.
+ Remove unused marker for a variable which is now used.
+ Extract the ProcessArbitraryContent method.
+ Rename the method determining if a genex accepts arbitrary content.
+ Make it possible for any genex to have arbitrary content at the end.
+ Add the JOIN generator expression.
+ Test that linking using the debug keyword to tll works.
+ automoc: Read target defines unconditionally
+ Remove unused typedef.
+ Fix brace indentation.
+ Add EXPORT_NAME property.
+ Remove unused vector population.
+ Sublime: Honor source-level COMPILE_FLAGS property
+ Docs: cmake -G selects a "build system" generator
+ Recognize shared library files with a numerical suffix
+ FindQt4: Fix QUIET failure with Qt 5 but not Qt 4
+ Error on relative path in INCLUDE_DIRECTORIES target property.
+ include_directories: Fix handling of empty or space-only entries
+ CTest: Read CTEST_PARALLEL_LEVEL from environment
+ string: Add MAKE_C_IDENTIFIER subcommand
+ GenerateExportHeader: Add newlines to separate the compiler output.
+ GenerateExportHeader: Allow use of of this macro with MODULEs.
+ file: Add GENERATE command to produce files at generate time
+ Tests/Module/GenerateExportHeader: Test exported free-function
+ Add $<LINK_LANGUAGE> generator expression
+ GenerateExportHeader: Generate only C identifiers as defines
+ Tests/CompileDefinitions: Avoid spaces in defines on VS 6
+ Use the qt5::moc imported target instead of a variable.
+ QtAutomoc: Get the Qt version through the target link interface
+ Fix indentation.
+ VS6: Rename some variables to correspond to config values.
+ Add cmLocalGenerator::GetCompileOptions.
+ Add <LANG>_COMPILER_ID generator expressions.
+ cmTarget: Rename struct to be more re-usable.
+ cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries
+ Add COMPILE_OPTIONS target property.
+ Add target_compile_options command.
+ Introduce target property <LANG>_VISIBILITY_PRESET
+ Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
+ Qt4Macros: Allow specifying a TARGET in invokations of macros.
+ Introduce add_compile_options command.
+ Remove unused cmAddDefinitionsCommand::ParseDefinition method.
+ Add some spaces to the INCLUDE_DIRECTORIES documentation.
+ CLI: Suppress the unused warning if the key value pair is cached.
+ Use --sysroot when cross compiling.
+ Add missing 'seen' check for evaluating COMPILE_OPTIONS.
+ Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile.
+ Use a preprocessor loop to manage the valid transitive properties.
+ Generate INTERFACE_COMPILE_OPTIONS on export.
+ Genex: Fix indentation in docs.
+ cmSystemTools: Fix typo in comment.
+ Style: Don't put an else after a return.
+ Add compiler target compile options.
+ QtAutomoc: Fix handling of list separator for compile definitions.
+ QtAutomoc: Use config-dependent compile definitions and includes.
+ De-duplicate version comparison code.
+ Add generator expressions for version comparision.
+ Don't run the WarnUnusedCliUnused test on Windows.
+ Add whitespace after colons in error messages.
+ Add missing return after error report.
+ Genex: Make LINK_LANGUAGE report an error when evaluating link libraries.
+ Genex: Extend EvaluatingLinkLibraries to also check the top target name.
+ Genex: Report error if a target file is needed to evaluate link libraries.
+ Add generator expressions for compiler versions.
+ Split the GeneratorExpression test into a third part.
+ Remove unused variable.
+ Add Target API to determine if an include is a system include.
+ Store system include directories in the cmTarget.
+ Extend the cmTargetPropCommandBase interface property handling.
+ Add a SYSTEM parameter to target_include_directories (#14180)
+ Add entire link interface transitive closure as target depends.
+ Test non-IMPORTED libraries in the INTERFACE of IMPORTED libraries.
+ GenexEval: Add abstracted access to link interface for a target.
+ Introduce the LINK_ONLY generator expression.
+ Introduce the INTERFACE_LINK_LIBRARIES property.
+ Export: Generate INTERFACE_LINK_LIBRARIES property on targets.
+ TLL: Don't populate old link interface if CMP0022 is NEW.
+ Overload cmLocalGenerator::AppendDefines to add a list.
+ Add an overload of cmIDEOptions::AddDefines taking a vector of strings.
+ Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.
+ Document some variables for deprecation control.
+ Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY
+ Revert "Use --sysroot when cross compiling."
+ Add target property debugging for COMPILE_DEFINITIONS
+ Mark qt4_use_modules and qt4_automoc as obsolete.
+ Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
+ Don't add trailing whitespace to error message.
+ Remove TODO to uniq COMPILE_OPTIONS
+ Remove the LINK_LANGUAGE generator expression.
+ Genex: Fix $<CONFIG> with IMPORTED targets and multiple locations.
+ FindQt4: Don't use Qt component _FOUND vars before they're defined (#14286)
+ Add a convenient way to add the includes install dir to the INTERFACE.
+ Use linked frameworks as a source of include directories.
+ target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature
+ FindQt4: Re-add QAxServer to the QT_MODULES.
+ FindQt4: Populate the INTERFACE_LINK_LIBRARIES of IMPORTED targets.
+ Genex: Allow relative paths in INSTALL_INTERFACE.
+ cmTarget: Fix property name typo in docs.
+ Docs: Document file(GENERATE) CONDITION as optional.
+ Qt4Macros: Remove unneeded generate CONDITION.
+ Qt4Macros: Remove undefined varible use.
+ Qt4Macros: Simplify some variable population.
+ Docs: Document existing target property debugging options.
+ Docs: Trim trailing whitespace in generated doc.
+ Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs.
+ Docs: Document variables for default visibility values.
+ Export: Fix typo of LINK_INTERFACE_LIBRARIES.
+ cmTarget: Remove duplicates when printing traces of tll signatures
+ cmTarget: Fix iface libraries and languages for static libraries.
+ Genex: Disallow LINKER_LANGUAGE only when used on a static library.
+ install: Remove error condition using INCLUDES DESTINATION without EXPORT.
+ Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.
+ Allow target commands to be invoked with no items (#14325).
+ Docs: Fix typo in CMAKE_DEBUG_TARGET_PROPERTIES
+ cmTarget: Add NAME property
+ Export: Process generator expressions from INCLUDES DESTINATION.
+ Add the ALIAS target concept for libraries and executables.
+ Revert "Add compiler target compile options."
+ Genex: Fix segfault when parsing ends with parameter expectation.
+
+Vadim Zhukov (1):
+ Add cmake_reset_check_state() macro
+
+Victor Zverovich (1):
+ Use GmakeErrorParser instead of deprecated MakeErrorParser (fixes bug 0013699)
+
+Yichao Yu (1):
+ variable_watch: Add missing string enumeration entry (#14188)
+
+Ömer Fadıl USTA (3):
+ ccmake: Add missing initializers reported by cppcheck
+ libarchive: Fix free() order to avoid accessing freed memory
+ cmcurl: Fix resource leak reported by cppcheck
+
Changes in CMake 2.8.11.2 (since 2.8.11.1)
------------------------------------------
Alex Neundorf (1):
diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt
index a5e91c9..34090d2 100644
--- a/Docs/CMakeLists.txt
+++ b/Docs/CMakeLists.txt
@@ -1,4 +1,3 @@
-string(REGEX REPLACE "^/(.*)" "\\1" REL_CMAKE_DATA_DIR "${CMAKE_DATA_DIR}")
-install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${REL_CMAKE_DATA_DIR}/editors/vim)
-install(FILES cmake-mode.el DESTINATION ${REL_CMAKE_DATA_DIR}/editors/emacs)
+install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${CMAKE_DATA_DIR}/editors/vim)
+install(FILES cmake-mode.el DESTINATION ${CMAKE_DATA_DIR}/editors/emacs)
add_subdirectory (bash-completion)
diff --git a/Docs/bash-completion/CMakeLists.txt b/Docs/bash-completion/CMakeLists.txt
index 592b71e..c0a8899 100644
--- a/Docs/bash-completion/CMakeLists.txt
+++ b/Docs/bash-completion/CMakeLists.txt
@@ -5,4 +5,4 @@
# add symlinks to the files in appropriate places
# /etc/bash_completion.d/
# DATADIR/completions (may be /usr/share/<package>/completions
-install(FILES cmake cpack ctest DESTINATION ${REL_CMAKE_DATA_DIR}/completions)
+install(FILES cmake cpack ctest DESTINATION ${CMAKE_DATA_DIR}/completions)
diff --git a/Docs/bash-completion/cmake b/Docs/bash-completion/cmake
index 5f33c09..59e0298 100644
--- a/Docs/bash-completion/cmake
+++ b/Docs/bash-completion/cmake
@@ -111,12 +111,12 @@ _cmake()
;;
--help-command)
COMPREPLY=( $( compgen -W '$( cmake --help-command-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-module)
COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-policy)
@@ -126,12 +126,12 @@ _cmake()
;;
--help-property)
COMPREPLY=( $( compgen -W '$( cmake --help-property-list \
- 2>/dev/null | tail -n +2 )' -- "$cur" ) )
+ 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( cmake --help-variable-list \
- 2>/dev/null | tail -n +2 )' -- "$cur" ) )
+ 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
return
;;
esac
diff --git a/Docs/bash-completion/cpack b/Docs/bash-completion/cpack
index 51638c5..9ab6048 100644
--- a/Docs/bash-completion/cpack
+++ b/Docs/bash-completion/cpack
@@ -20,7 +20,7 @@ _cpack()
-D)
[[ $cur == *=* ]] && return # no completion for values
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
- 2>/dev/null | tail -n +2 )' -S = -- "$cur" ) )
+ 2>/dev/null | grep -v "^cpack version " )' -S = -- "$cur" ) )
compopt -o nospace
return
;;
@@ -38,12 +38,12 @@ _cpack()
;;
--help-command)
COMPREPLY=( $( compgen -W '$( cpack --help-command-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^cpack version " )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
- 2>/dev/null | tail -n +2 )' -- "$cur" ) )
+ 2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) )
return
;;
esac
diff --git a/Docs/bash-completion/ctest b/Docs/bash-completion/ctest
index 7433d3d..25cb998 100644
--- a/Docs/bash-completion/ctest
+++ b/Docs/bash-completion/ctest
@@ -63,7 +63,7 @@ _ctest()
;;
--help-command)
COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^ctest version " )' -- "$cur" ) )
return
;;
esac
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index e9ae995..5d35ce3 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -28,9 +28,6 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
if(DEFINED CMAKE_${lang}_VERBOSE_FLAG)
set(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
endif()
- if(CMAKE_${lang}_COMPILER_TARGET)
- set(CMAKE_FLAGS "${CMAKE_FLAGS} -DCMAKE_${lang}_COMPILER_TARGET=${CMAKE_${lang}_COMPILER_TARGET}")
- endif()
try_compile(CMAKE_${lang}_ABI_COMPILED
${CMAKE_BINARY_DIR} ${src}
CMAKE_FLAGS "${CMAKE_FLAGS}"
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index ebd9ce0..8ca5334 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -133,7 +133,11 @@ Id flags: ${testflags}
endif()
if(CMAKE_VS_WINCE_VERSION)
set(id_entrypoint "mainACRTStartup")
- set(id_subsystem 9)
+ if("${vs_version}" VERSION_LESS 9)
+ set(id_subsystem 9)
+ else()
+ set(id_subsystem 8)
+ endif()
else()
set(id_subsystem 1)
endif()
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index d042d5e..3c56b7f 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -3,7 +3,8 @@
# CONFIGURE_PACKAGE_CONFIG_FILE(<input> <output> INSTALL_DESTINATION <path>
# [PATH_VARS <var1> <var2> ... <varN>]
# [NO_SET_AND_CHECK_MACRO]
-# [NO_CHECK_REQUIRED_COMPONENTS_MACRO])
+# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]
+# [NO_FIND_DEPENDENCY_MACRO])
#
# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain
# configure_file() command when creating the <Name>Config.cmake or <Name>-config.cmake
@@ -154,7 +155,7 @@ endmacro()
function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
- set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+ set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO NO_FIND_DEPENDENCY_MACRO)
set(oneValueArgs INSTALL_DESTINATION )
set(multiValueArgs PATH_VARS )
@@ -240,6 +241,40 @@ endmacro()
")
endif()
+ if(NOT CCF_NO_FIND_DEPENDENCY_MACRO)
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+macro(find_dependency dep)
+ if (NOT \${dep}_FOUND)
+ if (\${ARGV1})
+ set(version \${ARGV1})
+ endif()
+ set(exact_arg)
+ if(\${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT)
+ set(exact_arg EXACT)
+ endif()
+ set(quiet_arg)
+ if(\${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
+ set(quiet_arg QUIET)
+ endif()
+ set(required_arg)
+ if(\${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
+ set(required_arg REQUIRED)
+ endif()
+
+ find_package(\${dep} \${version} \${exact_arg} \${quiet_arg} \${required_arg})
+ if (NOT \${dep}_FOUND)
+ set(\${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE \"\${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency \${dep} could not be found.\")
+ set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
+ return()
+ endif()
+ set(required_arg)
+ set(quiet_arg)
+ set(exact_arg)
+ endif()
+endmacro()
+")
+ endif()
+
set(PACKAGE_INIT "${PACKAGE_INIT}
####################################################################################")
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 2213acc..bc15e9a 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -6,6 +6,9 @@
# sets CMAKE_REQUIRED_DEFINITIONS to <flag>.
# See help for CheckCSourceCompiles for a listing of variables
# that can otherwise modify the build.
+# The result only tells that the compiler does not give an error message when
+# it encounters the flag. If the flag has any effect or even a specific one is
+# beyond the scope of this module.
#=============================================================================
# Copyright 2006-2011 Kitware, Inc.
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index 5e8db03..eee3a70 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -6,6 +6,9 @@
# sets CMAKE_REQUIRED_DEFINITIONS to <flag>.
# See help for CheckCXXSourceCompiles for a listing of variables
# that can otherwise modify the build.
+# The result only tells that the compiler does not give an error message when
+# it encounters the flag. If the flag has any effect or even a specific one is
+# beyond the scope of this module.
#=============================================================================
# Copyright 2006-2010 Kitware, Inc.
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index 66b00bd..ec4562a 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -25,5 +25,4 @@ macro(__compiler_clang lang)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
- set(CMAKE_${lang}_COMPILE_OPTION_TARGET "-target ")
endmacro()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 0390ae4..8270ad4 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -1292,22 +1292,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Make sure the build system knows the file is generated.
set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
- # Don't add the object file to the list of generated files if we are using
- # visual studio and we are attaching the build rule to the cuda file. VS
- # will add our object file to the linker automatically for us.
- set(cuda_add_generated_file TRUE)
-
- if(NOT compile_to_ptx AND CMAKE_GENERATOR MATCHES "Visual Studio" AND CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
- # Visual Studio 8 crashes when you close the solution when you don't add the object file.
- if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 8")
- #message("Not adding ${generated_file}")
- set(cuda_add_generated_file FALSE)
- endif()
- endif()
-
- if(cuda_add_generated_file)
- list(APPEND _cuda_wrap_generated_files ${generated_file})
- endif()
+ list(APPEND _cuda_wrap_generated_files ${generated_file})
# Add the other files that we want cmake to clean on a cleanup ##########
list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}")
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 8514164..0c246a1 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -289,27 +289,13 @@ if( NOT HDF5_FOUND )
ENV HDF5_ROOT
PATH_SUFFIXES lib Lib )
select_library_configurations( HDF5_${LIB} )
- # even though we adjusted the individual library names in
- # select_library_configurations, we still need to distinguish
- # between debug and release variants because HDF5_LIBRARIES will
- # need to specify different lists for debug and optimized builds.
- # We can't just use the HDF5_${LIB}_LIBRARY variable (which was set
- # up by the selection macro above) because it may specify debug and
- # optimized variants for a particular library, but a list of
- # libraries is allowed to specify debug and optimized only once.
- list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG
- ${HDF5_${LIB}_LIBRARY_DEBUG} )
- list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE
- ${HDF5_${LIB}_LIBRARY_RELEASE} )
+ list(APPEND HDF5_${LANGUAGE}_LIBRARIES ${HDF5_${LIB}_LIBRARY})
endforeach()
list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
# Append the libraries for this language binding to the list of all
# required libraries.
- list( APPEND HDF5_LIBRARIES_DEBUG
- ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} )
- list( APPEND HDF5_LIBRARIES_RELEASE
- ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} )
+ list(APPEND HDF5_LIBRARIES ${HDF5_${LANGUAGE}_LIBRARIES})
endforeach()
# We may have picked up some duplicates in various lists during the above
@@ -329,30 +315,10 @@ if( NOT HDF5_FOUND )
if( HDF5_INCLUDE_DIRS )
_remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS )
endif()
- if( HDF5_LIBRARIES_DEBUG )
- _remove_duplicates_from_beginning( HDF5_LIBRARIES_DEBUG )
- endif()
- if( HDF5_LIBRARIES_RELEASE )
- _remove_duplicates_from_beginning( HDF5_LIBRARIES_RELEASE )
- endif()
if( HDF5_LIBRARY_DIRS )
_remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS )
endif()
- # Construct the complete list of HDF5 libraries with debug and optimized
- # variants when the generator supports them.
- if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- set( HDF5_LIBRARIES )
- foreach( _lib ${HDF5_LIBRARIES_DEBUG} )
- list( APPEND HDF5_LIBRARIES debug ${_lib} )
- endforeach()
- foreach( _lib ${HDF5_LIBRARIES_RELEASE} )
- list( APPEND HDF5_LIBRARIES optimized ${_lib} )
- endforeach()
- else()
- set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} )
- endif()
-
# If the HDF5 include directory was found, open H5pubconf.h to determine if
# HDF5 was compiled with parallel IO support
set( HDF5_IS_PARALLEL FALSE )
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index 02a5777..7c6cce7 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -147,17 +147,17 @@ foreach(component ${ImageMagick_FIND_COMPONENTS}
)
if(component STREQUAL "Magick++")
FIND_IMAGEMAGICK_API(Magick++ Magick++.h
- Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8
+ Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 Magick++-6.Q16HDRI Magick++-Q16HDRI Magick++-6.Q8HDRI Magick++-Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
elseif(component STREQUAL "MagickWand")
FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
- Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8
+ Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 MagickWand-6.Q16HDRI MagickWand-Q16HDRI MagickWand-6.Q8HDRI MagickWand-Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
elseif(component STREQUAL "MagickCore")
FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
- Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8
+ Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 MagickCore-6.Q16HDRI MagickCore-Q16HDRI MagickCore-6.Q8HDRI MagickCore-Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
else()
diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake
new file mode 100644
index 0000000..31fe54c
--- /dev/null
+++ b/Modules/FindLua.cmake
@@ -0,0 +1,153 @@
+# Locate Lua library
+# This module defines
+# LUA_FOUND - if false, do not try to link to Lua
+# LUA_LIBRARIES - both lua and lualib
+# LUA_INCLUDE_DIR - where to find lua.h
+# LUA_VERSION_STRING - the version of Lua found
+# LUA_VERSION_MAJOR - the major version of Lua
+# LUA_VERSION_MINOR - the minor version of Lua
+# LUA_VERSION_PATCH - the patch version of Lua
+#
+# Note that the expected include convention is
+# #include "lua.h"
+# and not
+# #include <lua/lua.h>
+# This is because, the lua location is not standardized and may exist
+# in locations other than lua/
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+# Copyright 2013 Rolf Eike Beer <eike@sf-mail.de>
+#
+# 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.)
+
+unset(_lua_include_subdirs)
+unset(_lua_library_names)
+
+# this is a function only to have all the variables inside go away automatically
+function(set_lua_version_vars)
+ set(LUA_VERSIONS5 5.3 5.2 5.1 5.0)
+
+ if (Lua_FIND_VERSION_EXACT)
+ if (Lua_FIND_VERSION_COUNT GREATER 1)
+ 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
+ if (NOT Lua_FIND_VERSION_MAJOR GREATER 5)
+ if (Lua_FIND_VERSION_COUNT EQUAL 1)
+ set(lua_append_versions ${LUA_VERSIONS5})
+ else ()
+ foreach (subver IN LISTS LUA_VERSIONS5)
+ if (NOT subver VERSION_LESS ${Lua_FIND_VERSION})
+ list(APPEND lua_append_versions ${subver})
+ endif ()
+ endforeach ()
+ endif ()
+ endif ()
+ else ()
+ # once there is a different major version supported this should become a loop
+ set(lua_append_versions ${LUA_VERSIONS5})
+ endif ()
+
+ foreach (ver IN LISTS lua_append_versions)
+ string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}")
+ list(APPEND _lua_include_subdirs
+ include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
+ include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
+ include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
+ )
+ list(APPEND _lua_library_names
+ lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
+ lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
+ lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
+ )
+ endforeach ()
+
+ set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
+ set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
+endfunction(set_lua_version_vars)
+
+set_lua_version_vars()
+
+find_path(LUA_INCLUDE_DIR lua.h
+ HINTS
+ ENV LUA_DIR
+ PATH_SUFFIXES ${_lua_include_subdirs} include/lua include
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+)
+unset(_lua_include_subdirs)
+
+find_library(LUA_LIBRARY
+ NAMES ${_lua_library_names} lua
+ HINTS
+ ENV LUA_DIR
+ PATH_SUFFIXES lib
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+)
+unset(_lua_library_names)
+
+if (LUA_LIBRARY)
+ # include the math library for Unix
+ if (UNIX AND NOT APPLE AND NOT BEOS)
+ find_library(LUA_MATH_LIBRARY m)
+ set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
+ # For Windows and Mac, don't need to explicitly include the math library
+ else ()
+ set(LUA_LIBRARIES "${LUA_LIBRARY}")
+ endif ()
+endif ()
+
+if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
+ # At least 5.[012] have different ways to express the version
+ # so all of them need to be tested. Lua 5.2 defines LUA_VERSION
+ # and LUA_RELEASE as joined by the C preprocessor, so avoid those.
+ file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_strings
+ REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*")
+
+ string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};")
+ if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$")
+ string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};")
+ string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};")
+ set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}")
+ else ()
+ string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
+ if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$")
+ string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
+ endif ()
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}")
+ string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}")
+ string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}")
+ endif ()
+
+ unset(lua_version_strings)
+endif()
+
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
+# all listed variables are TRUE
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
+ REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
+ VERSION_VAR LUA_VERSION_STRING)
+
+mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 33c2971..a2577d2 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -58,15 +58,19 @@ if(ZLIB_FOUND)
list(APPEND PNG_NAMES png${v} libpng${v})
list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d)
endforeach()
-message(STATUS "PNG r: ${PNG_NAMES} d: ${PNG_NAMES_DEBUG}")
unset(_PNG_VERSION_SUFFIXES)
- find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
- find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
+ # For compatiblity with versions prior to this multi-config search, honor
+ # any PNG_LIBRARY that is already specified and skip the search.
+ if(NOT PNG_LIBRARY)
+ find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
+ find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
+ include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ select_library_configurations(PNG)
+ mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
+ endif()
unset(PNG_NAMES)
unset(PNG_NAMES_DEBUG)
- include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
- select_library_configurations(PNG)
# Set by select_library_configurations(), but we want the one from
# find_package_handle_standard_args() below.
unset(PNG_FOUND)
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index f649ddc..37e43d0 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -172,6 +172,8 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS
/usr/include/tcl8.3
/usr/include/tcl8.2
/usr/include/tcl8.0
+ /usr/local/include/tcl8.6
+ /usr/local/include/tk8.6
/usr/local/include/tcl8.5
/usr/local/include/tk8.5
/usr/local/include/tcl8.4
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake
index 798c44c..afeb9c5 100644
--- a/Modules/FortranCInterface/Detect.cmake
+++ b/Modules/FortranCInterface/Detect.cmake
@@ -49,7 +49,7 @@ unset(FortranCInterface_COMPILED CACHE)
# Locate the sample project executable.
if(FortranCInterface_COMPILED)
find_program(FortranCInterface_EXE
- NAMES FortranCInterface
+ NAMES FortranCInterface${CMAKE_EXECUTABLE_SUFFIX}
PATHS ${FortranCInterface_BINARY_DIR} ${FortranCInterface_BINARY_DIR}/Debug
NO_DEFAULT_PATH
)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index db8c7ef..72844b5 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -134,11 +134,23 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.3 ".9")
if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(_CMAKE_OSX_SDKS_VER ${CMAKE_OSX_DEPLOYMENT_TARGET}${_CMAKE_OSX_SDKS_VER_SUFFIX_${CMAKE_OSX_DEPLOYMENT_TARGET}})
+ set(_CMAKE_OSX_SYSROOT_CHECK "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
+ if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_CHECK}")
+ set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SYSROOT_CHECK}")
+ else()
+ set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
+ set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
+ message(WARNING
+ "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
+ "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
+ "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"\n"
+ "matching the host OS X version."
+ )
+ endif()
else()
set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
+ set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
endif()
- set(_CMAKE_OSX_SYSROOT_DEFAULT
- "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
else()
# Assume developer files are in root (such as Xcode 4.5 command-line tools).
set(_CMAKE_OSX_SYSROOT_DEFAULT "")
@@ -282,6 +294,15 @@ endif()
# set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
+ )
+if(_CMAKE_OSX_SYSROOT_PATH)
+ list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
+ ${_CMAKE_OSX_SYSROOT_PATH}/Library/Frameworks
+ ${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks
+ ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
+ )
+endif()
+list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
/Library/Frameworks
/Network/Library/Frameworks
/System/Library/Frameworks)
diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake
index 315f721..2598411 100644
--- a/Modules/Platform/QNX.cmake
+++ b/Modules/Platform/QNX.cmake
@@ -13,9 +13,6 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
-# http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples
-set(CMAKE_C_COMPILE_OPTION_TARGET "-V")
-set(CMAKE_CXX_COMPILE_OPTION_TARGET "-V")
# Shared libraries with no builtin soname may not be linked safely by
# specifying the file path.
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 685638a..7036ba0 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -124,8 +124,15 @@ endif()
set(CMAKE_BUILD_TYPE_INIT Debug)
if(WINCE)
- string(TOUPPER "${MSVC_C_ARCHITECTURE_ID}" _MSVC_C_ARCHITECTURE_ID_UPPER)
- string(TOUPPER "${MSVC_CXX_ARCHITECTURE_ID}" _MSVC_CXX_ARCHITECTURE_ID_UPPER)
+ foreach(lang C CXX)
+ set(_MSVC_${lang}_ARCHITECTURE_FAMILY "${MSVC_${lang}_ARCHITECTURE_ID}")
+ if(_MSVC_${lang}_ARCHITECTURE_FAMILY STREQUAL "THUMB")
+ set(_MSVC_${lang}_ARCHITECTURE_FAMILY "ARM")
+ elseif(_MSVC_${lang}_ARCHITECTURE_FAMILY MATCHES "^SH")
+ set(_MSVC_${lang}_ARCHITECTURE_FAMILY "SHx")
+ endif()
+ string(TOUPPER "${_MSVC_${lang}_ARCHITECTURE_FAMILY}" _MSVC_${lang}_ARCHITECTURE_FAMILY_UPPER)
+ endforeach()
if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)")
math(EXPR _CE_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}")
@@ -136,15 +143,15 @@ if(WINCE)
endif()
set(_PLATFORM_DEFINES "/D_WIN32_WCE=0x${_CE_VERSION} /DUNDER_CE")
- set(_PLATFORM_DEFINES_C " /D${MSVC_C_ARCHITECTURE_ID} /D_${_MSVC_C_ARCHITECTURE_ID_UPPER}_")
- set(_PLATFORM_DEFINES_CXX " /D${MSVC_CXX_ARCHITECTURE_ID} /D_${_MSVC_CXX_ARCHITECTURE_ID_UPPER}_")
+ set(_PLATFORM_DEFINES_C " /D${_MSVC_C_ARCHITECTURE_FAMILY} /D_${_MSVC_C_ARCHITECTURE_FAMILY_UPPER}_")
+ set(_PLATFORM_DEFINES_CXX " /D${_MSVC_CXX_ARCHITECTURE_FAMILY} /D_${_MSVC_CXX_ARCHITECTURE_FAMILY_UPPER}_")
set(_RTC1 "")
set(_FLAGS_CXX " /GR /EHsc")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "coredll.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib")
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:oldnames.lib")
- if (MSVC_VERSION LESS 1500)
+ if (MSVC_VERSION LESS 1600)
set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib")
endif ()
else()
@@ -231,7 +238,6 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE
"<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /FoNUL /FAs /Fa<ASSEMBLY_SOURCE> /c <SOURCE>${CMAKE_END_TEMP_FILE}")
- set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link")
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set(CMAKE_${lang}_LINK_EXECUTABLE
"${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 64fc53f..8412e3e 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -394,7 +394,7 @@ if(WIN32 AND NOT CYGWIN AND NOT BORLAND)
set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
add_executable(cmcldeps cmcldeps.cxx)
target_link_libraries(cmcldeps CMakeLib)
- install_targets(/bin cmcldeps)
+ install(TARGETS cmcldeps DESTINATION bin)
endif()
# create a library used by the command line and the GUI
@@ -554,7 +554,7 @@ if(WIN32)
if(NOT UNIX)
add_executable(cmw9xcom cmw9xcom.cxx)
target_link_libraries(cmw9xcom CMakeLib)
- install_targets(/bin cmw9xcom)
+ install(TARGETS cmw9xcom DESTINATION bin)
endif()
endif()
@@ -580,11 +580,9 @@ endif()
include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
-install_targets(/bin cmake)
-install_targets(/bin ctest)
-install_targets(/bin cpack)
+install(TARGETS cmake ctest cpack DESTINATION bin)
if(APPLE)
- install_targets(/bin cmakexbuild)
+ install(TARGETS cmakexbuild DESTINATION bin)
endif()
-install_files(${CMAKE_DATA_DIR}/include cmCPluginAPI.h)
+install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 52226ac..e7d0bb7 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,6 +1,6 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
-set(CMake_VERSION_PATCH 11)
-set(CMake_VERSION_TWEAK 20130808)
+set(CMake_VERSION_PATCH 12)
+set(CMake_VERSION_TWEAK 20131007)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackDocumentVariables.cxx b/Source/CPack/cmCPackDocumentVariables.cxx
index 1dfaaf9..8b16ae9 100644
--- a/Source/CPack/cmCPackDocumentVariables.cxx
+++ b/Source/CPack/cmCPackDocumentVariables.cxx
@@ -28,7 +28,7 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm)
" the so-called top level directory. The purpose of"
" is to include (set to 1 or ON or TRUE) the top level directory"
" in the package or not (set to 0 or OFF or FALSE).\n"
- "Each CPack generator as a built-in default value for this"
+ "Each CPack generator has a built-in default value for this"
" variable. E.g. Archive generators (ZIP, TGZ, ...) includes"
" the top level whereas RPM or DEB don't. The user may override"
" the default value by setting this variable.\n"
diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx
index 5dfcfe5..6b4adb4 100644
--- a/Source/CTest/cmParseGTMCoverage.cxx
+++ b/Source/CTest/cmParseGTMCoverage.cxx
@@ -98,7 +98,7 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
bool found = this->FindMumpsFile(routine, filepath);
if(found)
{
- int lineoffset;
+ int lineoffset = 0;
if(this->FindFunctionInMumpsFile(filepath,
function,
lineoffset))
@@ -106,8 +106,8 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
cmCTestCoverageHandlerContainer::SingleFileCoverageVector&
coverageVector = this->Coverage.TotalCoverage[filepath];
coverageVector[lineoffset + linenumber] += count;
+ lastoffset = lineoffset;
}
- lastoffset = lineoffset;
}
else
{
diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt
index 96e28b4..5efc2fb 100644
--- a/Source/CursesDialog/CMakeLists.txt
+++ b/Source/CursesDialog/CMakeLists.txt
@@ -34,4 +34,4 @@ add_executable(ccmake ${CURSES_SRCS} )
target_link_libraries(ccmake CMakeLib)
target_link_libraries(ccmake cmForm)
-install_targets(/bin ccmake)
+install(TARGETS ccmake DESTINATION bin)
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 114afd7..ab53b1d 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -19,4 +19,4 @@
#cmakedefine CMAKE_STRICT
#define CMAKE_ROOT_DIR "${CMake_SOURCE_DIR}"
#define CMAKE_BUILD_DIR "${CMake_BINARY_DIR}"
-#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@"
+#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"
diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h
index 46cd77e..7bab741 100644
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@ -40,6 +40,9 @@
"is exported using export(), or when the target is used by another " \
"target in the same buildsystem. Expands to the empty string " \
"otherwise.\n" \
+ " $<PLATFORM_ID> = The CMake-id of the platform " \
+ " $<PLATFORM_ID:comp> = '1' if the The CMake-id of the " \
+ "platform matches comp, otherwise '0'.\n" \
" $<C_COMPILER_ID> = The CMake-id of the C compiler " \
"used.\n" \
" $<C_COMPILER_ID:comp> = '1' if the CMake-id of the C " \
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 2c2d377..54f41af 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -19,7 +19,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"The full path to the cmake executable.",
"This is the full path to the CMake executable cmake which is "
"useful from custom commands that want to use the cmake -E "
- "option for portable system commands. "
+ "option for portable system commands. "
"(e.g. /usr/local/bin/cmake", false,
"Variables that Provide Information");
cm->DefineProperty
@@ -27,14 +27,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"The path to the top level of the build tree.",
"This is the full path to the top level of the current CMake "
"build tree. For an in-source build, this would be the same "
- "as CMAKE_SOURCE_DIR. ", false,
+ "as CMAKE_SOURCE_DIR.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_SOURCE_DIR", cmProperty::VARIABLE,
"The path to the top level of the source tree.",
"This is the full path to the top level of the current CMake "
"source tree. For an in-source build, this would be the same "
- "as CMAKE_BINARY_DIR. ", false,
+ "as CMAKE_BINARY_DIR.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CURRENT_BINARY_DIR", cmProperty::VARIABLE,
@@ -42,7 +42,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This the full path to the build directory that is currently "
"being processed by cmake. Each directory added by "
"add_subdirectory will create a binary directory in the build "
- "tree, and as it is being processed this variable will be set. "
+ "tree, and as it is being processed this variable will be set. "
"For in-source builds this is the current source directory "
"being processed.", false,
"Variables that Provide Information");
@@ -100,7 +100,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_SCRIPT_MODE_FILE", cmProperty::VARIABLE,
- "Full path to the -P script file currently being processed. ",
+ "Full path to the -P script file currently being processed.",
"When run in -P script mode, CMake sets this variable to the full "
"path of the script file. When run to configure a CMakeLists.txt "
"file, this variable is not set.", false,
@@ -108,14 +108,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_ARGC", cmProperty::VARIABLE,
- "Number of command line arguments passed to CMake in script mode. ",
+ "Number of command line arguments passed to CMake in script mode.",
"When run in -P script mode, CMake sets this variable to the number "
- "of command line arguments. See also CMAKE_ARGV0, 1, 2 ... ", false,
+ "of command line arguments. See also CMAKE_ARGV0, 1, 2 ...", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_ARGV0", cmProperty::VARIABLE,
- "Command line argument passed to CMake in script mode. ",
+ "Command line argument passed to CMake in script mode.",
"When run in -P script mode, CMake sets this variable to "
"the first command line argument. It then also sets CMAKE_ARGV1, "
"CMAKE_ARGV2, ... and so on, up to the number of command line arguments "
@@ -133,7 +133,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"and for Visual Studio 7 it set to devenv. For "
"NMake Makefiles the value is nmake. This can be "
"useful for adding special flags and commands based"
- " on the final build environment. ", false,
+ " on the final build environment.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CROSSCOMPILING", cmProperty::VARIABLE,
@@ -393,7 +393,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_SOURCE_DIR", cmProperty::VARIABLE,
"Source directory for project.",
- "This is the top level source directory for the project. "
+ "This is the top level source directory for the project. "
"It corresponds to the source directory given to "
"cmake-gui or ccmake.",false,
"Variables that Provide Information");
@@ -419,7 +419,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("PROJECT_NAME", cmProperty::VARIABLE,
"Name of the project given to the project command.",
"This is the name given to the most "
- "recent PROJECT command. ",false,
+ "recent PROJECT command.",false,
"Variables that Provide Information");
cm->DefineProperty
("PROJECT_SOURCE_DIR", cmProperty::VARIABLE,
@@ -550,7 +550,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"By default, automoc behaves exactly as described in the documentation "
"of the AUTOMOC target property. "
"When set to TRUE, it accepts more input and tries to find the correct "
- "input file for moc even if it differs from the documented behaviour. "
+ "input file for moc even if it differs from the documented behaviour. "
"In this mode it e.g. also checks whether a header file is intended to "
"be processed by moc when a \"foo.moc\" file has been included.\n"
"Relaxed mode has to be enabled for KDE4 compatibility.",
@@ -563,7 +563,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"If an install() command is used without the COMPONENT argument, "
"these files will be grouped into a default component. The name of this "
"default install component will be taken from this variable. "
- "It defaults to \"Unspecified\". ",
+ "It defaults to \"Unspecified\".",
false,
"Variables That Change Behavior");
@@ -591,9 +591,9 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_CONFIGURATION_TYPES", cmProperty::VARIABLE,
"Specifies the available build types on multi-config generators.",
"This specifies what build types (configurations) will be available "
- "such as Debug, Release, RelWithDebInfo etc. "
+ "such as Debug, Release, RelWithDebInfo etc. "
"This has reasonable defaults on most platforms, "
- "but can be extended to provide other build types. "
+ "but can be extended to provide other build types. "
"See also CMAKE_BUILD_TYPE for details of managing configuration data, "
"and CMAKE_CFG_INTDIR."
,false,
@@ -604,20 +604,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Specifies the build type on single-configuration generators.",
"This statically specifies what build type (configuration) "
"will be built in this build tree. Possible values are "
- "empty, Debug, Release, RelWithDebInfo and MinSizeRel. "
+ "empty, Debug, Release, RelWithDebInfo and MinSizeRel. "
"This variable is only meaningful to single-configuration generators "
"(such as make and Ninja) i.e. "
"those which choose a single configuration "
"when CMake runs to generate a build tree as opposed to "
"multi-configuration generators which offer selection of the build "
- "configuration within the generated build environment. "
+ "configuration within the generated build environment. "
"There are many per-config properties and variables "
"(usually following clean SOME_VAR_<CONFIG> order conventions), "
"such as CMAKE_C_FLAGS_<CONFIG>, specified as uppercase: "
- "CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL]. "
+ "CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL]. "
"For example, in a build tree configured "
"to build type Debug, CMake will see to having "
- "CMAKE_C_FLAGS_DEBUG settings get added to the CMAKE_C_FLAGS settings. "
+ "CMAKE_C_FLAGS_DEBUG settings get added to the CMAKE_C_FLAGS settings. "
"See also CMAKE_CONFIGURATION_TYPES."
,false,
"Variables That Change Behavior");
@@ -643,10 +643,10 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"directories. This variable defaults to /usr/local"
" on UNIX and c:/Program Files on Windows.\n"
"On UNIX one can use the DESTDIR mechanism in order"
- " to relocate the whole installation. "
+ " to relocate the whole installation. "
"DESTDIR means DESTination DIRectory. It is "
"commonly used by makefile users "
- "in order to install software at non-default location. "
+ "in order to install software at non-default location. "
"It is usually invoked like this:\n"
" make DESTDIR=/home/john install\n"
"which will install the concerned software using the"
@@ -665,10 +665,10 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY", cmProperty::VARIABLE,
"Don't make the install target depend on the all target.",
- "By default, the \"install\" target depends on the \"all\" target. "
+ "By default, the \"install\" target depends on the \"all\" target. "
"This has the effect, that when \"make install\" is invoked or INSTALL "
"is built, first the \"all\" target is built, then the installation "
- "starts. "
+ "starts. "
"If CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is set to TRUE, this dependency "
"is not created, so the installation process will start immediately, "
"independent from whether the project has been completely built or not."
@@ -769,9 +769,9 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"directories contain incompatible but possibly linkable libraries. For "
"example, on cross-compiled cluster environments, this allows a user to "
"ignore directories containing libraries meant for the front-end "
- "machine that modules like FindX11 (and others) would normally search. "
+ "machine that modules like FindX11 (and others) would normally search. "
"By default this contains a list of directories containing incompatible "
- "binaries for the host system. "
+ "binaries for the host system. "
"See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_SYSTEM_LIBRARY_PATH, "
"CMAKE_SYSTEM_INCLUDE_PATH, and CMAKE_SYSTEM_PROGRAM_PATH.", false,
"Variables That Change Behavior");
@@ -785,11 +785,11 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"directories contain incompatible but possibly linkable libraries. For "
"example, on cross-compiled cluster environments, this allows a user to "
"ignore directories containing libraries meant for the front-end "
- "machine that modules like FindX11 (and others) would normally search. "
- "By default this is empty; it is intended to be set by the project. "
+ "machine that modules like FindX11 (and others) would normally search. "
+ "By default this is empty; it is intended to be set by the project. "
"Note that CMAKE_IGNORE_PATH takes a list of directory names, NOT a "
"list of prefixes. If you want to ignore paths under prefixes (bin, "
- "include, lib, etc.), you'll need to specify them explicitly. "
+ "include, lib, etc.), you'll need to specify them explicitly. "
"See also CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH, CMAKE_INCLUDE_PATH, "
"CMAKE_PROGRAM_PATH.", false,
"Variables That Change Behavior");
@@ -836,7 +836,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"although that package is installed.\n"
"This switch should be used during the initial CMake run. Otherwise if "
"the package has already been found in a previous CMake run, the "
- "variables which have been stored in the cache will still be there. "
+ "variables which have been stored in the cache will still be there. "
"In that case it is recommended to remove the cache variables for "
"this package from the cache using the cache editor or cmake -U", false,
"Variables That Change Behavior");
@@ -923,7 +923,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_COLOR_MAKEFILE", cmProperty::VARIABLE,
"Enables color output when using the Makefile generator.",
- "When enabled, the generated Makefiles will produce colored output. "
+ "When enabled, the generated Makefiles will produce colored output. "
"Default is ON.",false,
"Variables That Change Behavior");
@@ -975,7 +975,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Name of system cmake is compiling for.",
"This variable is the composite of CMAKE_SYSTEM_NAME "
"and CMAKE_SYSTEM_VERSION, like this "
- "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}. "
+ "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}. "
"If CMAKE_SYSTEM_VERSION is not set, then "
"CMAKE_SYSTEM is the same as CMAKE_SYSTEM_NAME.",false,
"Variables That Describe the System");
@@ -1237,7 +1237,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_INSTALL_RPATH", cmProperty::VARIABLE,
"The rpath to use for installed targets.",
"A semicolon-separated list specifying the rpath "
- "to use in installed targets (for platforms that support it). "
+ "to use in installed targets (for platforms that support it). "
"This is used to initialize the target property "
"INSTALL_RPATH for all targets.",
false,
@@ -1248,7 +1248,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Add paths to linker search and installed rpath.",
"CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true "
"will append directories in the linker search path and outside the "
- "project to the INSTALL_RPATH. "
+ "project to the INSTALL_RPATH. "
"This is used to initialize the target property "
"INSTALL_RPATH_USE_LINK_PATH for all targets.",
false,
@@ -1267,7 +1267,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_Fortran_FORMAT", cmProperty::VARIABLE,
"Set to FIXED or FREE to indicate the Fortran source layout.",
"This variable is used to initialize the Fortran_FORMAT "
- "property on all the targets. "
+ "property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1276,7 +1276,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_Fortran_MODULE_DIRECTORY", cmProperty::VARIABLE,
"Fortran module output directory.",
"This variable is used to initialize the "
- "Fortran_MODULE_DIRECTORY property on all the targets. "
+ "Fortran_MODULE_DIRECTORY property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1285,7 +1285,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_LIBRARY_OUTPUT_DIRECTORY", cmProperty::VARIABLE,
"Where to put all the LIBRARY targets when built.",
"This variable is used to initialize the "
- "LIBRARY_OUTPUT_DIRECTORY property on all the targets. "
+ "LIBRARY_OUTPUT_DIRECTORY property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1294,7 +1294,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_ARCHIVE_OUTPUT_DIRECTORY", cmProperty::VARIABLE,
"Where to put all the ARCHIVE targets when built.",
"This variable is used to initialize the "
- "ARCHIVE_OUTPUT_DIRECTORY property on all the targets. "
+ "ARCHIVE_OUTPUT_DIRECTORY property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1303,7 +1303,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_RUNTIME_OUTPUT_DIRECTORY", cmProperty::VARIABLE,
"Where to put all the RUNTIME targets when built.",
"This variable is used to initialize the "
- "RUNTIME_OUTPUT_DIRECTORY property on all the targets. "
+ "RUNTIME_OUTPUT_DIRECTORY property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1312,7 +1312,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_PDB_OUTPUT_DIRECTORY", cmProperty::VARIABLE,
"Where to put all the MS debug symbol files from linker.",
"This variable is used to initialize the "
- "PDB_OUTPUT_DIRECTORY property on all the targets. "
+ "PDB_OUTPUT_DIRECTORY property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1330,7 +1330,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_AUTOMOC", cmProperty::VARIABLE,
"Whether to handle moc automatically for Qt targets.",
"This variable is used to initialize the "
- "AUTOMOC property on all the targets. "
+ "AUTOMOC property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1339,7 +1339,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_AUTOMOC_MOC_OPTIONS", cmProperty::VARIABLE,
"Additional options for moc when using automoc (see CMAKE_AUTOMOC).",
"This variable is used to initialize the "
- "AUTOMOC_MOC_OPTIONS property on all the targets. "
+ "AUTOMOC_MOC_OPTIONS property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1473,7 +1473,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_LIBRARY_PATH_FLAG", cmProperty::VARIABLE,
"The flag to be used to add a library search path to a compiler.",
- "The flag will be used to specify a library directory to the compiler. "
+ "The flag will be used to specify a library directory to the compiler. "
"On most compilers this is \"-L\".",false,
"Variables that Control the Build");
cm->DefineProperty
@@ -1500,7 +1500,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_USE_RELATIVE_PATHS", cmProperty::VARIABLE,
"Use relative paths (May not work!).",
"If this is set to TRUE, then CMake will use "
- "relative paths between the source and binary tree. "
+ "relative paths between the source and binary tree. "
"This option does not work for more complicated "
"projects, and relative paths are used when possible. "
"In general, it is not possible to move CMake generated"
@@ -1534,7 +1534,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_LINK_INTERFACE_LIBRARIES", cmProperty::VARIABLE,
"Default value for LINK_INTERFACE_LIBRARIES of targets.",
"This variable is used to initialize the "
- "LINK_INTERFACE_LIBRARIES property on all the targets. "
+ "LINK_INTERFACE_LIBRARIES property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1542,7 +1542,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_WIN32_EXECUTABLE", cmProperty::VARIABLE,
"Default value for WIN32_EXECUTABLE of targets.",
"This variable is used to initialize the "
- "WIN32_EXECUTABLE property on all the targets. "
+ "WIN32_EXECUTABLE property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1550,7 +1550,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_MACOSX_BUNDLE", cmProperty::VARIABLE,
"Default value for MACOSX_BUNDLE of targets.",
"This variable is used to initialize the "
- "MACOSX_BUNDLE property on all the targets. "
+ "MACOSX_BUNDLE property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1558,7 +1558,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_POSITION_INDEPENDENT_CODE", cmProperty::VARIABLE,
"Default value for POSITION_INDEPENDENT_CODE of targets.",
"This variable is used to initialize the "
- "POSITION_INDEPENDENT_CODE property on all the targets. "
+ "POSITION_INDEPENDENT_CODE property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1566,7 +1566,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_<LANG>_VISIBILITY_PRESET", cmProperty::VARIABLE,
"Default value for <LANG>_VISIBILITY_PRESET of targets.",
"This variable is used to initialize the "
- "<LANG>_VISIBILITY_PRESET property on all the targets. "
+ "<LANG>_VISIBILITY_PRESET property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1574,7 +1574,15 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_VISIBILITY_INLINES_HIDDEN", cmProperty::VARIABLE,
"Default value for VISIBILITY_INLINES_HIDDEN of targets.",
"This variable is used to initialize the "
- "VISIBILITY_INLINES_HIDDEN property on all the targets. "
+ "VISIBILITY_INLINES_HIDDEN property on all the targets. "
+ "See that target property for additional information.",
+ false,
+ "Variables that Control the Build");
+ cm->DefineProperty
+ ("CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>", cmProperty::VARIABLE,
+ "Default value for MAP_IMPORTED_CONFIG_<CONFIG> of targets.",
+ "This variable is used to initialize the "
+ "MAP_IMPORTED_CONFIG_<CONFIG> property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
@@ -1595,7 +1603,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_<LANG>_COMPILER", cmProperty::VARIABLE,
"The full path to the compiler for LANG.",
- "This is the command that will be used as the <LANG> compiler. "
+ "This is the command that will be used as the <LANG> compiler. "
"Once set, you can not change this variable.",false,
"Variables for Languages");
@@ -1671,7 +1679,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_COMPILER_IS_GNU<LANG>", cmProperty::VARIABLE,
"True if the compiler is GNU.",
"If the selected <LANG> compiler is the GNU "
- "compiler then this is TRUE, if not it is FALSE. "
+ "compiler then this is TRUE, if not it is FALSE. "
"Unlike the other per-language variables, this uses the GNU syntax for "
"identifying languages instead of the CMake syntax. Recognized values of "
"the <LANG> suffix are:\n"
@@ -1709,7 +1717,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_RELWITHDEBINFO", cmProperty::VARIABLE,
"Flags for RelWithDebInfo type or configuration.",
- "<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. "
+ "<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. "
"Short for Release With Debug Information.",false,
"Variables for Languages");
@@ -1773,7 +1781,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_<LANG>_IGNORE_EXTENSIONS", cmProperty::VARIABLE,
"File extensions that should be ignored by the build.",
"This is a list of file extensions that may be "
- "part of a project for a given language but are not compiled. ",false,
+ "part of a project for a given language but are not compiled.",false,
"Variables for Languages");
cm->DefineProperty
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 4edacbb..b19d847 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -829,10 +829,10 @@ int cmDocumentation::GetStructuredDocFromFile(
std::vector<cmDocumentationEntry>& commands,
cmake* cm)
{
- typedef enum sdoce {
+ enum sdoce {
SDOC_NONE, SDOC_MODULE, SDOC_MACRO, SDOC_FUNCTION, SDOC_VARIABLE,
SDOC_SECTION,
- SDOC_UNKNOWN} sdoc_t;
+ SDOC_UNKNOWN};
int nbDocItemFound = 0;
int docCtxIdx = 0;
std::vector<int> docContextStack(60);
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index c97d4ff..c8b4a79 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -162,7 +162,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
if (require2_8_12)
{
- this->GenerateRequiredCMakeVersion(os, "2.8.11.20130626");
+ this->GenerateRequiredCMakeVersion(os, "2.8.12");
}
// Now load per-configuration properties for them.
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index e7b185a..819ac37 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -93,7 +93,9 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target,
{
properties[i->first] = i->second.GetValue();
- if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0)
+ if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
+ || i->first.find("IMPORTED_LINK_DEPENDENT_LIBRARIES") == 0
+ || i->first.find("INTERFACE_LINK_LIBRARIES") == 0)
{
const std::string libs = i->second.GetValue();
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index e962313..97853f3 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -71,7 +71,7 @@ const char *cmCompiledGeneratorExpression::Evaluate(
cmTarget *currentTarget,
cmGeneratorExpressionDAGChecker *dagChecker) const
{
- if (!this->NeedsParsing)
+ if (!this->NeedsEvaluation)
{
return this->Input.c_str();
}
@@ -129,9 +129,9 @@ cmCompiledGeneratorExpression::cmCompiledGeneratorExpression(
cmGeneratorExpressionLexer l;
std::vector<cmGeneratorExpressionToken> tokens =
l.Tokenize(this->Input.c_str());
- this->NeedsParsing = l.GetSawGeneratorExpression();
+ this->NeedsEvaluation = l.GetSawGeneratorExpression();
- if (this->NeedsParsing)
+ if (this->NeedsEvaluation)
{
cmGeneratorExpressionParser p(tokens);
p.Parse(this->Evaluators);
@@ -192,11 +192,12 @@ static std::string stripAllGeneratorExpressions(const std::string &input)
std::string result;
std::string::size_type pos = 0;
std::string::size_type lastPos = pos;
+ int nestingLevel = 0;
while((pos = input.find("$<", lastPos)) != input.npos)
{
result += input.substr(lastPos, pos - lastPos);
pos += 2;
- int nestingLevel = 1;
+ nestingLevel = 1;
const char *c = input.c_str() + pos;
const char * const cStart = c;
for ( ; *c; ++c)
@@ -224,7 +225,10 @@ static std::string stripAllGeneratorExpressions(const std::string &input)
pos += traversed;
lastPos = pos;
}
- result += input.substr(lastPos);
+ if (nestingLevel == 0)
+ {
+ result += input.substr(lastPos);
+ }
return cmGeneratorExpression::StripEmptyListElements(result);
}
@@ -234,9 +238,12 @@ static void prefixItems(const std::string &content, std::string &result,
{
std::vector<std::string> entries;
cmGeneratorExpression::Split(content, entries);
+ const char *sep = "";
for(std::vector<std::string>::const_iterator ei = entries.begin();
ei != entries.end(); ++ei)
{
+ result += sep;
+ sep = ";";
if (!cmSystemTools::FileIsFullPath(ei->c_str())
&& cmGeneratorExpression::Find(*ei) == std::string::npos)
{
@@ -253,6 +260,7 @@ static std::string stripExportInterface(const std::string &input,
{
std::string result;
+ int nestingLevel = 0;
std::string::size_type pos = 0;
std::string::size_type lastPos = pos;
while (true)
@@ -282,7 +290,7 @@ static std::string stripExportInterface(const std::string &input,
const bool gotInstallInterface = input[pos + 2] == 'I';
pos += gotInstallInterface ? sizeof("$<INSTALL_INTERFACE:") - 1
: sizeof("$<BUILD_INTERFACE:") - 1;
- int nestingLevel = 1;
+ nestingLevel = 1;
const char *c = input.c_str() + pos;
const char * const cStart = c;
for ( ; *c; ++c)
@@ -331,7 +339,10 @@ static std::string stripExportInterface(const std::string &input,
pos += traversed;
lastPos = pos;
}
- result += input.substr(lastPos);
+ if (nestingLevel == 0)
+ {
+ result += input.substr(lastPos);
+ }
return cmGeneratorExpression::StripEmptyListElements(result);
}
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index c20f130..bc0f6c2 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -126,7 +126,7 @@ private:
cmListFileBacktrace Backtrace;
std::vector<cmGeneratorExpressionEvaluator*> Evaluators;
const std::string Input;
- bool NeedsParsing;
+ bool NeedsEvaluation;
mutable std::set<cmTarget*> DependTargets;
mutable std::set<cmTarget*> AllTargetsSeen;
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index e0c8c9e..7fd0fdc 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -438,6 +438,39 @@ static const struct CxxCompilerVersionNode : public CompilerVersionNode
//----------------------------------------------------------------------------
+struct PlatformIdNode : public cmGeneratorExpressionNode
+{
+ PlatformIdNode() {}
+
+ virtual int NumExpectedParameters() const { return ZeroOrMoreParameters; }
+
+ std::string Evaluate(const std::vector<std::string> &parameters,
+ cmGeneratorExpressionContext *context,
+ const GeneratorExpressionContent *,
+ cmGeneratorExpressionDAGChecker *) const
+ {
+ const char *platformId = context->Makefile ?
+ context->Makefile->GetSafeDefinition(
+ "CMAKE_SYSTEM_NAME") : "";
+ if (parameters.size() == 0)
+ {
+ return platformId ? platformId : "";
+ }
+
+ if (!platformId)
+ {
+ return parameters.front().empty() ? "1" : "0";
+ }
+
+ if (cmsysString_strcasecmp(parameters.begin()->c_str(), platformId) == 0)
+ {
+ return "1";
+ }
+ return "0";
+ }
+} platformIdNode;
+
+//----------------------------------------------------------------------------
static const struct VersionGreaterNode : public cmGeneratorExpressionNode
{
VersionGreaterNode() {}
@@ -574,14 +607,15 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
// Check if there is a proper config mapping for the tested config.
std::vector<std::string> mappedConfigs;
std::string mapProp = "MAP_IMPORTED_CONFIG_";
- mapProp += context->Config;
+ mapProp += cmSystemTools::UpperCase(context->Config);
if(const char* mapValue =
context->CurrentTarget->GetProperty(mapProp.c_str()))
{
cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue),
mappedConfigs);
return std::find(mappedConfigs.begin(), mappedConfigs.end(),
- context->Config) != mappedConfigs.end() ? "1" : "0";
+ cmSystemTools::UpperCase(parameters.front()))
+ != mappedConfigs.end() ? "1" : "0";
}
}
}
@@ -1355,6 +1389,8 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier)
return &cCompilerVersionNode;
else if (identifier == "CXX_COMPILER_VERSION")
return &cxxCompilerVersionNode;
+ else if (identifier == "PLATFORM_ID")
+ return &platformIdNode;
else if (identifier == "CONFIGURATION")
return &configurationNode;
else if (identifier == "CONFIG")
diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx
index a619cec..e1fb8f1 100644
--- a/Source/cmGeneratorExpressionParser.cxx
+++ b/Source/cmGeneratorExpressionParser.cxx
@@ -126,6 +126,9 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
std::vector<std::vector<cmGeneratorExpressionToken>::const_iterator>
commaTokens;
std::vector<cmGeneratorExpressionToken>::const_iterator colonToken;
+
+ bool emptyParamTermination = false;
+
if (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
{
@@ -133,6 +136,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
parameters.resize(parameters.size() + 1);
assert(this->it != this->Tokens.end());
++this->it;
+ if(this->it == this->Tokens.end())
+ {
+ emptyParamTermination = true;
+ }
while (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
@@ -141,6 +148,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
parameters.resize(parameters.size() + 1);
assert(this->it != this->Tokens.end());
++this->it;
+ if(this->it == this->Tokens.end())
+ {
+ emptyParamTermination = true;
+ }
}
while (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
@@ -164,6 +175,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
parameters.resize(parameters.size() + 1);
assert(this->it != this->Tokens.end());
++this->it;
+ if(this->it == this->Tokens.end())
+ {
+ emptyParamTermination = true;
+ }
}
while (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
@@ -203,7 +218,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
assert(parameters.size() > commaTokens.size());
for ( ; pit != pend; ++pit, ++commaIt)
{
- extendResult(result, *pit);
+ if (!pit->empty() && !emptyParamTermination)
+ {
+ extendResult(result, *pit);
+ }
if (commaIt != commaTokens.end())
{
extendText(result, *commaIt);
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5ce0e6b..62ac263 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -80,6 +80,12 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
config, false, this->Target,
&dagChecker), result);
}
+ for(std::vector<std::string>::iterator li = result.begin();
+ li != result.end(); ++li)
+ {
+ cmSystemTools::ConvertToUnixSlashes(*li);
+ }
+
IncludeCacheType::value_type entry(config_upper, result);
iter = this->SystemIncludesCache.insert(entry).first;
}
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7f2b592..799bbdb 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -146,9 +146,17 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
const char* cname = this->GetCMakeInstance()->
GetCacheManager()->GetCacheValue(langComp.c_str());
std::string changeVars;
- if(cname && (path != cname) && (optional==false))
+ if(cname && !optional)
{
- std::string cnameString = cname;
+ std::string cnameString;
+ if(!cmSystemTools::FileIsFullPath(cname))
+ {
+ cnameString = cmSystemTools::FindProgram(cname);
+ }
+ else
+ {
+ cnameString = cname;
+ }
std::string pathString = path;
// get rid of potentially multiple slashes:
cmSystemTools::ConvertToUnixSlashes(cnameString);
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 0a95091..31e122e 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -81,6 +81,9 @@ public:
void PathTooLong(cmTarget* target, cmSourceFile* sf,
std::string const& sfRel);
+
+ virtual const char* GetToolsVersion() { return "4.0"; }
+
protected:
virtual const char* GetIDEVersion() { return "10.0"; }
diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h
index 064e310..8c8aeb1 100644
--- a/Source/cmGlobalVisualStudio12Generator.h
+++ b/Source/cmGlobalVisualStudio12Generator.h
@@ -31,6 +31,11 @@ public:
/** TODO: VS 12 user macro support. */
virtual std::string GetUserMacrosDirectory() { return ""; }
+
+ //in Visual Studio 2013 they detached the MSBuild tools version
+ //from the .Net Framework version and instead made it have it's own
+ //version number
+ virtual const char* GetToolsVersion() { return "12.0"; }
protected:
virtual const char* GetIDEVersion() { return "12.0"; }
private:
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index e4244e0..1a4c7ff 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -202,7 +202,7 @@ std::string cmGlobalVisualStudio8Generator::GetUserMacrosRegKeyBase()
}
//----------------------------------------------------------------------------
-void cmGlobalVisualStudio8Generator::AddCheckTarget()
+bool cmGlobalVisualStudio8Generator::AddCheckTarget()
{
// Add a special target on which all other targets depend that
// checks the build system and optionally re-runs CMake.
@@ -216,7 +216,7 @@ void cmGlobalVisualStudio8Generator::AddCheckTarget()
// Skip the target if no regeneration is to be done.
if(mf->IsOn("CMAKE_SUPPRESS_REGENERATION"))
{
- return;
+ return false;
}
std::string cmake_command = mf->GetRequiredDefinition("CMAKE_COMMAND");
@@ -315,21 +315,24 @@ void cmGlobalVisualStudio8Generator::AddCheckTarget()
cmSystemTools::Error("Error adding rule for ", stamps[0].c_str());
}
}
+
+ return true;
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio8Generator::Generate()
{
- this->AddCheckTarget();
-
- // All targets depend on the build-system check target.
- for(std::map<cmStdString,cmTarget *>::const_iterator
- ti = this->TotalTargets.begin();
- ti != this->TotalTargets.end(); ++ti)
+ if(this->AddCheckTarget())
{
- if(ti->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET)
+ // All targets depend on the build-system check target.
+ for(std::map<cmStdString,cmTarget *>::const_iterator
+ ti = this->TotalTargets.begin();
+ ti != this->TotalTargets.end(); ++ti)
{
- ti->second->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
+ if(ti->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET)
+ {
+ ti->second->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
+ }
}
}
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index d181742..2376f8a 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -71,7 +71,7 @@ protected:
virtual bool VSLinksDependencies() const { return false; }
- void AddCheckTarget();
+ bool AddCheckTarget();
static cmIDEFlagTable const* GetExtraFlagTableVS8();
virtual void WriteSLNHeader(std::ostream& fout);
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7cb2d1f..0a2b32b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -431,13 +431,16 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
// Add XCODE depend helper
std::string dir = mf->GetCurrentOutputDirectory();
- cmCustomCommandLine makecommand;
- makecommand.push_back("make");
- makecommand.push_back("-C");
- makecommand.push_back(dir.c_str());
- makecommand.push_back("-f");
- makecommand.push_back(this->CurrentXCodeHackMakefile.c_str());
- makecommand.push_back(""); // placeholder, see below
+ cmCustomCommandLine makeHelper;
+ if(this->XcodeVersion < 50)
+ {
+ makeHelper.push_back("make");
+ makeHelper.push_back("-C");
+ makeHelper.push_back(dir.c_str());
+ makeHelper.push_back("-f");
+ makeHelper.push_back(this->CurrentXCodeHackMakefile.c_str());
+ makeHelper.push_back(""); // placeholder, see below
+ }
// Add ZERO_CHECK
bool regenerate = !mf->IsOn("CMAKE_SUPPRESS_REGENERATION");
@@ -477,17 +480,18 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
// run the depend check makefile as a post build rule
// this will make sure that when the next target is built
// things are up-to-date
- if((target.GetType() == cmTarget::EXECUTABLE ||
+ if(!makeHelper.empty() &&
+ (target.GetType() == cmTarget::EXECUTABLE ||
// Nope - no post-build for OBJECT_LIRBRARY
// target.GetType() == cmTarget::OBJECT_LIBRARY ||
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY))
{
- makecommand[makecommand.size()-1] =
+ makeHelper[makeHelper.size()-1] = // fill placeholder
this->PostBuildMakeTarget(target.GetName(), "$(CONFIGURATION)");
cmCustomCommandLines commandLines;
- commandLines.push_back(makecommand);
+ commandLines.push_back(makeHelper);
lg->GetMakefile()->AddCustomCommandToTarget(target.GetName(),
no_depends,
commandLines,
@@ -1027,18 +1031,21 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
}
}
- // Add object library contents as external objects. (Equivalent to
- // the externalObjFiles above, except each one is not a cmSourceFile
- // within the target.)
- std::vector<std::string> objs;
- this->GetGeneratorTarget(&cmtarget)->UseObjectLibraries(objs);
- for(std::vector<std::string>::const_iterator
- oi = objs.begin(); oi != objs.end(); ++oi)
+ if(this->XcodeVersion < 50)
{
- std::string obj = *oi;
- cmXCodeObject* xsf =
- this->CreateXCodeSourceFileFromPath(obj, cmtarget, "");
- externalObjFiles.push_back(xsf);
+ // Add object library contents as external objects. (Equivalent to
+ // the externalObjFiles above, except each one is not a cmSourceFile
+ // within the target.)
+ std::vector<std::string> objs;
+ this->GetGeneratorTarget(&cmtarget)->UseObjectLibraries(objs);
+ for(std::vector<std::string>::const_iterator
+ oi = objs.begin(); oi != objs.end(); ++oi)
+ {
+ std::string obj = *oi;
+ cmXCodeObject* xsf =
+ this->CreateXCodeSourceFileFromPath(obj, cmtarget, "");
+ externalObjFiles.push_back(xsf);
+ }
}
// some build phases only apply to bundles and/or frameworks
@@ -2765,13 +2772,6 @@ void cmGlobalXCodeGenerator
}
}
- // Skip link information for static libraries.
- if(cmtarget->GetType() == cmTarget::OBJECT_LIBRARY ||
- cmtarget->GetType() == cmTarget::STATIC_LIBRARY)
- {
- return;
- }
-
// Loop over configuration types and set per-configuration info.
for(std::vector<std::string>::iterator i =
this->CurrentConfigurationTypes.begin();
@@ -2784,6 +2784,31 @@ void cmGlobalXCodeGenerator
configName = 0;
}
+ if(this->XcodeVersion >= 50)
+ {
+ // Add object library contents as link flags.
+ std::string linkObjs;
+ const char* sep = "";
+ std::vector<std::string> objs;
+ this->GetGeneratorTarget(cmtarget)->UseObjectLibraries(objs);
+ for(std::vector<std::string>::const_iterator
+ oi = objs.begin(); oi != objs.end(); ++oi)
+ {
+ linkObjs += sep;
+ sep = " ";
+ linkObjs += this->XCodeEscapePath(oi->c_str());
+ }
+ this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
+ linkObjs.c_str(), configName);
+ }
+
+ // Skip link information for object libraries.
+ if(cmtarget->GetType() == cmTarget::OBJECT_LIBRARY ||
+ cmtarget->GetType() == cmTarget::STATIC_LIBRARY)
+ {
+ continue;
+ }
+
// Compute the link library and directory information.
cmComputeLinkInformation* pcli = cmtarget->GetLinkInformation(configName);
if(!pcli)
@@ -3338,8 +3363,11 @@ void cmGlobalXCodeGenerator
cmXCodeObject* t = *i;
this->AddDependAndLinkInformation(t);
}
- // now create xcode depend hack makefile
- this->CreateXCodeDependHackTarget(targets);
+ if(this->XcodeVersion < 50)
+ {
+ // now create xcode depend hack makefile
+ this->CreateXCodeDependHackTarget(targets);
+ }
// now add all targets to the root object
cmXCodeObject* allTargets = this->CreateObject(cmXCodeObject::OBJECT_LIST);
for(std::vector<cmXCodeObject*>::iterator i = targets.begin();
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index c02866c..898f379 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -287,8 +287,8 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
if(token->type == cmListFileLexer_Token_ParenLeft)
{
parenDepth++;
- this->AddArgument(token, cmListFileArgument::Unquoted);
this->Separation = SeparationOkay;
+ this->AddArgument(token, cmListFileArgument::Unquoted);
}
else if(token->type == cmListFileLexer_Token_ParenRight)
{
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index b515727..9c04109 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1038,20 +1038,11 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
// If this is the compiler then look for the extra variable
// _COMPILER_ARG1 which must be the first argument to the compiler
const char* compilerArg1 = 0;
- const char* compilerTarget = 0;
- const char* compilerOptionTarget = 0;
if(actualReplace == "CMAKE_${LANG}_COMPILER")
{
std::string arg1 = actualReplace + "_ARG1";
cmSystemTools::ReplaceString(arg1, "${LANG}", lang);
compilerArg1 = this->Makefile->GetDefinition(arg1.c_str());
- compilerTarget
- = this->Makefile->GetDefinition(
- (std::string("CMAKE_") + lang + "_COMPILER_TARGET").c_str());
- compilerOptionTarget
- = this->Makefile->GetDefinition(
- (std::string("CMAKE_") + lang +
- "_COMPILE_OPTION_TARGET").c_str());
}
if(actualReplace.find("${LANG}") != actualReplace.npos)
{
@@ -1072,11 +1063,6 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
ret += " ";
ret += compilerArg1;
}
- if (compilerTarget && compilerOptionTarget)
- {
- ret += compilerOptionTarget;
- ret += compilerTarget;
- }
return ret;
}
return replace;
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 58cc6f4..bd6c860 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1954,23 +1954,27 @@ cmLocalVisualStudio7Generator
// Compute the version of the Intel plugin to the VS IDE.
// If the key does not exist then use a default guess.
- std::string intelVersion = "9.10";
+ std::string intelVersion;
std::string vskey = gg->GetRegistryBase();
vskey += "\\Packages\\" CM_INTEL_PLUGIN_GUID ";ProductVersion";
cmSystemTools::ReadRegistryValue(vskey.c_str(), intelVersion,
cmSystemTools::KeyWOW64_32);
- if (intelVersion.find("13") == 0 ||
- intelVersion.find("12") == 0 ||
- intelVersion.find("11") == 0)
+ unsigned int intelVersionNumber = ~0u;
+ sscanf(intelVersion.c_str(), "%u", &intelVersionNumber);
+ if(intelVersionNumber >= 11)
{
- // Version 11.x, 12.x, and 13.x actually use 11.0 in project files!
- intelVersion = "11.0" ;
+ // Default to latest known project file version.
+ intelVersion = "11.0";
}
- else if(intelVersion.find("10") == 0)
+ else if(intelVersionNumber == 10)
{
// Version 10.x actually uses 9.10 in project files!
intelVersion = "9.10";
}
+ else
+ {
+ // Version <= 9: use ProductVersion from registry.
+ }
fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
<< "<VisualStudioProject\n"
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 57b86fd..34541e9 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -816,6 +816,19 @@ bool cmMakefile::NeedBackwardsCompatibility(unsigned int major,
}
}
+
+namespace
+{
+ struct file_not_persistent
+ {
+ bool operator()(const std::string& path) const
+ {
+ return !(path.find("CMakeTmp") == path.npos &&
+ cmSystemTools::FileExists(path.c_str()));
+ }
+ };
+}
+
void cmMakefile::FinalPass()
{
// do all the variable expansions here
@@ -829,6 +842,29 @@ void cmMakefile::FinalPass()
(*i)->FinalPass();
}
+ //go through all configured files and see which ones still exist.
+ //we don't want cmake to re-run if a configured file is created and deleted
+ //during processing as that would make it a transient file that can't
+ //influence the build process
+
+ //remove_if will move all items that don't have a valid file name to the
+ //back of the vector
+ std::vector<std::string>::iterator new_output_files_end = std::remove_if(
+ this->OutputFiles.begin(),
+ this->OutputFiles.end(),
+ file_not_persistent() );
+ //we just have to erase all items at the back
+ this->OutputFiles.erase(new_output_files_end, this->OutputFiles.end() );
+
+ //if a configured file is used as input for another configured file,
+ //and then deleted it will show up in the input list files so we
+ //need to scan those too
+ std::vector<std::string>::iterator new_list_files_end = std::remove_if(
+ this->ListFiles.begin(),
+ this->ListFiles.end(),
+ file_not_persistent() );
+
+ this->ListFiles.erase(new_list_files_end, this->ListFiles.end() );
}
// Generate the output file
@@ -1033,6 +1069,19 @@ void
cmMakefile::UpdateOutputToSourceMap(std::string const& output,
cmSourceFile* source)
{
+ OutputToSourceMap::iterator i = this->OutputToSource.find(output);
+ if(i != this->OutputToSource.end())
+ {
+ // Multiple custom commands produce the same output but may
+ // be attached to a different source file (MAIN_DEPENDENCY).
+ // LinearGetSourceFileWithOutput would return the first one,
+ // so keep the mapping for the first one.
+ //
+ // TODO: Warn the user about this case. However, the VS 8 generator
+ // triggers it for separate generate.stamp rules in ZERO_CHECK and
+ // individual targets.
+ return;
+ }
this->OutputToSource[output] = source;
}
@@ -3419,11 +3468,12 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
std::string sinfile = infile;
this->AddCMakeDependFile(sinfile);
cmSystemTools::ConvertToUnixSlashes(soutfile);
+
// Re-generate if non-temporary outputs are missing.
- if(soutfile.find("CMakeTmp") == soutfile.npos)
- {
- this->AddCMakeOutputFile(soutfile);
- }
+ //when we finalize the configuration we will remove all
+ //output files that now don't exist.
+ this->AddCMakeOutputFile(soutfile);
+
mode_t perm = 0;
cmSystemTools::GetPermissions(sinfile.c_str(), perm);
std::string::size_type pos = soutfile.rfind('/');
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0829cab..4e40f6c 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -21,6 +21,7 @@
#include "cmTarget.h"
#include "cmake.h"
#include "cmComputeLinkInformation.h"
+#include "cmGeneratorExpression.h"
#include "cmMakefileExecutableTargetGenerator.h"
#include "cmMakefileLibraryTargetGenerator.h"
@@ -131,7 +132,14 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
this->Makefile->GetProperty
("ADDITIONAL_MAKE_CLEAN_FILES"))
{
- cmSystemTools::ExpandListArgument(additional_clean_files,
+ const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
+ cmListFileBacktrace lfbt;
+ cmGeneratorExpression ge(lfbt);
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(additional_clean_files);
+
+ cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, config,
+ false, this->Target, 0, 0),
this->CleanFiles);
}
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 0ba673e..f9197e0 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -27,11 +27,11 @@ public:
cmPolicies::PolicyStatus status)
{
if (!idString || !shortDescription || ! longDescription)
- {
+ {
cmSystemTools::Error("Attempt to define a policy without "
"all parameters being specified!");
return;
- }
+ }
this->ID = iD;
this->IDString = idString;
this->ShortDescription = shortDescription;
@@ -61,29 +61,29 @@ public:
unsigned int tweakV)
{
if (majorV < this->MajorVersionIntroduced)
- {
+ {
return true;
- }
+ }
if (majorV > this->MajorVersionIntroduced)
- {
+ {
return false;
- }
+ }
if (minorV < this->MinorVersionIntroduced)
- {
+ {
return true;
- }
+ }
if (minorV > this->MinorVersionIntroduced)
- {
+ {
return false;
- }
+ }
if (patchV < this->PatchVersionIntroduced)
- {
+ {
return true;
- }
+ }
if (patchV > this->PatchVersionIntroduced)
- {
+ {
return false;
- }
+ }
return (tweakV < this->TweakVersionIntroduced);
}
@@ -543,7 +543,7 @@ cmPolicies::cmPolicies()
"the INCLUDE_DIRECTORIES target property. "
"The NEW behavior for this policy is to issue a FATAL_ERROR if "
"INCLUDE_DIRECTORIES contains a relative path.",
- 2,8,11,20130516, cmPolicies::WARN);
+ 2,8,12,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0022, "CMP0022",
@@ -574,7 +574,7 @@ cmPolicies::cmPolicies()
"The NEW behavior for this policy is to use the INTERFACE_LINK_LIBRARIES "
"property for in-build targets, and ignore the old properties matching "
"(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?.",
- 2,8,11,20130516, cmPolicies::WARN);
+ 2,8,12,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0023, "CMP0023",
@@ -600,7 +600,7 @@ cmPolicies::cmPolicies()
"target_link_libraries signatures to be mixed. "
"The NEW behavior for this policy is to not to allow mixing of the "
"keyword and plain signatures.",
- 2,8,11,20130724, cmPolicies::WARN);
+ 2,8,12,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
@@ -609,9 +609,9 @@ cmPolicies::~cmPolicies()
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator i
= this->Policies.begin();
for (;i != this->Policies.end(); ++i)
- {
+ {
delete i->second;
- }
+ }
}
void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD,
@@ -626,11 +626,11 @@ void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD,
{
// a policy must be unique and can only be defined once
if (this->Policies.find(iD) != this->Policies.end())
- {
+ {
cmSystemTools::Error("Attempt to redefine a CMake policy for policy "
"ID ", this->GetPolicyIDString(iD).c_str());
return;
- }
+ }
this->Policies[iD] = new cmPolicy(iD, idString,
shortDescription,
@@ -784,15 +784,15 @@ bool cmPolicies::GetPolicyDefault(cmMakefile* mf, std::string const& policy,
bool cmPolicies::GetPolicyID(const char *id, cmPolicies::PolicyID &pid)
{
if (!id || strlen(id) < 1)
- {
+ {
return false;
- }
+ }
std::map<std::string,cmPolicies::PolicyID>::iterator pos =
this->PolicyStringMap.find(id);
if (pos == this->PolicyStringMap.end())
- {
+ {
return false;
- }
+ }
pid = pos->second;
return true;
}
@@ -802,9 +802,9 @@ std::string cmPolicies::GetPolicyIDString(cmPolicies::PolicyID pid)
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
this->Policies.find(pid);
if (pos == this->Policies.end())
- {
+ {
return "";
- }
+ }
return pos->second->IDString;
}
@@ -815,11 +815,11 @@ std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id)
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
this->Policies.find(id);
if (pos == this->Policies.end())
- {
+ {
cmSystemTools::Error(
"Request for warning text for undefined policy!");
return "Request for warning text for undefined policy!";
- }
+ }
cmOStringStream msg;
msg <<
@@ -839,11 +839,11 @@ std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id)
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
this->Policies.find(id);
if (pos == this->Policies.end())
- {
+ {
cmSystemTools::Error(
"Request for error text for undefined policy!");
return "Request for error text for undefined policy!";
- }
+ }
cmOStringStream error;
error <<
@@ -869,10 +869,10 @@ cmPolicies::GetPolicyStatus(cmPolicies::PolicyID id)
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator pos =
this->Policies.find(id);
if (pos == this->Policies.end())
- {
+ {
// TODO is this right?
return cmPolicies::WARN;
- }
+ }
return pos->second->Status;
}
@@ -883,7 +883,7 @@ void cmPolicies::GetDocumentation(std::vector<cmDocumentationEntry>& v)
std::map<cmPolicies::PolicyID,cmPolicy *>::iterator i
= this->Policies.begin();
for (;i != this->Policies.end(); ++i)
- {
+ {
cmOStringStream full;
full << i->second->LongDescription;
full << "\nThis policy was introduced in CMake version ";
@@ -920,7 +920,7 @@ void cmPolicies::GetDocumentation(std::vector<cmDocumentationEntry>& v)
i->second->ShortDescription.c_str(),
full.str().c_str());
v.push_back(e);
- }
+ }
}
//----------------------------------------------------------------------------
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 93e39ab..54df12c 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -32,16 +32,28 @@
#include "cmQtAutomoc.h"
-static bool containsQ_OBJECT(const std::string& text)
+static bool requiresMocing(const std::string& text, std::string &macroName)
{
// this simple check is much much faster than the regexp
- if (strstr(text.c_str(), "Q_OBJECT") == NULL)
+ if (strstr(text.c_str(), "Q_OBJECT") == NULL
+ && strstr(text.c_str(), "Q_GADGET") == NULL)
{
return false;
}
cmsys::RegularExpression qObjectRegExp("[\n][ \t]*Q_OBJECT[^a-zA-Z0-9_]");
- return qObjectRegExp.find(text);
+ if (qObjectRegExp.find(text))
+ {
+ macroName = "Q_OBJECT";
+ return true;
+ }
+ cmsys::RegularExpression qGadgetRegExp("[\n][ \t]*Q_GADGET[^a-zA-Z0-9_]");
+ if (qGadgetRegExp.find(text))
+ {
+ macroName = "Q_GADGET";
+ return true;
+ }
+ return false;
}
@@ -837,7 +849,8 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/';
const std::string scannedFileBasename = cmsys::SystemTools::
GetFilenameWithoutLastExtension(absFilename);
- const bool cppContainsQ_OBJECT = containsQ_OBJECT(contentsString);
+ std::string macroName;
+ const bool requiresMoc = requiresMocing(contentsString, macroName);
bool dotMocIncluded = false;
bool mocUnderscoreIncluded = false;
std::string ownMocUnderscoreFile;
@@ -908,7 +921,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
else
{
std::string fileToMoc = absFilename;
- if ((basename != scannedFileBasename) || (cppContainsQ_OBJECT==false))
+ if ((basename != scannedFileBasename) || (requiresMoc==false))
{
std::string mocSubDir = extractSubDir(absPath, currentMoc);
std::string headerToMoc = findMatchingHeader(
@@ -917,12 +930,12 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
{
// this is for KDE4 compatibility:
fileToMoc = headerToMoc;
- if ((cppContainsQ_OBJECT==false) &&(basename==scannedFileBasename))
+ if ((requiresMoc==false) &&(basename==scannedFileBasename))
{
std::cerr << "AUTOMOC: warning: " << absFilename << ": The file "
"includes the moc file \"" << currentMoc <<
- "\", but does not contain a Q_OBJECT macro. "
- "Running moc on "
+ "\", but does not contain a " << macroName
+ << " macro. Running moc on "
<< "\"" << headerToMoc << "\" ! Include \"moc_"
<< basename << ".cpp\" for a compatiblity with "
"strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n"
@@ -965,13 +978,14 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
// If this is the case, the moc_foo.cpp should probably be generated from
// foo.cpp instead of foo.h, because otherwise it won't build.
// But warn, since this is not how it is supposed to be used.
- if ((dotMocIncluded == false) && (cppContainsQ_OBJECT == true))
+ if ((dotMocIncluded == false) && (requiresMoc == true))
{
if (mocUnderscoreIncluded == true)
{
// this is for KDE4 compatibility:
std::cerr << "AUTOMOC: warning: " << absFilename << ": The file "
- << "contains a Q_OBJECT macro, but does not include "
+ << "contains a " << macroName << " macro, but does not "
+ "include "
<< "\"" << scannedFileBasename << ".moc\", but instead "
"includes "
<< "\"" << ownMocUnderscoreFile << "\". Running moc on "
@@ -986,7 +1000,8 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
{
// otherwise always error out since it will not compile:
std::cerr << "AUTOMOC: error: " << absFilename << ": The file "
- << "contains a Q_OBJECT macro, but does not include "
+ << "contains a " << macroName << " macro, but does not "
+ "include "
<< "\"" << scannedFileBasename << ".moc\" !\n"
<< std::endl;
::exit(EXIT_FAILURE);
@@ -1094,11 +1109,13 @@ void cmQtAutomoc::StrictParseCppFile(const std::string& absFilename,
// If this is the case, the moc_foo.cpp should probably be generated from
// foo.cpp instead of foo.h, because otherwise it won't build.
// But warn, since this is not how it is supposed to be used.
- if ((dotMocIncluded == false) && (containsQ_OBJECT(contentsString)))
+ std::string macroName;
+ if ((dotMocIncluded == false) && (requiresMocing(contentsString,
+ macroName)))
{
// otherwise always error out since it will not compile:
std::cerr << "AUTOMOC: error: " << absFilename << ": The file "
- << "contains a Q_OBJECT macro, but does not include "
+ << "contains a " << macroName << " macro, but does not include "
<< "\"" << scannedFileBasename << ".moc\" !\n"
<< std::endl;
::exit(EXIT_FAILURE);
@@ -1165,7 +1182,8 @@ void cmQtAutomoc::ParseHeaders(const std::set<std::string>& absHeaders,
const std::string currentMoc = "moc_" + basename + ".cpp";
const std::string contents = this->ReadAll(headerName);
- if (containsQ_OBJECT(contents))
+ std::string macroName;
+ if (requiresMocing(contents, macroName))
{
//std::cout << "header contains Q_OBJECT macro";
notIncludedMocs[headerName] = currentMoc;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 13cd006..8ccd19c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -924,7 +924,10 @@ void cmTarget::DefineProperties(cmake *cm)
"The first configuration in the list found to be provided by the "
"imported target is selected. If this property is set and no matching "
"configurations are available, then the imported target is considered "
- "to be not found. This property is ignored for non-imported targets.",
+ "to be not found. This property is ignored for non-imported targets.\n"
+ "This property is initialized by the value of the variable "
+ "CMAKE_MAP_IMPORTED_CONFIG_<CONFIG> if it is set when a target is "
+ "created.",
false /* TODO: make this chained */ );
cm->DefineProperty
@@ -1617,7 +1620,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
this->IsApple = this->Makefile->IsOn("APPLE");
// Setup default property values.
- this->SetPropertyDefault("INSTALL_NAME_DIR", "");
+ this->SetPropertyDefault("INSTALL_NAME_DIR", 0);
this->SetPropertyDefault("INSTALL_RPATH", "");
this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF");
this->SetPropertyDefault("SKIP_BUILD_RPATH", "OFF");
@@ -1649,6 +1652,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
"LIBRARY_OUTPUT_DIRECTORY_",
"RUNTIME_OUTPUT_DIRECTORY_",
"PDB_OUTPUT_DIRECTORY_",
+ "MAP_IMPORTED_CONFIG_",
0};
for(std::vector<std::string>::iterator ci = configNames.begin();
ci != configNames.end(); ++ci)
@@ -3303,7 +3307,10 @@ static void processIncludeDirectories(cmTarget *tgt,
if (!noMessage)
{
tgt->GetMakefile()->IssueMessage(messageType, e.str().c_str());
- return;
+ if (messageType == cmake::FATAL_ERROR)
+ {
+ return;
+ }
}
}
@@ -4567,6 +4574,10 @@ bool cmTarget::HasMacOSXRpath(const char* config)
{
install_name_is_rpath = true;
}
+ else if(install_name && use_install_name)
+ {
+ return false;
+ }
}
else
{
@@ -5299,18 +5310,18 @@ std::string cmTarget::GetInstallNameDirForInstallTree()
if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
{
std::string dir;
+ const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
if(!this->Makefile->IsOn("CMAKE_SKIP_RPATH") &&
!this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH"))
{
- const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
if(install_name_dir && *install_name_dir)
{
dir = install_name_dir;
dir += "/";
}
}
- if(dir.empty() && this->GetPropertyAsBool("MACOSX_RPATH"))
+ if(!install_name_dir && this->GetPropertyAsBool("MACOSX_RPATH"))
{
dir = "@rpath/";
}
@@ -6436,7 +6447,13 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
<< "Target \"" << this->GetName() << "\" has a "
"INTERFACE_LINK_LIBRARIES property which differs from its "
- << linkIfaceProp << " properties.";
+ << linkIfaceProp << " properties."
+ "\n"
+ "INTERFACE_LINK_LIBRARIES:\n "
+ << newExplicitLibraries
+ << "\n"
+ << linkIfaceProp << ":\n "
+ << (explicitLibraries ? explicitLibraries : "(empty)") << "\n";
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
// Fall through
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ea05347..a26b291 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -216,12 +216,16 @@ void cmVisualStudio10TargetGenerator::Generate()
// Write the encoding header into the file
char magic[] = {0xEF,0xBB, 0xBF};
this->BuildFileStream->write(magic, 3);
- this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",0);
- this->WriteString("<Project DefaultTargets=\"Build\" "
- "ToolsVersion=\"4.0\" "
- "xmlns=\"http://schemas.microsoft.com/"
- "developer/msbuild/2003\">\n",
- 0);
+
+ //get the tools version to use
+ const std::string toolsVer(this->GlobalGenerator->GetToolsVersion());
+ std::string project_defaults="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+ project_defaults.append("<Project DefaultTargets=\"Build\" ToolsVersion=\"");
+ project_defaults.append(toolsVer +"\" ");
+ project_defaults.append(
+ "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n");
+ this->WriteString(project_defaults.c_str(),0);
+
this->WriteProjectConfigurations();
this->WriteString("<PropertyGroup Label=\"Globals\">\n", 1);
this->WriteString("<ProjectGUID>", 2);
@@ -716,12 +720,16 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
fout.write(magic, 3);
cmGeneratedFileStream* save = this->BuildFileStream;
this->BuildFileStream = & fout;
- this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
- "<Project "
- "ToolsVersion=\"4.0\" "
- "xmlns=\"http://schemas.microsoft.com/"
- "developer/msbuild/2003\">\n",
- 0);
+
+ //get the tools version to use
+ const std::string toolsVer(this->GlobalGenerator->GetToolsVersion());
+ std::string project_defaults="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+ project_defaults.append("<Project ToolsVersion=\"");
+ project_defaults.append(toolsVer +"\" ");
+ project_defaults.append(
+ "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n");
+ this->WriteString(project_defaults.c_str(),0);
+
for(ToolSourceMap::const_iterator ti = this->Tools.begin();
ti != this->Tools.end(); ++ti)
{
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 290aff0..8b8cb01 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2437,11 +2437,6 @@ int cmake::ActualConfigure()
{
this->CacheManager->SaveCache(this->GetHomeOutputDirectory());
}
- if ( !this->GraphVizFile.empty() )
- {
- std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;
- this->GenerateGraphViz(this->GraphVizFile.c_str());
- }
if(cmSystemTools::GetErrorOccuredFlag())
{
return -1;
@@ -2604,6 +2599,11 @@ int cmake::Generate()
return -1;
}
this->GlobalGenerator->Generate();
+ if ( !this->GraphVizFile.empty() )
+ {
+ std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;
+ this->GenerateGraphViz(this->GraphVizFile.c_str());
+ }
if(this->WarnUnusedCli)
{
this->RunCheckForUnusedVariables();
diff --git a/Tests/Architecture/CMakeLists.txt b/Tests/Architecture/CMakeLists.txt
index 927ce3f..ea5fc0b 100644
--- a/Tests/Architecture/CMakeLists.txt
+++ b/Tests/Architecture/CMakeLists.txt
@@ -7,8 +7,8 @@ function(test_for_xcode4 result_var)
execute_process(COMMAND xcodebuild -version
OUTPUT_VARIABLE ov RESULT_VARIABLE rv
)
- if("${rv}" STREQUAL "0")
- if(ov MATCHES "^Xcode 4.[0-9].*$")
+ if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.")
+ if(NOT CMAKE_MATCH_1 VERSION_LESS 4)
set(${result_var} 1 PARENT_SCOPE)
endif()
endif()
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 3af0fda..0687154 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -285,6 +285,8 @@ if(EXISTS "${link_depends_no_shared_check_txt}")
file(STRINGS "${link_depends_no_shared_check_txt}" link_depends_no_shared_check LIMIT_COUNT 1)
if("${link_depends_no_shared_check}" STREQUAL "0")
message(STATUS "link_depends_no_shared_exe is older than link_depends_no_shared_lib as expected.")
+ elseif(XCODE AND NOT XCODE_VERSION VERSION_LESS 5)
+ message(STATUS "Known limitation: link_depends_no_shared_exe is newer than link_depends_no_shared_lib but we cannot stop Xcode ${XCODE_VERSION} from enforcing this dependency.")
else()
message(SEND_ERROR "Project did not rebuild properly: link_depends_no_shared_exe is newer than link_depends_no_shared_lib.")
endif()
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index b4c6a07..8806ecd 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -7,8 +7,8 @@ function(test_for_xcode4 result_var)
execute_process(COMMAND xcodebuild -version
OUTPUT_VARIABLE ov RESULT_VARIABLE rv
)
- if("${rv}" STREQUAL "0")
- if(ov MATCHES "^Xcode 4.[0-9].*$")
+ if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.")
+ if(NOT CMAKE_MATCH_1 VERSION_LESS 4)
set(${result_var} 1 PARENT_SCOPE)
endif()
endif()
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
index 739593c..691728a 100644
--- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -22,11 +22,18 @@ endmacro()
set(DESIRED_QT_VERSION 4)
set(NO_QT4_MODULES "Qt3" "KDE3")
+# ignore everything that has it's own test in Tests/Module/
+file(GLOB OWN_TEST_MODULES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../../Module/" "${CMAKE_CURRENT_SOURCE_DIR}/../../Module/Find*")
+foreach(FIND_MODULE IN LISTS OWN_TEST_MODULES)
+ string(REGEX REPLACE "^Find" "" _MOD_NAME "${FIND_MODULE}")
+ list(APPEND NO_FIND_MODULES "${_MOD_NAME}")
+endforeach()
+
# These modules are named Find*.cmake, but are nothing that works in
# find_package().
-set(NO_FIND_MODULES "PackageHandleStandardArgs" "PackageMessage")
+list(APPEND NO_FIND_MODULES "PackageHandleStandardArgs" "PackageMessage")
-foreach(FIND_MODULE ${FIND_MODULES})
+foreach(FIND_MODULE IN LISTS FIND_MODULES)
string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}")
list(FIND NO_QT4_MODULES ${MODULE_NAME} NO_QT4_INDEX)
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index 344b772..4c49c6a 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -55,6 +55,15 @@ set(GetPrerequisites_PreArgs
)
AddCMakeTest(GetPrerequisites "${GetPrerequisites_PreArgs}")
+if(GIT_EXECUTABLE)
+ set(PolicyCheck_PreArgs
+ "-DCMake_BINARY_DIR:PATH=${CMake_BINARY_DIR}"
+ "-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
+ "-DGIT_EXECUTABLE:STRING=${GIT_EXECUTABLE}"
+ )
+ AddCMakeTest(PolicyCheck "${PolicyCheck_PreArgs}")
+endif()
+
# Run CheckSourceTree as the very last test in the CMake/CTest/CPack test
# suite. It detects if any changes have been made to the CMake source tree
# by any previous configure, build or test steps.
diff --git a/Tests/CMakeTests/PolicyCheckTest.cmake.in b/Tests/CMakeTests/PolicyCheckTest.cmake.in
new file mode 100644
index 0000000..416dc0a
--- /dev/null
+++ b/Tests/CMakeTests/PolicyCheckTest.cmake.in
@@ -0,0 +1,154 @@
+# Check the CMake source tree for suspicious policy introdcutions...
+#
+message("=============================================================================")
+message("CTEST_FULL_OUTPUT (Avoid ctest truncation of output)")
+message("")
+message("CMake_BINARY_DIR='${CMake_BINARY_DIR}'")
+message("CMake_SOURCE_DIR='${CMake_SOURCE_DIR}'")
+message("GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
+message("")
+
+
+# If this does not appear to be a git checkout, just pass the test here
+# and now. (Do not let the test fail if it is run in a tree *exported* from a
+# repository or unpacked from a .zip file source installer...)
+#
+set(is_git_checkout 0)
+if(EXISTS "${CMake_SOURCE_DIR}/.git")
+ set(is_git_checkout 1)
+endif()
+
+message("is_git_checkout='${is_git_checkout}'")
+message("")
+
+if(NOT is_git_checkout)
+ message("source tree is not a git checkout... test passes by early return...")
+ return()
+endif()
+
+# If no GIT_EXECUTABLE, see if we can figure out which git was used
+# for the ctest_update step on this dashboard...
+#
+if(is_git_checkout AND NOT GIT_EXECUTABLE)
+ set(ctest_ini_file "")
+ set(exe "")
+
+ # Use the old name:
+ if(EXISTS "${CMake_BINARY_DIR}/DartConfiguration.tcl")
+ set(ctest_ini_file "${CMake_BINARY_DIR}/DartConfiguration.tcl")
+ endif()
+
+ # But if it exists, prefer the new name:
+ if(EXISTS "${CMake_BINARY_DIR}/CTestConfiguration.ini")
+ set(ctest_ini_file "${CMake_BINARY_DIR}/CTestConfiguration.ini")
+ endif()
+
+ # If there is a ctest ini file, read the update command or git command
+ # from it:
+ #
+ if(ctest_ini_file)
+ file(STRINGS "${ctest_ini_file}" line REGEX "^GITCommand: (.*)$")
+ string(REGEX REPLACE "^GITCommand: (.*)$" "\\1" line "${line}")
+ if("${line}" MATCHES "^\"")
+ string(REGEX REPLACE "^\"([^\"]+)\" *.*$" "\\1" line "${line}")
+ else()
+ string(REGEX REPLACE "^([^ ]+) *.*$" "\\1" line "${line}")
+ endif()
+ set(exe "${line}")
+ if("${exe}" STREQUAL "GITCOMMAND-NOTFOUND")
+ set(exe "")
+ endif()
+ if(exe)
+ message("info: GIT_EXECUTABLE set by 'GITCommand:' from '${ctest_ini_file}'")
+ endif()
+
+ if(NOT exe)
+ file(STRINGS "${ctest_ini_file}" line REGEX "^UpdateCommand: (.*)$")
+ string(REGEX REPLACE "^UpdateCommand: (.*)$" "\\1" line "${line}")
+ if("${line}" MATCHES "^\"")
+ string(REGEX REPLACE "^\"([^\"]+)\" *.*$" "\\1" line "${line}")
+ else()
+ string(REGEX REPLACE "^([^ ]+) *.*$" "\\1" line "${line}")
+ endif()
+ set(exe "${line}")
+ if("${exe}" STREQUAL "GITCOMMAND-NOTFOUND")
+ set(exe "")
+ endif()
+ if(exe)
+ message("info: GIT_EXECUTABLE set by 'UpdateCommand:' from '${ctest_ini_file}'")
+ endif()
+ endif()
+ else()
+ message("info: no DartConfiguration.tcl or CTestConfiguration.ini file...")
+ endif()
+
+ # If we have still not grokked the exe, look in the Update.xml file to see
+ # if we can parse it from there...
+ #
+ if(NOT exe)
+ file(GLOB_RECURSE update_xml_file "${CMake_BINARY_DIR}/Testing/Update.xml")
+ if(update_xml_file)
+ file(STRINGS "${update_xml_file}" line
+ REGEX "^.*<UpdateCommand>(.*)</UpdateCommand>$" LIMIT_COUNT 1)
+ string(REPLACE "&quot\;" "\"" line "${line}")
+ string(REGEX REPLACE "^.*<UpdateCommand>(.*)</UpdateCommand>$" "\\1" line "${line}")
+ if("${line}" MATCHES "^\"")
+ string(REGEX REPLACE "^\"([^\"]+)\" *.*$" "\\1" line "${line}")
+ else()
+ string(REGEX REPLACE "^([^ ]+) *.*$" "\\1" line "${line}")
+ endif()
+ if(line)
+ set(exe "${line}")
+ endif()
+ if(exe)
+ message("info: GIT_EXECUTABLE set by '<UpdateCommand>' from '${update_xml_file}'")
+ endif()
+ else()
+ message("info: no Update.xml file...")
+ endif()
+ endif()
+
+ if(exe)
+ set(GIT_EXECUTABLE "${exe}")
+ message("GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
+ message("")
+
+ if(NOT EXISTS "${GIT_EXECUTABLE}")
+ message(FATAL_ERROR "GIT_EXECUTABLE does not exist...")
+ endif()
+ else()
+ message(FATAL_ERROR "could not determine GIT_EXECUTABLE...")
+ endif()
+endif()
+
+
+if(is_git_checkout AND GIT_EXECUTABLE)
+ # Check with "git grep" if there are any unacceptable cmPolicies additions
+ #
+ message("=============================================================================")
+ message("This is a git checkout, using git grep to verify no unacceptable policies")
+ message("are being introduced....")
+ message("")
+
+ execute_process(COMMAND ${GIT_EXECUTABLE} grep -En "[0-9][0-9][0-9][0-9][0-9].*cmPolicies"
+ WORKING_DIRECTORY ${CMake_SOURCE_DIR}
+ OUTPUT_VARIABLE grep_output
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message("=== output of 'git grep -En \"[0-9][0-9][0-9][0-9][0-9].*cmPolicies\"' ===")
+ message("${grep_output}")
+ message("=== end output ===")
+ message("")
+
+ if(NOT "${grep_output}" STREQUAL "")
+ message(FATAL_ERROR "git grep output is non-empty...
+New CMake policies must be introduced in a non-date-based version number.
+Send email to the cmake-developers list to figure out what the target
+version number for this policy should be...")
+ endif()
+endif()
+
+
+# Still here? Good then...
+#
+message("test passes")
+message("")
diff --git a/Tests/Contracts/Trilinos-10-6/CMakeLists.txt b/Tests/Contracts/Trilinos/CMakeLists.txt
index 79ed669..f5757b5 100644
--- a/Tests/Contracts/Trilinos-10-6/CMakeLists.txt
+++ b/Tests/Contracts/Trilinos/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8)
-project(Trilinos-10-6)
+project(Trilinos)
include(ExternalProject)
@@ -27,12 +27,12 @@ endif()
message(STATUS "HOME='${HOME}'")
if(NOT DEFINED url)
- set(url "http://www.cmake.org/files/contracts/trilinos-10.6.1.tar.gz")
+ set(url "http://www.cmake.org/files/contracts/trilinos-11.4.1.tar.gz")
endif()
message(STATUS "url='${url}'")
if(NOT DEFINED md5)
- set(md5 "690230465dd21a76e3c6636fd07bd2f0")
+ set(md5 "28b6a3c7c0fb317b3a237997293faa8b")
endif()
message(STATUS "md5='${md5}'")
diff --git a/Tests/Contracts/Trilinos-10-6/Dashboard.cmake.in b/Tests/Contracts/Trilinos/Dashboard.cmake.in
index cc29502..93d4f61 100644
--- a/Tests/Contracts/Trilinos-10-6/Dashboard.cmake.in
+++ b/Tests/Contracts/Trilinos/Dashboard.cmake.in
@@ -14,7 +14,7 @@ set(ENV{CTEST_SITE} "${CTEST_SITE}")
# Allow override of the environment on a per-client basis:
#
-set(ENV_SCRIPT "$ENV{CMAKE_CONTRACT_Trilinos_10_6_ENV_SCRIPT}")
+set(ENV_SCRIPT "$ENV{CMAKE_CONTRACT_Trilinos_ENV_SCRIPT}")
if(ENV_SCRIPT AND EXISTS "${ENV_SCRIPT}")
include("${ENV_SCRIPT}")
endif()
@@ -49,7 +49,7 @@ endif()
#
execute_process(COMMAND
"${CMAKE_CTEST_COMMAND}"
- -S "${CTEST_SOURCE_DIRECTORY}/cmake/ctest/experimental_build_test.cmake"
+ -S "${CTEST_SOURCE_DIRECTORY}/cmake/tribits/ctest/experimental_build_test.cmake"
-VV
WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
RESULT_VARIABLE rv
diff --git a/Tests/Contracts/Trilinos-10-6/EnvScript.cmake b/Tests/Contracts/Trilinos/EnvScript.cmake
index dacb704..dacb704 100644
--- a/Tests/Contracts/Trilinos-10-6/EnvScript.cmake
+++ b/Tests/Contracts/Trilinos/EnvScript.cmake
diff --git a/Tests/Contracts/Trilinos-10-6/Patch.cmake b/Tests/Contracts/Trilinos/Patch.cmake
index 6c619ac..6c619ac 100644
--- a/Tests/Contracts/Trilinos-10-6/Patch.cmake
+++ b/Tests/Contracts/Trilinos/Patch.cmake
diff --git a/Tests/Contracts/Trilinos-10-6/RunTest.cmake b/Tests/Contracts/Trilinos/RunTest.cmake
index 30124d8..d661a4c 100644
--- a/Tests/Contracts/Trilinos-10-6/RunTest.cmake
+++ b/Tests/Contracts/Trilinos/RunTest.cmake
@@ -4,4 +4,4 @@ set(dir "${CMAKE_CURRENT_BINARY_DIR}/Contracts/${project}")
set(exe "${CMAKE_COMMAND}")
set(args -P "${dir}/ValidateBuild.cmake")
-set(Trilinos-10-6_RUN_TEST ${exe} ${args})
+set(Trilinos_RUN_TEST ${exe} ${args})
diff --git a/Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in b/Tests/Contracts/Trilinos/ValidateBuild.cmake.in
index 04bbf21..fa38ada 100644
--- a/Tests/Contracts/Trilinos-10-6/ValidateBuild.cmake.in
+++ b/Tests/Contracts/Trilinos/ValidateBuild.cmake.in
@@ -20,10 +20,10 @@ message(STATUS "Found len='${len}' *.exe files")
# Try to find the Teuchos unit tests executable:
#
-file(GLOB_RECURSE exe "${binary_dir}/Teuchos_UnitTest_UnitTests.exe")
+file(GLOB_RECURSE exe "${binary_dir}/TeuchosCore_UnitTest_UnitTests.exe")
list(LENGTH exe len)
if(NOT len EQUAL 1)
- message(FATAL_ERROR "len='${len}' is not the expected='1' (count of Teuchos_UnitTest_UnitTests.exe)")
+ message(FATAL_ERROR "len='${len}' is not the expected='1' (count of TeuchosCore_UnitTest_UnitTests.exe)")
endif()
message(STATUS "Found exe='${exe}'")
@@ -31,7 +31,7 @@ message(STATUS "Found exe='${exe}'")
# Try to run it:
execute_process(COMMAND ${exe} RESULT_VARIABLE rv)
if(NOT "${rv}" STREQUAL "0")
- message(FATAL_ERROR "rv='${rv}' is not the expected='0' (result of running Teuchos_UnitTest_UnitTests.exe)")
+ message(FATAL_ERROR "rv='${rv}' is not the expected='0' (result of running TeuchosCore_UnitTest_UnitTests.exe)")
endif()
message(STATUS "Ran exe='${exe}' rv='${rv}'")
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index b5b2027..72ae78f 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -159,7 +159,7 @@ set_property(TARGET testLibRequired APPEND PROPERTY
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
# Test that the below is non-fatal
$<$<STREQUAL:one,two>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
- $<INSTALL_INTERFACE:include/testLibIncludeRequired7>
+ $<INSTALL_INTERFACE:include/testLibIncludeRequired7;include/testLibIncludeRequired4>
)
set_property(TARGET testLibRequired APPEND PROPERTY
@@ -213,6 +213,34 @@ set_property(TARGET testSharedLibRequired APPEND PROPERTY
$<$<CXX_COMPILER_ID:GNU>:-DCUSTOM_COMPILE_OPTION>
)
+add_library(testSharedLibRequiredUser SHARED testSharedLibRequiredUser.cpp)
+generate_export_header(testSharedLibRequiredUser)
+# LINK_PRIVATE so that it appears in the LINK_DEPENDENT_LIBRARIES, but not
+# the INTERFACE_LINK_LIBRARIES.
+set_property(TARGET testSharedLibRequiredUser APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
+)
+target_link_libraries(testSharedLibRequiredUser LINK_PRIVATE testSharedLibRequired)
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/testSharedLibRequiredUser.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibrequireduser_export.h"
+ DESTINATION include/testSharedLibRequiredUser
+)
+
+cmake_policy(SET CMP0022 NEW)
+add_library(testSharedLibRequiredUser2 SHARED testSharedLibRequiredUser2.cpp)
+generate_export_header(testSharedLibRequiredUser2)
+set_property(TARGET testSharedLibRequiredUser2 APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
+)
+set_property(TARGET testSharedLibRequiredUser2 PROPERTY LINK_LIBRARIES testSharedLibRequired)
+set_property(TARGET testSharedLibRequiredUser2 PROPERTY INTERFACE_LINK_LIBRARIES testSharedLibRequired)
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/testSharedLibRequiredUser2.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibrequireduser2_export.h"
+ DESTINATION include/testSharedLibRequiredUser2
+)
+cmake_policy(SET CMP0022 OLD)
add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp)
set_property(TARGET testSharedLibDepends APPEND PROPERTY
@@ -284,6 +312,8 @@ install(TARGETS
testLibIncludeRequired5
testLibIncludeRequired6
testSharedLibRequired
+ testSharedLibRequiredUser
+ testSharedLibRequiredUser2
noIncludesInterface
EXPORT RequiredExp DESTINATION lib
INCLUDES DESTINATION
@@ -384,7 +414,8 @@ add_subdirectory(sublib) # For CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE test.
# Export from build tree.
export(TARGETS testExe1 testLib1 testLib2 testLib3
testExe2libImp testLib3Imp testLib3ImpDep subdirlib
- testSharedLibRequired testSharedLibDepends renamed_on_export
+ testSharedLibRequired testSharedLibRequiredUser testSharedLibRequiredUser2
+ testSharedLibDepends renamed_on_export
cmp0022NEW cmp0022OLD
NAMESPACE bld_
FILE ExportBuildTree.cmake
diff --git a/Tests/ExportImport/Export/testSharedLibRequiredUser.cpp b/Tests/ExportImport/Export/testSharedLibRequiredUser.cpp
new file mode 100644
index 0000000..5580005
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibRequiredUser.cpp
@@ -0,0 +1,10 @@
+
+#include "testSharedLibRequiredUser.h"
+
+#include "testSharedLibRequired.h"
+
+int TestSharedLibRequiredUser::foo()
+{
+ TestSharedLibRequired req;
+ return req.foo();
+}
diff --git a/Tests/ExportImport/Export/testSharedLibRequiredUser.h b/Tests/ExportImport/Export/testSharedLibRequiredUser.h
new file mode 100644
index 0000000..58bcaa5
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibRequiredUser.h
@@ -0,0 +1,12 @@
+
+#ifndef TESTSHAREDLIBREQUIREDUSER_H
+#define TESTSHAREDLIBREQUIREDUSER_H
+
+#include "testsharedlibrequireduser_export.h"
+
+struct TESTSHAREDLIBREQUIREDUSER_EXPORT TestSharedLibRequiredUser
+{
+ int foo();
+};
+
+#endif
diff --git a/Tests/ExportImport/Export/testSharedLibRequiredUser2.cpp b/Tests/ExportImport/Export/testSharedLibRequiredUser2.cpp
new file mode 100644
index 0000000..d671bf0
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibRequiredUser2.cpp
@@ -0,0 +1,8 @@
+
+#include "testSharedLibRequiredUser2.h"
+
+TestSharedLibRequired TestSharedLibRequiredUser2::foo()
+{
+ TestSharedLibRequired req;
+ return req;
+}
diff --git a/Tests/ExportImport/Export/testSharedLibRequiredUser2.h b/Tests/ExportImport/Export/testSharedLibRequiredUser2.h
new file mode 100644
index 0000000..a132940
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibRequiredUser2.h
@@ -0,0 +1,14 @@
+
+#ifndef TESTSHAREDLIBREQUIREDUSER2_H
+#define TESTSHAREDLIBREQUIREDUSER2_H
+
+#include "testsharedlibrequireduser2_export.h"
+
+#include "testSharedLibRequired.h"
+
+struct TESTSHAREDLIBREQUIREDUSER2_EXPORT TestSharedLibRequiredUser2
+{
+ TestSharedLibRequired foo();
+};
+
+#endif
diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
index 5600dff..1088461 100644
--- a/Tests/ExportImport/Import/try_compile/CMakeLists.txt
+++ b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
@@ -5,17 +5,32 @@ find_package(testLibRequired 2.5 REQUIRED)
include(CheckCXXSourceCompiles)
-set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequired)
+set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequiredUser)
check_cxx_source_compiles(
"
-#include \"testSharedLibRequired.h\"
+#include \"testSharedLibRequiredUser.h\"
int main(int argc, char **argv)
{
- TestSharedLibRequired req;
- return req.foo();
+ TestSharedLibRequiredUser user;
+ return user.foo();
}
-" SHARED_LIB_REQUIRED)
+" SHARED_LIB_DEPENDS)
-if(NOT SHARED_LIB_REQUIRED)
+if(NOT SHARED_LIB_DEPENDS)
+ message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}")
+endif()
+
+set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequiredUser2)
+check_cxx_source_compiles(
+ "
+#include \"testSharedLibRequiredUser2.h\"
+int main(int argc, char **argv)
+{
+ TestSharedLibRequiredUser2 user;
+ return user.foo().foo();
+}
+" SHARED_LIB_DEPENDS2)
+
+if(NOT SHARED_LIB_DEPENDS2)
message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}")
endif()
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 9ee4fc5..47e7882 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -184,6 +184,13 @@ add_custom_target(check-part3 ALL
-Dtest_alias_file_exe=$<STREQUAL:$<TARGET_FILE:Alias::SomeExe>,$<TARGET_FILE:someexe>>
-Dtest_alias_file_lib=$<STREQUAL:$<TARGET_FILE:Alias::SomeLib>,$<TARGET_FILE:empty1>>
-Dtest_alias_target_name=$<STREQUAL:$<TARGET_PROPERTY:Alias::SomeLib,NAME>,$<TARGET_PROPERTY:empty1,NAME>>
+ -Dtest_early_termination_1=$<$<1:>:
+ -Dtest_early_termination_2=$<$<1:>:,
+ -Dsystem_name=${CMAKE_HOST_SYSTEM_NAME}
+ -Dtest_platform_id=$<PLATFORM_ID>
+ -Dtest_platform_id_Linux=$<PLATFORM_ID:Linux>
+ -Dtest_platform_id_Windows=$<PLATFORM_ID:Windows>
+ -Dtest_platform_id_Darwin=$<PLATFORM_ID:Darwin>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part3.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 3)"
VERBATIM
diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake
index 5a6a441..93ea487 100644
--- a/Tests/GeneratorExpression/check-part3.cmake
+++ b/Tests/GeneratorExpression/check-part3.cmake
@@ -24,3 +24,13 @@ endforeach()
check(test_alias_file_exe "1")
check(test_alias_file_lib "1")
check(test_alias_target_name "1")
+check(test_early_termination_1 "$<:")
+check(test_early_termination_2 "$<:,")
+check(test_platform_id "${system_name}")
+foreach(system Linux Windows Darwin)
+ if(system_name STREQUAL system)
+ check(test_platform_id_${system} 1)
+ else()
+ check(test_platform_id_${system} 0)
+ endif()
+endforeach()
diff --git a/Tests/IncludeDirectories/CMP0021/CMakeLists.txt b/Tests/IncludeDirectories/CMP0021/CMakeLists.txt
new file mode 100644
index 0000000..0b9aee8
--- /dev/null
+++ b/Tests/IncludeDirectories/CMP0021/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+cmake_policy(SET CMP0021 OLD)
+add_executable(cmp0021exe main.cpp)
+
+if(NOT CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/includes")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E
+ copy_directory
+ "${CMAKE_CURRENT_SOURCE_DIR}/includes"
+ "${CMAKE_CURRENT_BINARY_DIR}/includes"
+ )
+endif()
+set_property(TARGET cmp0021exe PROPERTY
+ INCLUDE_DIRECTORIES includes/cmp0021)
diff --git a/Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h b/Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h
new file mode 100644
index 0000000..3d49b31
--- /dev/null
+++ b/Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h
@@ -0,0 +1,2 @@
+
+#define CMP0021_DEFINE
diff --git a/Tests/IncludeDirectories/CMP0021/main.cpp b/Tests/IncludeDirectories/CMP0021/main.cpp
new file mode 100644
index 0000000..f886c46
--- /dev/null
+++ b/Tests/IncludeDirectories/CMP0021/main.cpp
@@ -0,0 +1,11 @@
+
+#include "cmp0021.h"
+
+#ifndef CMP0021_DEFINE
+#error Expected CMP0021_DEFINE
+#endif
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index 596a280..35ad8dc 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -86,3 +86,7 @@ get_target_property(incs empty_entry_test INCLUDE_DIRECTORIES)
if (NOT incs STREQUAL ";/one/two")
message(SEND_ERROR "Empty include_directories entry was not ignored.")
endif()
+
+if(NOT CMAKE_GENERATOR STREQUAL Xcode AND NOT CMAKE_GENERATOR STREQUAL Ninja)
+ add_subdirectory(CMP0021)
+endif()
diff --git a/Tests/MakeClean/ToClean/CMakeLists.txt b/Tests/MakeClean/ToClean/CMakeLists.txt
index 28569dd..37d7292 100644
--- a/Tests/MakeClean/ToClean/CMakeLists.txt
+++ b/Tests/MakeClean/ToClean/CMakeLists.txt
@@ -26,6 +26,18 @@ add_custom_command(OUTPUT ${ToClean_BINARY_DIR}/generated.txt
add_custom_target(generate ALL DEPENDS ${ToClean_BINARY_DIR}/generated.txt)
set(TOCLEAN_FILES ${TOCLEAN_FILES} "${ToClean_BINARY_DIR}/generated.txt")
+# Create a custom command whose output should be cleaned, but whose name
+# is not known until generate-time
+set(copied_exe "$<TARGET_FILE_DIR:toclean>/toclean_copy${CMAKE_EXECUTABLE_SUFFIX}")
+add_custom_command(TARGET toclean POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy $<TARGET_FILE:toclean>
+ ${copied_exe}
+ )
+set_property(DIRECTORY APPEND PROPERTY
+ ADDITIONAL_MAKE_CLEAN_FILES ${copied_exe})
+list(APPEND TOCLEAN_FILES "${ToClean_BINARY_DIR}/toclean_copy${CMAKE_EXECUTABLE_SUFFIX}")
+
# Configure a file listing these build-time-generated files.
configure_file(${ToClean_SOURCE_DIR}/ToCleanFiles.cmake.in
${ToClean_BINARY_DIR}/ToCleanFiles.cmake @ONLY IMMEDIATE)
diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt
index 69e52ac..8ad693a 100644
--- a/Tests/QtAutomoc/CMakeLists.txt
+++ b/Tests/QtAutomoc/CMakeLists.txt
@@ -41,7 +41,7 @@ add_library(codeeditorLib STATIC codeeditor.cpp)
add_library(privateSlot OBJECT private_slot.cpp)
add_executable(foo main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp
- xyz.cpp yaf.cpp $<TARGET_OBJECTS:privateSlot>)
+ xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot>)
set_target_properties(foo codeeditorLib privateSlot PROPERTIES AUTOMOC TRUE)
diff --git a/Tests/QtAutomoc/gadget.cpp b/Tests/QtAutomoc/gadget.cpp
new file mode 100644
index 0000000..23d95fa
--- /dev/null
+++ b/Tests/QtAutomoc/gadget.cpp
@@ -0,0 +1,4 @@
+
+#include "gadget.h"
+
+#include "moc_gadget.cpp"
diff --git a/Tests/QtAutomoc/gadget.h b/Tests/QtAutomoc/gadget.h
new file mode 100644
index 0000000..7c688ee
--- /dev/null
+++ b/Tests/QtAutomoc/gadget.h
@@ -0,0 +1,18 @@
+
+#ifndef GADGET_H
+#define GADGET_H
+
+#include <QObject>
+
+class Gadget
+{
+ Q_GADGET
+ Q_ENUMS(Type)
+public:
+ enum Type {
+ Type0,
+ Type1
+ };
+};
+
+#endif
diff --git a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
index 7c61961..f42d8e4 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
+++ b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
cmake_policy(SET CMP0004 NEW)
diff --git a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
index d6ed72c..3fa58b6 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
+++ b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
cmake_policy(SET CMP0004 OLD)
diff --git a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
index eab680a..2970476 100644
--- a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
+++ b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
cmake_policy(SET CMP0004 NEW)
diff --git a/Tests/RunCMake/CMP0004/CMakeLists.txt b/Tests/RunCMake/CMP0004/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/CMP0004/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0004/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0019/CMakeLists.txt b/Tests/RunCMake/CMP0019/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/CMP0019/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0019/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
index 29103c9..93c0ab3 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
@@ -5,4 +5,13 @@ CMake Warning \(dev\) in CMakeLists.txt:
Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
LINK_INTERFACE_LIBRARIES properties.
+
+ INTERFACE_LINK_LIBRARIES:
+
+ foo
+
+ LINK_INTERFACE_LIBRARIES:
+
+ bat
+
This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
index 5a5ad27..6370b24 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
@@ -5,4 +5,13 @@ CMake Warning \(dev\) in CMakeLists.txt:
Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
LINK_INTERFACE_LIBRARIES properties.
+
+ INTERFACE_LINK_LIBRARIES:
+
+ foo
+
+ LINK_INTERFACE_LIBRARIES:
+
+ bat
+
This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CTest/CMakeLists.txt b/Tests/RunCMake/CTest/CMakeLists.txt
index f6e84c0..73e6a78 100644
--- a/Tests/RunCMake/CTest/CMakeLists.txt
+++ b/Tests/RunCMake/CTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
index 68dd8d6..f452db1 100644
--- a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
+++ b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompilerChange/CMakeLists.txt b/Tests/RunCMake/CompilerChange/CMakeLists.txt
index 3b92518..b4b3016 100644
--- a/Tests/RunCMake/CompilerChange/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerChange/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
if(NOT RunCMake_TEST)
set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted
endif()
diff --git a/Tests/RunCMake/Configure/CMakeLists.txt b/Tests/RunCMake/Configure/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/Configure/CMakeLists.txt
+++ b/Tests/RunCMake/Configure/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Configure/FailCopyFileABI-check.cmake b/Tests/RunCMake/Configure/FailCopyFileABI-check.cmake
index c439aac..db0cb0a 100644
--- a/Tests/RunCMake/Configure/FailCopyFileABI-check.cmake
+++ b/Tests/RunCMake/Configure/FailCopyFileABI-check.cmake
@@ -4,10 +4,11 @@ if(EXISTS "${log}")
else()
set(error_log "")
endif()
-if(NOT error_log MATCHES "Cannot copy output executable.*
+string(REPLACE "\r\n" "\n" regex "Cannot copy output executable.*
to destination specified by COPY_FILE:.*
Unable to find the executable at any of:
.*\\.missing")
+if(NOT error_log MATCHES "${regex}")
string(REGEX REPLACE "\n" "\n " error_log " ${error_log}")
set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected COPY_FILE failure message:\n${error_log}")
endif()
diff --git a/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt b/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
+++ b/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalData/CMakeLists.txt b/Tests/RunCMake/ExternalData/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/ExternalData/CMakeLists.txt
+++ b/Tests/RunCMake/ExternalData/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/FPHSA/CMakeLists.txt
+++ b/Tests/RunCMake/FPHSA/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/File_Generate/CMakeLists.txt b/Tests/RunCMake/File_Generate/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/File_Generate/CMakeLists.txt
+++ b/Tests/RunCMake/File_Generate/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/IncompatibleQt/CMakeLists.txt b/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
index 68dd8d6..f452db1 100644
--- a/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
+++ b/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/Languages/CMakeLists.txt
+++ b/Tests/RunCMake/Languages/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ObjectLibrary/CMakeLists.txt b/Tests/RunCMake/ObjectLibrary/CMakeLists.txt
index a7f0779..a17c8cd 100644
--- a/Tests/RunCMake/ObjectLibrary/CMakeLists.txt
+++ b/Tests/RunCMake/ObjectLibrary/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} C)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
index 22577da..90afc12 100644
--- a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
+++ b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt b/Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt
+++ b/Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace-stderr.txt b/Tests/RunCMake/Syntax/ParenNoSpace-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace-stdout.txt b/Tests/RunCMake/Syntax/ParenNoSpace-stdout.txt
new file mode 100644
index 0000000..72addd7
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace-stdout.txt
@@ -0,0 +1,2 @@
+-- unquoted\(unquoted\)
+-- quoted\(quoted\)
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace.cmake b/Tests/RunCMake/Syntax/ParenNoSpace.cmake
new file mode 100644
index 0000000..c690d96
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ParenNoSpace.cmake
@@ -0,0 +1,2 @@
+message(STATUS unquoted(unquoted))
+message(STATUS "quoted"("quoted"))
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index 8975b25..94963f3 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -11,6 +11,7 @@ run_cmake(String1)
run_cmake(StringNoSpace)
run_cmake(Unquoted0)
run_cmake(Unquoted1)
+run_cmake(ParenNoSpace)
run_cmake(UnterminatedCall1)
run_cmake(UnterminatedCall2)
run_cmake(UnterminatedString)
diff --git a/Tests/RunCMake/TargetPolicies/CMakeLists.txt b/Tests/RunCMake/TargetPolicies/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/TargetPolicies/CMakeLists.txt
+++ b/Tests/RunCMake/TargetPolicies/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
index 22577da..90afc12 100644
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/VisibilityPreset/CMakeLists.txt b/Tests/RunCMake/VisibilityPreset/CMakeLists.txt
index 22577da..90afc12 100644
--- a/Tests/RunCMake/VisibilityPreset/CMakeLists.txt
+++ b/Tests/RunCMake/VisibilityPreset/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/add_dependencies/CMakeLists.txt b/Tests/RunCMake/add_dependencies/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/add_dependencies/CMakeLists.txt
+++ b/Tests/RunCMake/add_dependencies/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/alias_targets/CMakeLists.txt b/Tests/RunCMake/alias_targets/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/alias_targets/CMakeLists.txt
+++ b/Tests/RunCMake/alias_targets/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/build_command/CMakeLists.txt b/Tests/RunCMake/build_command/CMakeLists.txt
index f6e84c0..73e6a78 100644
--- a/Tests/RunCMake/build_command/CMakeLists.txt
+++ b/Tests/RunCMake/build_command/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/find_package/CMakeLists.txt b/Tests/RunCMake/find_package/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/find_package/CMakeLists.txt
+++ b/Tests/RunCMake/find_package/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/get_filename_component/CMakeLists.txt b/Tests/RunCMake/get_filename_component/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/get_filename_component/CMakeLists.txt
+++ b/Tests/RunCMake/get_filename_component/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/if/CMakeLists.txt b/Tests/RunCMake/if/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/if/CMakeLists.txt
+++ b/Tests/RunCMake/if/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include/CMakeLists.txt b/Tests/RunCMake/include/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/include/CMakeLists.txt
+++ b/Tests/RunCMake/include/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/include_directories/CMakeLists.txt
+++ b/Tests/RunCMake/include_directories/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_external_msproject/CMakeLists.txt b/Tests/RunCMake/include_external_msproject/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/include_external_msproject/CMakeLists.txt
+++ b/Tests/RunCMake/include_external_msproject/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/list/CMakeLists.txt b/Tests/RunCMake/list/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/list/CMakeLists.txt
+++ b/Tests/RunCMake/list/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/target_link_libraries/CMakeLists.txt b/Tests/RunCMake/target_link_libraries/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/target_link_libraries/CMakeLists.txt
+++ b/Tests/RunCMake/target_link_libraries/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/try_compile/CMakeLists.txt b/Tests/RunCMake/try_compile/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/try_compile/CMakeLists.txt
+++ b/Tests/RunCMake/try_compile/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/variable_watch/CMakeLists.txt b/Tests/RunCMake/variable_watch/CMakeLists.txt
index e8db6b0..12cd3c7 100644
--- a/Tests/RunCMake/variable_watch/CMakeLists.txt
+++ b/Tests/RunCMake/variable_watch/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 91965e9..bad8d63 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -123,11 +123,12 @@ add_custom_command(
MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt
)
-install_files(${CMAKE_MAN_DIR}/man1 FILES ${MAN_FILES})
-install_files(${CMAKE_DOC_DIR} FILES
+install(FILES ${MAN_FILES} DESTINATION ${CMAKE_MAN_DIR}/man1)
+install(FILES
${TEXT_FILES}
${HTML_FILES}
${DOCBOOK_FILES}
+ DESTINATION ${CMAKE_DOC_DIR}
)
install(FILES cmake.m4 DESTINATION share/aclocal)
diff --git a/Utilities/cmcompress/CMakeLists.txt b/Utilities/cmcompress/CMakeLists.txt
index 3323dcd..8063573 100644
--- a/Utilities/cmcompress/CMakeLists.txt
+++ b/Utilities/cmcompress/CMakeLists.txt
@@ -2,4 +2,4 @@ PROJECT(CMCompress)
ADD_LIBRARY(cmcompress cmcompress.c)
-INSTALL(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST}/cmcompress)
+INSTALL(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}/cmcompress)
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 320612c..74a713d 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -716,7 +716,7 @@ TARGET_LINK_LIBRARIES(cmcurl ${CURL_LIBS})
IF(CMAKE_BUILD_CURL_SHARED)
SET_TARGET_PROPERTIES(cmcurl PROPERTIES DEFINE_SYMBOL BUILDING_LIBCURL
RUNTIME_OUTPUT_DIRECTORY ${CMake_BIN_DIR})
- INSTALL_TARGETS(/bin cmcurl)
+ INSTALL(TARGETS cmcurl RUNTIME DESTINATION bin)
ENDIF(CMAKE_BUILD_CURL_SHARED)
OPTION(CURL_TESTING "Do libCurl testing" OFF)
@@ -731,4 +731,4 @@ IF(CMAKE_CURL_TEST_URL)
ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL})
ENDIF(CMAKE_CURL_TEST_URL)
-INSTALL(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmcurl)
+INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmcurl)
diff --git a/Utilities/cmexpat/CMakeLists.txt b/Utilities/cmexpat/CMakeLists.txt
index b75c112..51ba413 100644
--- a/Utilities/cmexpat/CMakeLists.txt
+++ b/Utilities/cmexpat/CMakeLists.txt
@@ -31,4 +31,4 @@ CONFIGURE_FILE(${CMEXPAT_SOURCE_DIR}/expat.h
${CMEXPAT_BINARY_DIR}/expat.h)
ADD_LIBRARY(cmexpat ${expat_SRCS})
-INSTALL(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmexpat)
+INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmexpat)
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 621888c..8ef0e89 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -1311,4 +1311,4 @@ ENDIF(APPLE)
add_subdirectory(libarchive)
-install(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmlibarchive)
+install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmlibarchive)
diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt
index c42a434..f161056 100644
--- a/Utilities/cmzlib/CMakeLists.txt
+++ b/Utilities/cmzlib/CMakeLists.txt
@@ -40,4 +40,4 @@ ENDFOREACH(name)
ADD_LIBRARY(cmzlib ${ZLIB_SRCS})
-INSTALL(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST}/cmzlib)
+INSTALL(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}/cmzlib)
diff --git a/bootstrap b/bootstrap
index afb66e5..9784d5d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -43,9 +43,9 @@ if [ "$cmake_version_tweak" != "0" ]; then
cmake_version="${cmake_version}.${cmake_version_tweak}"
fi
-cmake_data_dir="/share/cmake-${cmake_version_major}.${cmake_version_minor}"
-cmake_doc_dir="/doc/cmake-${cmake_version_major}.${cmake_version_minor}"
-cmake_man_dir="/man"
+cmake_data_dir="share/cmake-${cmake_version_major}.${cmake_version_minor}"
+cmake_doc_dir="doc/cmake-${cmake_version_major}.${cmake_version_minor}"
+cmake_man_dir="man"
cmake_init_file=""
cmake_bootstrap_system_libs=""
cmake_bootstrap_qt_gui=""
@@ -160,8 +160,8 @@ if ${cmake_system_mingw}; then
fi
elif ${cmake_system_haiku}; then
cmake_default_prefix=`finddir B_COMMON_DIRECTORY`
- cmake_man_dir="/documentation/man"
- cmake_doc_dir="/documentation/doc/cmake-${cmake_version}"
+ cmake_man_dir="documentation/man"
+ cmake_doc_dir="documentation/doc/cmake-${cmake_version}"
else
cmake_default_prefix="/usr/local"
fi
@@ -353,13 +353,13 @@ Configuration:
Directory and file names:
--prefix=PREFIX install files in tree rooted at PREFIX
- [${cmake_default_prefix}]
+ ['"${cmake_default_prefix}"']
--datadir=DIR install data files in PREFIX/DIR
- [/share/CMake]
+ ['"${cmake_data_dir}"']
--docdir=DIR install documentation files in PREFIX/DIR
- [/doc/CMake]
+ ['"${cmake_doc_dir}"']
--mandir=DIR install man pages files in PREFIX/DIR/manN
- [/man]
+ ['"${cmake_man_dir}"']
'
exit 10
}
@@ -692,7 +692,10 @@ if ${cmake_system_linux}; then
# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
if ${cmake_machine_parisc}; then
- cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
+ # if -O[s23] is given the effect is inverted, so do not use the flag then
+ if [ "`echo "${CXXFLAGS}" | sed -r '/^(.* )?(-O[s234])( .*)?$/s/.*/-Os/'`" != "-Os" ]; then
+ cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
+ fi
fi
fi
@@ -1400,7 +1403,7 @@ cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_PATCH ${cmake_versi
cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_TWEAK ${cmake_version_tweak}"
cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\""
cmake_report cmConfigure.h${_tmp} "#define CMAKE_ROOT_DIR \"${cmake_root_dir}\""
-cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"${cmake_data_dir}\""
+cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/${cmake_data_dir}\""
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"
# Regenerate configured headers