1. 27 Jul, 2016 1 commit
    • Daniel Pfeifer's avatar
      Use string(APPEND) in Tests · 7a649111
      Daniel Pfeifer authored
      Automate with:
      find Tests -type f -print0 | xargs -0 perl -i -0pe \
      's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
  2. 21 Jul, 2016 3 commits
    • Brad King's avatar
      Tests: Hide errors from `ldd --help` output check · d6a6024e
      Brad King authored
      If `--help` is not a valid option then it may print content to stderr,
      so we need to capture that.
    • Brad King's avatar
      VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for object libraries · 13a6ff31
      Brad King authored
      Teach Visual Studio generators to include object files from object
      libraries in the list of objects whose symbols are to be exported.
      The Makefile and Ninja generators already did this.  Update the
      test to cover this case.
      Reported-by: default avatarBertrand Bellenot <Bertrand.Bellenot@cern.ch>
    • Brad King's avatar
      Autogen: Revert changes to generate moc/rcc in subdirectories · 5e55d87b
      Brad King authored
      Revert these commits:
      * v3.6.0-rc1~134^2
        Tests: QtAutogen: Same source name in different directories test, 2016-04-13
      * v3.6.0-rc1~134^2~1
        Autogen: Generate qrc_NAME.cpp files in subdirectories, 2016-04-19
      * v3.6.0-rc1~134^2~2
        Autogen: Generate not included moc files in subdirectories, 2016-04-19
      They regress existing builds that depend on the paths/symbols generated
      previously.  Another approach will be needed to solve the name collision
      problem they were intended to solve.  Leave the error diagnostics for
      the colliding cases that were added in the same topic as the above
      commits because they provide a useful early failure in relevant cases.
      Fixes #16209.
  3. 20 Jul, 2016 1 commit
    • Brad King's avatar
      Ninja: Fix inter-target order-only dependencies of custom commands · 1296a0ea
      Brad King authored
      Custom command dependencies are followed for each target's source files
      and add their transitive closure to the corresponding target.  This
      means that when a custom command in one target has a dependency on a
      custom command in another target, both will appear in the dependent
      target's sources.  For the Makefile, VS IDE, and Xcode generators this
      is not a problem because each target gets its own independent build
      system that is evaluated in target dependency order.  By the time the
      dependent target is built the custom command that belongs to one of its
      dependencies will already have been brought up to date.
      For the Ninja generator we need to generate a monolithic build system
      covering all targets so we can have only one copy of a custom command.
      This means that we need to reconcile the target-level ordering
      dependencies from its appearance in multiple targets to include only the
      least-dependent common set.  This is done by computing the set
      intersection of the dependencies of all the targets containing a custom
      command.  However, we previously included only the direct dependencies
      so any target-level dependency not directly added to all targets into
      which a custom command propagates was discarded.
      Fix this by computing the transitive closure of dependencies for each
      target and then intersecting those sets.  That will get the common set
      of dependencies.  Also add a test to cover a case in which the
      incorrectly dropped target ordering dependencies would fail.
  4. 14 Jul, 2016 1 commit
  5. 13 Jul, 2016 2 commits
  6. 11 Jul, 2016 2 commits
  7. 10 Jul, 2016 2 commits
  8. 08 Jul, 2016 1 commit
  9. 06 Jul, 2016 1 commit
    • Brad King's avatar
      Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files · a66004be
      Brad King authored
      Document these variables.
      Change our convention for setting these variables from:
          set(CMAKE_C_FLAGS_INIT "...")
          string(APPEND CMAKE_C_FLAGS_INIT " ...")
      so that any value previously set by a toolchain file will be used.
      Automate the conversion with:
          sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \
            Modules/Compiler/*.cmake Modules/Platform/*.cmake
      and follow up with some manual fixes (e.g. to cases that already
      meant to append).  Also revert the automated changes to contexts
      that are not protected from running multiple times.
  10. 29 Jun, 2016 2 commits
    • Brad King's avatar
      try_compile: Add policy CMP0066 to honor CMAKE_<LANG>_FLAGS_<CONFIG> · d582c23a
      Brad King authored
      In the `try_compile` source file signature we propagate the caller's
      value of `CMAKE_<LANG>_FLAGS` into the test project.  Extend this to
      propagate `CMAKE_<LANG>_FLAGS_<CONFIG>` too instead of always using the
      default value in the test project.  This will be useful, for example, to
      allow the MSVC runtime library to be changed (e.g. `-MDd` => `-MTd`).
      However, some projects may currently depend on this not being done,
      so we need to activate the behavior using a policy.
      This change was originally made by commit v3.6.0-rc1~160^2 (try_compile:
      Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11) but without the
      policy and so had to be reverted during the 3.6 release candidate cycle.
      Fixes #16174.
    • Brad King's avatar
  11. 28 Jun, 2016 2 commits
  12. 27 Jun, 2016 1 commit
    • Ben Boeckel's avatar
      ninja, rc: ignore CMAKE_NINJA_FORCE_RESPONSE_FILE for RC files · 15b3f6f0
      Ben Boeckel authored
      In commit v3.6.0-rc1~174^2 (Ninja: Honor CMAKE_NINJA_FORCE_RESPONSE_FILE
      for compile rules, 2016-04-06), Ninja learned to look for
      `CMAKE_NINJA_FORCE_RESPONSE_FILE` in the current scope or the
      environment in order to force response file usage for all compilation
      However, on Windows, the RC compiler goes through cmcldeps which does a
      `replace(output, output + ".dep.obj")` on the command line. However,
      with a response file (which we name `output + ".rsp"`), the response
      file path is replaced instead causing the compiler to (correctly)
      complain that the response file `output + ".dep.obj.rsp"` does not
      What needs to happen is for cmcldeps to look through the response file,
      replace *its* contents and place it in the `output + ".dep.obj.rsp"`
      Also add a test which actually compiles an RC file into a library and
      executable for all generators on Windows and additionally test
      `CMAKE_NINJA_FORCE_RESPONSE_FILE` for Ninja generators.
      Fixes #16167.
  13. 22 Jun, 2016 1 commit
  14. 20 Jun, 2016 3 commits
  15. 18 Jun, 2016 1 commit
  16. 17 Jun, 2016 2 commits
    • Alex Turbov's avatar
      cmake: Add an option to control what files needs to be traced · e63151ff
      Alex Turbov authored
      Even in relatively small projects using `--trace` (and `--trace-expand`)
      may produce a lot of output.  When developing a custom module usually
      one is interested in output of only a few particular modules.
      Add a `--trace-source=<file>` option to enable tracing only a subset of
      source files.  The final output would be only from requested modules,
      ignoring anything else not matched to given filename(s).
    • Bill Hoffman's avatar
      Add options to run `ldd -u -r` as a "link-what-you-use" tool · 96242f80
      Bill Hoffman authored
      Create a LINK_WHAT_YOU_USE target property and corresponding
      CMAKE_LINK_WHAT_YOU_USE variable to enable this behavior.
      Extend link commands by running `ldd -u -r` to detect shared
      libraries that are linked but not needed.
  17. 14 Jun, 2016 1 commit
  18. 13 Jun, 2016 1 commit
  19. 12 Jun, 2016 1 commit
    • Stephen Kelly's avatar
      cmake: Issue message independent of cmMakefile definition · 0a4af073
      Stephen Kelly authored
      The makefile is only used when called by the cmMessageCommand, so inline
      the use of it there.  It otherwise creates an undesirable dependency on
      cmMakefile for issuing messages in the cmake instance, a violation of
      the Interface Segregation Principle.
      This also makes it more explicit that the variable definitions only
      affect the message() command.  If an AUTHOR_WARNING is issued for any
      other reason, it is not affected.  To affect that, it is necessary to
      set the cache variable instead of the regular variable.
      This is an unfortunate interface quirk, but one which can't be fixed
      easily now.
  20. 10 Jun, 2016 3 commits
  21. 09 Jun, 2016 1 commit
  22. 08 Jun, 2016 2 commits
  23. 07 Jun, 2016 4 commits
  24. 06 Jun, 2016 1 commit