summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.manual601
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
-rw-r--r--Modules/FindCUDA.cmake17
-rw-r--r--Modules/FindOpenMP.cmake9
-rw-r--r--Modules/Platform/Windows-MSVC-C.cmake3
-rw-r--r--Modules/Platform/Windows-MSVC-CXX.cmake3
-rw-r--r--Modules/Platform/Windows-MSVC.cmake2
-rw-r--r--Source/CMakeVersion.cmake6
-rw-r--r--Source/cmExportFileGenerator.cxx5
-rw-r--r--Source/cmExportInstallFileGenerator.cxx2
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx2
-rw-r--r--Source/cmGlobalGenerator.cxx33
-rw-r--r--Source/cmGlobalGenerator.h1
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx12
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx12
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
-rw-r--r--Source/cmTarget.cxx223
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx21
-rw-r--r--Source/cmTargetLinkLibrariesCommand.h11
-rw-r--r--Source/cmake.cxx2
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt10
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp13
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h14
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp8
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp7
-rw-r--r--Tests/QtAutomoc/foo.h5
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake7
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake8
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt19
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake10
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt17
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt4
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN.cmake5
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake9
-rw-r--r--Tests/RunCMake/CMP0022/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CMP0022/empty_vs6_4.cpp1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt26
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/empty.c0
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-result.txt1
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt9
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource.cmake1
-rw-r--r--Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake1
55 files changed, 1028 insertions, 162 deletions
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 134b4aa..5d2dc8b 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,604 @@
+Changes in CMake 2.8.12.1 (since 2.8.12)
+----------------------------------------
+Brad King (9):
+ MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)
+ Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
+ Check for OBJECT_LIBRARY source files at start of generation
+ CMP0022: Plain target_link_libraries must populate link interface
+ Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
+ CMP0022: Warn about a given target at most once
+ Fix summary documentation of INTERFACE_LINK_LIBRARIES
+ file(GENERATE): Clear internal records between configures
+ cmake: Validate -E cmake_automoc argument count (#14545)
+
+Modestas Vainius (1):
+ Fix spelling in INTERFACE_LINK_LIBRARIES documentation (#14542)
+
+Stephen Kelly (5):
+ CMP0022: Output link interface mismatch for static library warning
+ Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
+ CMP0022: Add unit test for null pointer check and message.
+ CMP0022: Add test for target_link_libraries plain signature
+ Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
+
+Vladislav Vinogradov (1):
+ FindCUDA: Fix NPP library search for CUDA 5.5
+
+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/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 8ca5334..dd0c2bd 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -209,7 +209,7 @@ Id flags: ${testflags}
# ...
# /path/to/cc ...CompilerId${lang}/...
# to extract the compiler front-end for the language.
- if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/\\./CompilerId${lang}[ \t\n\\\"]")
+ if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/(\\./)?CompilerId${lang}[ \t\n\\\"]")
set(_comp "${CMAKE_MATCH_2}")
if(EXISTS "${_comp}")
set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE)
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 8270ad4..2705d32 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -263,6 +263,12 @@
# Only available for CUDA version 3.2+.
# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives library.
# Only available for CUDA version 4.0+.
+# CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives library (core).
+# Only available for CUDA version 5.5+.
+# CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives library (image processing).
+# Only available for CUDA version 5.5+.
+# CUDA_npps_LIBRARY -- NVIDIA Performance Primitives library (signal processing).
+# Only available for CUDA version 5.5+.
# CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library.
# Only available for CUDA version 3.2+.
# Windows only.
@@ -496,6 +502,9 @@ if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
unset(CUDA_curand_LIBRARY CACHE)
unset(CUDA_cusparse_LIBRARY CACHE)
unset(CUDA_npp_LIBRARY CACHE)
+ unset(CUDA_nppc_LIBRARY CACHE)
+ unset(CUDA_nppi_LIBRARY CACHE)
+ unset(CUDA_npps_LIBRARY CACHE)
unset(CUDA_nvcuvenc_LIBRARY CACHE)
unset(CUDA_nvcuvid_LIBRARY CACHE)
endif()
@@ -700,7 +709,13 @@ if(NOT CUDA_VERSION VERSION_LESS "3.2")
find_cuda_helper_libs(nvcuvid)
endif()
endif()
-if(NOT CUDA_VERSION VERSION_LESS "4.0")
+if(CUDA_VERSION VERSION_GREATER "5.0")
+ # In CUDA 5.5 NPP was splitted onto 3 separate libraries.
+ find_cuda_helper_libs(nppc)
+ find_cuda_helper_libs(nppi)
+ find_cuda_helper_libs(npps)
+ set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}")
+elseif(NOT CUDA_VERSION VERSION_LESS "4.0")
find_cuda_helper_libs(npp)
endif()
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index f4a9f44..8afad68 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -31,6 +31,8 @@ set(_OPENMP_REQUIRED_VARS)
function(_OPENMP_FLAG_CANDIDATES LANG)
set(OpenMP_FLAG_CANDIDATES
+ #Empty, if compiler automatically accepts openmp
+ " "
#GNU
"-fopenmp"
#Microsoft Visual Studio
@@ -39,8 +41,6 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
"-Qopenmp"
#PathScale, Intel
"-openmp"
- #Empty, if compiler automatically accepts openmp
- " "
#Sun
"-xopenmp"
#HP
@@ -64,6 +64,7 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
set(OMP_FLAG_PGI "-mp")
set(OMP_FLAG_SunPro "-xopenmp")
set(OMP_FLAG_XL "-qsmp")
+ set(OMP_FLAG_Cray " ")
# Move the flag that matches the compiler to the head of the list,
# this is faster and doesn't clutter the output that much. If that
@@ -100,7 +101,7 @@ if(CMAKE_C_COMPILER_LOADED)
include(${CMAKE_CURRENT_LIST_DIR}/CheckCSourceCompiles.cmake)
endif()
- foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
+ foreach(FLAG IN LISTS OpenMP_C_FLAG_CANDIDATES)
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
unset(OpenMP_FLAG_DETECTED CACHE)
@@ -134,7 +135,7 @@ if(CMAKE_CXX_COMPILER_LOADED)
set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
endif()
- foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
+ foreach(FLAG IN LISTS OpenMP_CXX_FLAG_CANDIDATES)
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
unset(OpenMP_FLAG_DETECTED CACHE)
diff --git a/Modules/Platform/Windows-MSVC-C.cmake b/Modules/Platform/Windows-MSVC-C.cmake
index e81df9f..cbe1586 100644
--- a/Modules/Platform/Windows-MSVC-C.cmake
+++ b/Modules/Platform/Windows-MSVC-C.cmake
@@ -1,2 +1,5 @@
include(Platform/Windows-MSVC)
+if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
+ set(_FS_C " /FS")
+endif()
__windows_compiler_msvc(C)
diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake
index fdd1dae..0e85005 100644
--- a/Modules/Platform/Windows-MSVC-CXX.cmake
+++ b/Modules/Platform/Windows-MSVC-CXX.cmake
@@ -1,3 +1,6 @@
include(Platform/Windows-MSVC)
set(_COMPILE_CXX " /TP")
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
+ set(_FS_CXX " /FS")
+endif()
__windows_compiler_msvc(CXX)
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 7036ba0..6e02e4a 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -232,7 +232,7 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
set(CMAKE_${lang}_COMPILE_OBJECT
- "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<OBJECT_DIR>/ -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+ "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<OBJECT_DIR>/${_FS_${lang}} -c <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
"<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index bd1c38a..5027370 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 20131007)
-#set(CMake_VERSION_RC 1)
+set(CMake_VERSION_PATCH 12)
+set(CMake_VERSION_TWEAK 1)
+#set(CMake_VERSION_RC 0)
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index ef336ea..14be5cd 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -185,6 +185,10 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty(
ImportPropertyMap &properties,
std::vector<std::string> &missingTargets)
{
+ if(!target->IsLinkable())
+ {
+ return false;
+ }
const char *input = target->GetProperty("INTERFACE_LINK_LIBRARIES");
if (input)
{
@@ -631,6 +635,7 @@ cmExportFileGenerator
if (iface->ImplementationIsInterface)
{
+ // Policy CMP0022 must not be NEW.
this->SetImportLinkProperty(suffix, target,
"IMPORTED_LINK_INTERFACE_LIBRARIES",
iface->Libraries, properties, missingTargets);
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/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index abe4e70..8b31354 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -1277,7 +1277,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
"No target \"" + name + "\"");
return std::string();
}
- if(target->GetType() >= cmTarget::UTILITY &&
+ if(target->GetType() >= cmTarget::OBJECT_LIBRARY &&
target->GetType() != cmTarget::UNKNOWN_LIBRARY)
{
::reportError(context, content->GetOriginalExpression(),
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7f2b592..f297c4a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -848,6 +848,14 @@ void cmGlobalGenerator::Configure()
delete this->LocalGenerators[i];
}
this->LocalGenerators.clear();
+ for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
+ li = this->EvaluationFiles.begin();
+ li != this->EvaluationFiles.end();
+ ++li)
+ {
+ delete *li;
+ }
+ this->EvaluationFiles.clear();
this->TargetDependencies.clear();
this->TotalTargets.clear();
this->ImportedTargets.clear();
@@ -956,6 +964,8 @@ void cmGlobalGenerator::Generate()
return;
}
+ this->FinalizeTargetCompileDefinitions();
+
// Iterate through all targets and set up automoc for those which have
// the AUTOMOC property set
this->CreateAutomocTargets();
@@ -1088,6 +1098,7 @@ bool cmGlobalGenerator::CheckTargets()
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY ||
+ target.GetType() == cmTarget::OBJECT_LIBRARY ||
target.GetType() == cmTarget::UTILITY)
{
if(!target.FindSourceFiles())
@@ -1140,13 +1151,11 @@ void cmGlobalGenerator::CreateAutomocTargets()
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::CreateGeneratorTargets()
+void cmGlobalGenerator::FinalizeTargetCompileDefinitions()
{
// Construct per-target generator information.
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{
- cmGeneratorTargetsType generatorTargets;
-
cmMakefile *mf = this->LocalGenerators[i]->GetMakefile();
const std::vector<cmValueWithOrigin> noconfig_compile_definitions =
@@ -1161,7 +1170,6 @@ void cmGlobalGenerator::CreateGeneratorTargets()
{
cmTarget* t = &ti->second;
- {
for (std::vector<cmValueWithOrigin>::const_iterator it
= noconfig_compile_definitions.begin();
it != noconfig_compile_definitions.end(); ++it)
@@ -1178,7 +1186,24 @@ void cmGlobalGenerator::CreateGeneratorTargets()
mf->GetProperty(defPropName.c_str()));
}
}
+ }
+}
+//----------------------------------------------------------------------------
+void cmGlobalGenerator::CreateGeneratorTargets()
+{
+ // Construct per-target generator information.
+ for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
+ {
+ cmGeneratorTargetsType generatorTargets;
+
+ cmMakefile *mf = this->LocalGenerators[i]->GetMakefile();
+
+ cmTargets& targets = mf->GetTargets();
+ for(cmTargets::iterator ti = targets.begin();
+ ti != targets.end(); ++ti)
+ {
+ cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t);
this->GeneratorTargets[t] = gt;
this->ComputeTargetObjects(gt);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 18aba24..80916ae 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -382,6 +382,7 @@ private:
void WriteSummary();
void WriteSummary(cmTarget* target);
+ void FinalizeTargetCompileDefinitions();
cmExternalMakefileProjectGenerator* ExtraGenerator;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 0a2b32b..c181c59 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -877,8 +877,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
}
std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
-
- fileRef->AddAttribute("explicitFileType",
+ const char* attribute = (sourcecode == "file.storyboard") ?
+ "lastKnownFileType" :
+ "explicitFileType";
+ fileRef->AddAttribute(attribute,
this->CreateString(sourcecode.c_str()));
// Store the file path relative to the top of the source tree.
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index bd6c860..8ffd96e 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -477,6 +477,8 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
{"AssemblerListingLocation", "Fa", "ASM List Location", "",
cmVS7FlagTable::UserValue},
+ {"ProgramDataBaseFileName", "Fd", "Program Database File Name", "",
+ cmVS7FlagTable::UserValue},
// boolean flags
{"BufferSecurityCheck", "GS", "Buffer security check", "TRUE", 0},
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index e4219a9..3a71bd6 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -338,13 +338,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
vars.CMTarget = this->Target;
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
- std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
- objdir += this->Target->GetName();
- objdir += ".dir";
- objdir = this->Convert(objdir.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL);
- vars.ObjectDir = objdir.c_str();
+ std::string objectDir = this->Target->GetSupportDirectory();
+ objectDir = this->Convert(objectDir.c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::SHELL);
+ vars.ObjectDir = objectDir.c_str();
vars.Target = targetOutPathReal.c_str();
vars.TargetPDB = targetOutPathPDB.c_str();
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index ea9663f..ffe68e5 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -577,13 +577,11 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
vars.CMTarget = this->Target;
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
- std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
- objdir += this->Target->GetName();
- objdir += ".dir";
- objdir = this->Convert(objdir.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL);
- vars.ObjectDir = objdir.c_str();
+ std::string objectDir = this->Target->GetSupportDirectory();
+ objectDir = this->Convert(objectDir.c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::SHELL);
+ vars.ObjectDir = objectDir.c_str();
vars.Target = targetOutPathReal.c_str();
vars.LinkLibraries = linkLibs.c_str();
vars.ObjectsQuoted = buildObjs.c_str();
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0829cab..5e6c548 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -638,7 +638,7 @@ cmMakefileTargetGenerator
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL).c_str();
vars.Object = shellObj.c_str();
- std::string objectDir = cmSystemTools::GetFilenamePath(obj);
+ std::string objectDir = this->Target->GetSupportDirectory();
objectDir = this->Convert(objectDir.c_str(),
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 898aa0e..9c8b481 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -543,7 +543,7 @@ cmNinjaTargetGenerator
vars["DEP_FILE"] = objectFileName + ".d";;
EnsureParentDirectoryExists(objectFileName);
- std::string objectDir = cmSystemTools::GetFilenamePath(objectFileName);
+ std::string objectDir = this->Target->GetSupportDirectory();
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
ConvertToNinjaPath(objectDir.c_str()).c_str(),
cmLocalGenerator::SHELL);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ac655da..4ba6c19 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -83,10 +83,12 @@ class cmTargetInternals
public:
cmTargetInternals()
{
+ this->PolicyWarnedCMP0022 = false;
this->SourceFileFlagsConstructed = false;
}
cmTargetInternals(cmTargetInternals const& r)
{
+ this->PolicyWarnedCMP0022 = false;
this->SourceFileFlagsConstructed = false;
// Only some of these entries are part of the object state.
// Others not copied here are result caches.
@@ -109,6 +111,7 @@ public:
typedef std::map<TargetConfigPair, OptionalLinkInterface>
LinkInterfaceMapType;
LinkInterfaceMapType LinkInterfaceMap;
+ bool PolicyWarnedCMP0022;
typedef std::map<cmStdString, cmTarget::OutputInfo> OutputInfoMapType;
OutputInfoMapType OutputInfoMap;
@@ -833,7 +836,7 @@ void cmTarget::DefineProperties(cmake *cm)
"CMAKE_LINK_INTERFACE_LIBRARIES if it is set when a target is "
"created. "
"This property is ignored for STATIC libraries.\n"
- "This property is overriden by the INTERFACE_LINK_LIBRARIES property if "
+ "This property is overridden by the INTERFACE_LINK_LIBRARIES property if "
"policy CMP0022 is NEW.\n"
"This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.");
@@ -844,18 +847,18 @@ void cmTarget::DefineProperties(cmake *cm)
"LINK_INTERFACE_LIBRARIES. "
"If set, this property completely overrides the generic property "
"for the named configuration.\n"
- "This property is overriden by the INTERFACE_LINK_LIBRARIES property if "
+ "This property is overridden by the INTERFACE_LINK_LIBRARIES property if "
"policy CMP0022 is NEW.\n"
"This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.");
cm->DefineProperty
("INTERFACE_LINK_LIBRARIES", cmProperty::TARGET,
- "List public interface libraries for a shared library or executable.",
+ "List public interface libraries for a library.",
"This property contains the list of transitive link dependencies. "
"When the target is linked into another target the libraries "
"listed (and recursively their link interface libraries) will be "
"provided to the other target also. "
- "This property is overriden by the LINK_INTERFACE_LIBRARIES or "
+ "This property is overridden by the LINK_INTERFACE_LIBRARIES or "
"LINK_INTERFACE_LIBRARIES_<CONFIG> property if "
"policy CMP0022 is OLD or unset.\n"
"\n"
@@ -2331,16 +2334,10 @@ void cmTarget::MergeLinkLibraries( cmMakefile& mf,
i += this->PrevLinkedLibraries.size();
for( ; i != libs.end(); ++i )
{
- // We call this so that the dependencies get written to the cache
+ // This is equivalent to the target_link_libraries plain signature.
this->AddLinkLibrary( mf, selfname, i->first.c_str(), i->second );
-
- if (this->GetType() == cmTarget::STATIC_LIBRARY)
- {
- this->AppendProperty("INTERFACE_LINK_LIBRARIES",
- ("$<LINK_ONLY:" +
- this->GetDebugGeneratorExpressions(i->first.c_str(), i->second) +
- ">").c_str());
- }
+ this->AppendProperty("INTERFACE_LINK_LIBRARIES",
+ this->GetDebugGeneratorExpressions(i->first.c_str(), i->second).c_str());
}
this->PrevLinkedLibraries = libs;
}
@@ -6412,12 +6409,20 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
// An explicit list of interface libraries may be set for shared
// libraries and executables that export symbols.
const char* explicitLibraries = 0;
- const char* newExplicitLibraries =
- this->GetProperty("INTERFACE_LINK_LIBRARIES");
std::string linkIfaceProp;
- if(this->GetType() == cmTarget::SHARED_LIBRARY ||
- this->IsExecutableWithExports())
+ if(this->PolicyStatusCMP0022 != cmPolicies::OLD &&
+ this->PolicyStatusCMP0022 != cmPolicies::WARN)
+ {
+ // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES.
+ linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
+ explicitLibraries = this->GetProperty(linkIfaceProp.c_str());
+ }
+ else if(this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->IsExecutableWithExports())
{
+ // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a
+ // shared lib or executable.
+
// Lookup the per-configuration property.
linkIfaceProp = "LINK_INTERFACE_LIBRARIES";
linkIfaceProp += suffix;
@@ -6429,95 +6434,32 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
linkIfaceProp = "LINK_INTERFACE_LIBRARIES";
explicitLibraries = this->GetProperty(linkIfaceProp.c_str());
}
- if (newExplicitLibraries
- && (!explicitLibraries ||
- (explicitLibraries
- && strcmp(newExplicitLibraries, explicitLibraries) != 0)))
- {
- switch(this->GetPolicyStatusCMP0022())
- {
- case cmPolicies::WARN:
- {
- cmOStringStream w;
- w << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
- << "Target \"" << this->GetName() << "\" has a "
- "INTERFACE_LINK_LIBRARIES property which differs from its "
- << 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
- case cmPolicies::OLD:
- break;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::NEW:
- explicitLibraries = newExplicitLibraries;
- linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
- break;
- }
- }
}
- else if(this->GetType() == cmTarget::STATIC_LIBRARY)
+
+ if(explicitLibraries && this->PolicyStatusCMP0022 == cmPolicies::WARN &&
+ !this->Internal->PolicyWarnedCMP0022)
{
- if (newExplicitLibraries)
+ // Compare the explicitly set old link interface properties to the
+ // preferred new link interface property one and warn if different.
+ const char* newExplicitLibraries =
+ this->GetProperty("INTERFACE_LINK_LIBRARIES");
+ if (newExplicitLibraries
+ && strcmp(newExplicitLibraries, explicitLibraries) != 0)
{
- cmListFileBacktrace lfbt;
- cmGeneratorExpression ge(lfbt);
- cmGeneratorExpressionDAGChecker dagChecker(lfbt, this->GetName(),
- "INTERFACE_LINK_LIBRARIES", 0, 0);
- std::vector<std::string> ifaceLibs;
- cmSystemTools::ExpandListArgument(
- ge.Parse(newExplicitLibraries)->Evaluate(
- this->Makefile,
- config,
- false,
- headTarget,
- this, &dagChecker), ifaceLibs);
- LinkImplementation const* impl = this->GetLinkImplementation(config,
- headTarget);
- if (ifaceLibs != impl->Libraries)
- {
- switch(this->GetPolicyStatusCMP0022())
- {
- case cmPolicies::WARN:
- {
- cmOStringStream w;
- w << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
- << "Static library target \"" << this->GetName() << "\" has a "
- "INTERFACE_LINK_LIBRARIES property. This should be preferred "
- "as the source of the link interface for this library. "
- "Ignoring the property and using the link implementation "
- "as the link interface instead.";
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
- }
- // Fall through
- case cmPolicies::OLD:
- break;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::NEW:
- explicitLibraries = newExplicitLibraries;
- linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
- break;
- }
- }
- else
- {
- iface.Libraries = impl->Libraries;
- if(this->LinkLanguagePropagatesToDependents())
- {
- // Targets using this archive need its language runtime libraries.
- iface.Languages = impl->Languages;
- }
- }
+ cmOStringStream w;
+ w <<
+ (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
+ "Target \"" << this->GetName() << "\" has an "
+ "INTERFACE_LINK_LIBRARIES property which differs from its " <<
+ linkIfaceProp << " properties."
+ "\n"
+ "INTERFACE_LINK_LIBRARIES:\n"
+ " " << newExplicitLibraries << "\n" <<
+ linkIfaceProp << ":\n"
+ " " << (explicitLibraries ? explicitLibraries : "(empty)") << "\n";
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->Internal->PolicyWarnedCMP0022 = true;
}
}
@@ -6588,11 +6530,12 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
}
}
}
- else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
- || this->GetPolicyStatusCMP0022() == cmPolicies::OLD)
- // The implementation shouldn't be the interface if CMP0022 is NEW. That
- // way, the LINK_LIBRARIES property can be set directly without having to
- // empty the INTERFACE_LINK_LIBRARIES
+ else if (this->PolicyStatusCMP0022 == cmPolicies::WARN
+ || this->PolicyStatusCMP0022 == cmPolicies::OLD)
+ // If CMP0022 is NEW then the plain tll signature sets the
+ // INTERFACE_LINK_LIBRARIES, so if we get here then the project
+ // cleared the property explicitly and we should not fall back
+ // to the link implementation.
{
// The link implementation is the default link interface.
LinkImplementation const* impl = this->GetLinkImplementation(config,
@@ -6605,6 +6548,70 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
// Targets using this archive need its language runtime libraries.
iface.Languages = impl->Languages;
}
+
+ if(this->PolicyStatusCMP0022 == cmPolicies::WARN &&
+ !this->Internal->PolicyWarnedCMP0022)
+ {
+ // Compare the link implementation fallback link interface to the
+ // preferred new link interface property and warn if different.
+ cmListFileBacktrace lfbt;
+ cmGeneratorExpression ge(lfbt);
+ cmGeneratorExpressionDAGChecker dagChecker(lfbt, this->GetName(),
+ "INTERFACE_LINK_LIBRARIES", 0, 0);
+ std::vector<std::string> ifaceLibs;
+ const char* newExplicitLibraries =
+ this->GetProperty("INTERFACE_LINK_LIBRARIES");
+ cmSystemTools::ExpandListArgument(
+ ge.Parse(newExplicitLibraries)->Evaluate(this->Makefile,
+ config,
+ false,
+ headTarget,
+ this, &dagChecker),
+ ifaceLibs);
+ if (ifaceLibs != impl->Libraries)
+ {
+ std::string oldLibraries;
+ std::string newLibraries;
+ const char *sep = "";
+ for(std::vector<std::string>::const_iterator it
+ = impl->Libraries.begin(); it != impl->Libraries.end(); ++it)
+ {
+ oldLibraries += sep;
+ oldLibraries += *it;
+ sep = ";";
+ }
+ sep = "";
+ for(std::vector<std::string>::const_iterator it
+ = ifaceLibs.begin(); it != ifaceLibs.end(); ++it)
+ {
+ newLibraries += sep;
+ newLibraries += *it;
+ sep = ";";
+ }
+ if(oldLibraries.empty())
+ { oldLibraries = "(empty)"; }
+ if(newLibraries.empty())
+ { newLibraries = "(empty)"; }
+
+ cmOStringStream w;
+ w <<
+ (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
+ "Target \"" << this->GetName() << "\" has an "
+ "INTERFACE_LINK_LIBRARIES property. "
+ "This should be preferred as the source of the link interface "
+ "for this library but because CMP0022 is not set CMake is "
+ "ignoring the property and using the link implementation "
+ "as the link interface instead."
+ "\n"
+ "INTERFACE_LINK_LIBRARIES:\n"
+ " " << newLibraries << "\n"
+ "Link implementation:\n"
+ " " << oldLibraries << "\n";
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->Internal->PolicyWarnedCMP0022 = true;
+ }
+ }
}
if(this->GetType() == cmTarget::STATIC_LIBRARY)
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 863b391..c2f46a1 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -379,15 +379,26 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
{
this->Makefile
->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
- if (this->CurrentProcessingState != ProcessingKeywordPublicInterface
- && this->CurrentProcessingState != ProcessingPlainPublicInterface)
+ if(this->CurrentProcessingState == ProcessingLinkLibraries)
+ {
+ this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES",
+ this->Target->GetDebugGeneratorExpressions(lib, llt).c_str());
+ return true;
+ }
+ else if(this->CurrentProcessingState != ProcessingKeywordPublicInterface
+ && this->CurrentProcessingState != ProcessingPlainPublicInterface)
{
if (this->Target->GetType() == cmTarget::STATIC_LIBRARY)
{
+ std::string configLib = this->Target
+ ->GetDebugGeneratorExpressions(lib, llt);
+ if (cmGeneratorExpression::IsValidTargetName(lib)
+ || cmGeneratorExpression::Find(lib) != std::string::npos)
+ {
+ configLib = "$<LINK_ONLY:" + configLib + ">";
+ }
this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES",
- ("$<LINK_ONLY:" +
- this->Target->GetDebugGeneratorExpressions(lib, llt) +
- ">").c_str());
+ configLib.c_str());
}
// Not a 'public' or 'interface' library. Do not add to interface
// property.
diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h
index f2b2543..2cf6b03 100644
--- a/Source/cmTargetLinkLibrariesCommand.h
+++ b/Source/cmTargetLinkLibrariesCommand.h
@@ -88,14 +88,19 @@ public:
"See the IMPORTED mode of the add_library command for more "
"information. "
"\n"
- "Library dependencies are transitive by default. "
+ "Library dependencies are transitive by default with this signature. "
"When this target is linked into another target then the libraries "
"linked to this target will appear on the link line for the other "
"target too. "
- "See the INTERFACE_LINK_LIBRARIES target property to override the "
- "set of transitive link dependencies for a target. "
+ "This transitive \"link interface\" is stored in the "
+ "INTERFACE_LINK_LIBRARIES target property when policy CMP0022 is set "
+ "to NEW and may be overridden by setting the property directly. "
+ "("
+ "When CMP0022 is not set to NEW, transitive linking is builtin "
+ "but may be overridden by the LINK_INTERFACE_LIBRARIES property. "
"Calls to other signatures of this command may set the property "
"making any libraries linked exclusively by this signature private."
+ ")"
"\n"
"CMake will also propagate \"usage requirements\" from linked library "
"targets. "
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 290aff0..14ddc1b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1734,7 +1734,7 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
{
return cmake::ExecuteEchoColor(args);
}
- else if (args[1] == "cmake_automoc")
+ else if (args[1] == "cmake_automoc" && args.size() >= 4)
{
cmQtAutomoc automoc;
const char *config = args[3].empty() ? 0 : args[3].c_str();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index 07d7c43..818b8c9 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -22,6 +22,16 @@ generate_export_header(staticlib1)
add_library(staticlib2 STATIC staticlib2.cpp)
generate_export_header(staticlib2)
target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
+if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
+ target_link_libraries(staticlib1 LINK_PRIVATE "-Wl,-v")
+endif()
add_executable(staticlib_exe staticlib_exe.cpp)
target_link_libraries(staticlib_exe staticlib1)
+
+add_library(onlyplainlib1 SHARED onlyplainlib1.cpp)
+add_library(onlyplainlib2 SHARED onlyplainlib2.cpp)
+target_link_libraries(onlyplainlib2 onlyplainlib1)
+
+add_executable(onlyplainlib_user onlyplainlib_user.cpp)
+target_link_libraries(onlyplainlib_user onlyplainlib2)
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
new file mode 100644
index 0000000..41dc3ce
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
@@ -0,0 +1,13 @@
+
+#include "onlyplainlib1.h"
+
+OnlyPlainLib1::OnlyPlainLib1()
+ : result(0)
+{
+
+}
+
+int OnlyPlainLib1::GetResult()
+{
+ return result;
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
new file mode 100644
index 0000000..c0373ce
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
@@ -0,0 +1,14 @@
+
+struct
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+OnlyPlainLib1
+{
+ OnlyPlainLib1();
+
+ int GetResult();
+
+private:
+ int result;
+};
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
new file mode 100644
index 0000000..2865ae9
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
@@ -0,0 +1,8 @@
+
+#include "onlyplainlib2.h"
+
+OnlyPlainLib1 onlyPlainLib2()
+{
+ OnlyPlainLib1 opl1;
+ return opl1;
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
new file mode 100644
index 0000000..74b18a0
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
@@ -0,0 +1,7 @@
+
+#include "onlyplainlib1.h"
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+OnlyPlainLib1 onlyPlainLib2();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
new file mode 100644
index 0000000..0fb7b0a
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
@@ -0,0 +1,7 @@
+
+#include "onlyplainlib2.h"
+
+int main(int argc, char **argv)
+{
+ return onlyPlainLib2().GetResult();
+}
diff --git a/Tests/QtAutomoc/foo.h b/Tests/QtAutomoc/foo.h
index 32d4c8d..f23ec07 100644
--- a/Tests/QtAutomoc/foo.h
+++ b/Tests/QtAutomoc/foo.h
@@ -16,7 +16,10 @@
#include <QObject>
-class Foo : public QObject
+class Foo
+#ifdef FOO
+ : public QObject
+#endif
{
Q_OBJECT
public:
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake
new file mode 100644
index 0000000..b0268c8
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake
@@ -0,0 +1,7 @@
+enable_language(CXX)
+
+add_library(testLib empty_vs6_1.cpp)
+add_executable(testExe empty_vs6_2.cpp)
+target_link_libraries(testExe testLib)
+
+export(TARGETS testExe FILE "${CMAKE_CURRENT_BINARY_DIR}/cmp0022NOWARN-exe.cmake")
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake
new file mode 100644
index 0000000..57c3ed0
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake
@@ -0,0 +1,8 @@
+enable_language(CXX)
+
+add_library(foo SHARED empty_vs6_1.cpp)
+add_library(bar SHARED empty_vs6_2.cpp)
+target_link_libraries(bar foo)
+
+add_executable(zot empty.cpp)
+target_link_libraries(zot bar)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
index 3e4144f..ad3b8df 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
@@ -5,4 +5,8 @@ add_library(foo STATIC empty_vs6_1.cpp)
add_library(bar STATIC empty_vs6_2.cpp)
add_library(bat STATIC empty_vs6_3.cpp)
target_link_libraries(foo bar)
-target_link_libraries(bar bat)
+# The last element here needs to contain a space so that it is a single
+# element which is not a valid target name. As bar is a STATIC library,
+# this tests that the LINK_ONLY generator expression is not used for
+# that element, creating an error.
+target_link_libraries(bar bat "-lz -lm")
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
new file mode 100644
index 0000000..6a6a0c7
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
@@ -0,0 +1,19 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
+ interface. Run "cmake --help-policy CMP0022" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property. This should be
+ preferred as the source of the link interface for this library but because
+ CMP0022 is not set CMake is ignoring the property and using the link
+ implementation as the link interface instead.
+
+ INTERFACE_LINK_LIBRARIES:
+
+ foo
+
+ Link implementation:
+
+ \(empty\)
+
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake
new file mode 100644
index 0000000..c5d3c29
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake
@@ -0,0 +1,10 @@
+
+project(CMP0022-WARN-empty-old)
+
+add_library(foo SHARED empty_vs6_1.cpp)
+add_library(bar SHARED empty_vs6_2.cpp)
+
+set_property(TARGET bar PROPERTY INTERFACE_LINK_LIBRARIES foo)
+
+add_library(user empty.cpp)
+target_link_libraries(user bar)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
index 41d132c..1370c5e 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
@@ -3,8 +3,17 @@ CMake Warning \(dev\) in CMakeLists.txt:
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
- Static library target "bar" has a INTERFACE_LINK_LIBRARIES property. This
- should be preferred as the source of the link interface for this library.
- Ignoring the property and using the link implementation as the link
- interface instead.
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property. This should be
+ preferred as the source of the link interface for this library but because
+ CMP0022 is not set CMake is ignoring the property and using the link
+ implementation as the link interface instead.
+
+ INTERFACE_LINK_LIBRARIES:
+
+ foo
+
+ Link implementation:
+
+ bat
+
This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
index 93c0ab3..2f7dfbf 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
@@ -1,10 +1,10 @@
-CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
- Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
- LINK_INTERFACE_LIBRARIES properties.
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property which differs from
+ its LINK_INTERFACE_LIBRARIES properties.
INTERFACE_LINK_LIBRARIES:
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
index 6370b24..f672285 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
@@ -3,8 +3,8 @@ CMake Warning \(dev\) in CMakeLists.txt:
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
- Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
- LINK_INTERFACE_LIBRARIES properties.
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property which differs from
+ its LINK_INTERFACE_LIBRARIES properties.
INTERFACE_LINK_LIBRARIES:
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake
index 24b7f45..fe7e858 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake
@@ -9,3 +9,8 @@ set_property(TARGET bar PROPERTY LINK_INTERFACE_LIBRARIES bat)
add_library(user empty.cpp)
target_link_libraries(user bar)
+
+# Use "bar" again with a different "head" target to check
+# that the warning does not appear again.
+add_library(user2 empty_vs6_3.cpp)
+target_link_libraries(user2 bar)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake
new file mode 100644
index 0000000..d832fac
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake
@@ -0,0 +1,9 @@
+enable_language(CXX)
+
+cmake_policy(SET CMP0022 NEW)
+
+add_library(testLib empty_vs6_1.cpp)
+add_executable(testExe empty_vs6_2.cpp)
+target_link_libraries(testExe testLib)
+
+export(TARGETS testExe FILE "${CMAKE_CURRENT_BINARY_DIR}/cmp0022NEW-exe.cmake")
diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
index dcef0f5..2781d20 100644
--- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
@@ -3,7 +3,11 @@ include(RunCMake)
run_cmake(CMP0022-WARN)
run_cmake(CMP0022-WARN-tll)
run_cmake(CMP0022-WARN-static)
+run_cmake(CMP0022-WARN-empty-old)
+run_cmake(CMP0022-NOWARN-exe)
+run_cmake(CMP0022-NOWARN-shared)
run_cmake(CMP0022-NOWARN-static)
run_cmake(CMP0022-NOWARN-static-link_libraries)
run_cmake(CMP0022-export)
+run_cmake(CMP0022-export-exe)
run_cmake(CMP0022-install-export)
diff --git a/Tests/RunCMake/CMP0022/empty_vs6_4.cpp b/Tests/RunCMake/CMP0022/empty_vs6_4.cpp
new file mode 100644
index 0000000..7efedab
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/empty_vs6_4.cpp
@@ -0,0 +1 @@
+#include "empty.cpp"
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt
new file mode 100644
index 0000000..533d38c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt
@@ -0,0 +1,26 @@
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_SONAME_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_LINKER_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake
new file mode 100644
index 0000000..c47ee2b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+add_library(objlib OBJECT empty.c)
+add_custom_target(check ALL COMMAND echo
+ $<TARGET_FILE:objlib>
+ $<TARGET_SONAME_FILE:objlib>
+ $<TARGET_LINKER_FILE:objlib>
+ )
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 62bf29b..54d5064 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -7,4 +7,5 @@ run_cmake(BadNOT)
run_cmake(BadStrEqual)
run_cmake(BadZero)
run_cmake(BadTargetName)
+run_cmake(BadTargetTypeObject)
run_cmake(BadInstallPrefix)
diff --git a/Tests/RunCMake/GeneratorExpression/empty.c b/Tests/RunCMake/GeneratorExpression/empty.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/empty.c
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
new file mode 100644
index 0000000..411cd7c
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at MissingSource.cmake:1 \(add_library\):
+ Cannot find source file:
+
+ missing.c
+
+ Tried extensions( \.[A-Za-z+]+|
+ )*
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource.cmake b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake
new file mode 100644
index 0000000..258eaed
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake
@@ -0,0 +1 @@
+add_library(A OBJECT missing.c)
diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
index 55db14d..2dd8d38 100644
--- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
@@ -12,6 +12,7 @@ run_cmake(Install)
run_cmake(LinkObjLHS)
run_cmake(LinkObjRHS1)
run_cmake(LinkObjRHS2)
+run_cmake(MissingSource)
run_cmake(ObjWithObj)
run_cmake(PostBuild)
run_cmake(PreBuild)