1. 14 Jul, 2017 1 commit
    • Brad King's avatar
      Diagnose object library self-reference · d89e10cd
      Brad King authored
      The code
          add_library(A OBJECT a.c)
          target_sources(A PRIVATE $<TARGET_OBJECTS:A>)
      used to crash CMake via infinite recursion while evaluating the
      generator expression.  Then the change in commit v3.9.0-rc1~266^2~1
      (cmGeneratorTarget: Replace source classifier implementation,
      2017-04-07) avoided the infinite recursion because GetKindedSources now
      creates a map entry and initializes it once.  If it is called again on
      the same target during that initialization, the partially computed
      results are returned.  This is still wrong but does not crash.
      Detect and diagnose this case instead.
      Co-Author: Ben Boeckel <ben.boeckel@kitware.com>
      Fixes: #16578
  2. 11 Jul, 2017 2 commits
  3. 10 Jul, 2017 1 commit
    • Brad King's avatar
      bindexplib: Revert support for constants symbols · 3250b9a1
      Brad King authored
      Revert the main logic change of commit v3.9.0-rc1~192^2 (bindexplib: fix
      constants symbols export, 2017-04-26) and its test case.  Unfortunately
      some constants may be provided by multiple object files with different
      `@...` suffixes, leading to ambiguous references.  Revert support
      pending further investigation.
      Fixes: #17045
  4. 07 Jul, 2017 2 commits
    • Brad King's avatar
      find_package: Restore longer message when config files were considered · e7730d78
      Brad King authored
      Since commit v3.9.0-rc1~58^2 (find_package: shorten output for missing
      package in config mode, 2017-05-09) we print only the one line
          - Could NOT find Foo (missing: Foo_DIR)
      when package Foo cannot be found in CONFIG mode and it is not REQUIRED.
      However, in the case that package configuration files were found but not
      used, this one line message leaves out important information.  This can
      happen when a package configuration file sets `Foo_FOUND` to `FALSE` or
      when its package version file does not match the requested version.
      Restore the longer message in these cases.  Otherwise a seemingly valid
      explicit `Foo_DIR` setting appears to be silently ignored even if it was
      Fixes: #17029
    • Brad King's avatar
      Autogen: Skip generated files for compatibility with CMake 3.8 · 9a34e95a
      Brad King authored
      The change in commit v3.9.0-rc1~464^2~8 (Autogen: Add AUTOMOC/UIC
      support for generated source files, 2017-03-02) changes behavior of
      existing projects that may not expect `AUTOGEN` on generated files and
      do not yet set `SKIP_AUTOGEN` on them.  Disable the behavior change for
      now to fix the regression for CMake 3.9.  We can restore it later with a
      In order to keep the implementation and tests working, add an
      undocumented property we can use in the tests to enable the behavior
      before the policy is introduced.
      Fixes: #17031
      Issue: #16186
  5. 27 Jun, 2017 1 commit
    • Brad King's avatar
      VS: Fix support for nvcc flags not in our flag table · bbc1f364
      Brad King authored
      The change in commit v3.9.0-rc4~3^2 (VS: Improve workaround for CUDA
      -Xcompiler placement bug, 2017-06-21) accidentally appended to the
      `AdditionalOptions` as if it were a `;`-separated list, but it is
      actually a command-line string.  Append with a space instead.
      While at it, fix the same problem for the `AdditionalOptions` added to
      `CudaLink` by commit v3.9.0-rc3~1^2 (CUDA: When linking device code
      suppress CUDA 8.0+ deprecation warnings, 2017-06-09).
      Fixes: #17008
  6. 26 Jun, 2017 2 commits
  7. 22 Jun, 2017 1 commit
    • Brad King's avatar
      VS: Fix support for rc /nologo flag in per-source COMPILE_FLAGS · 974f4333
      Brad King authored
      Since commit v3.9.0-rc1~160^2 (VS: Use tool-specific flag table for
      COMPILE_FLAGS parsing, 2017-05-03) we now correctly use the `rc` flag
      table to process the COMPILE_FLAGS flags of `.rc` source files instead
      of incorrectly using the `cl` flag table as before.  However, our `rc`
      flag table is not complete.  The `/nologo` flag was working before only
      by accident because the `cl` flag table entry for it happened to match.
      Add the proper entry to the `rc` flag table.
      Fixes: #16991
  8. 21 Jun, 2017 3 commits
    • Brad King's avatar
      VS: Improve workaround for CUDA -Xcompiler placement bug · 3b754215
      Brad King authored
      In commit v3.9.0-rc1~431^2~6 (VS: Place CUDA host compiler options in
      proper project file fields, 2017-03-07) we worked around a bug in the
      CUDA VS integration by dropping `AdditionalCompilerOptions`.  However,
      this silently drops `-Xcompiler=` options given by the user that don't
      map to one of CudaCompile's dedicated settings.  Improve the workaround
      to instead put the remaining `AdditionalCompilerOptions` into the
      `AdditionalOptions` field behind `-Xcompiler=` ourselves.
    • Brad King's avatar
      VS: Fix target_compile_options for CUDA · f2059585
      Brad King authored
      Fix the VS generator to honor `COMPILE_OPTIONS` for CUDA.  The exclusion
      added by commit v3.9.0-rc1~431^2~7 (VS: Do not pass CUDA compile options
      to C compiler, 2017-03-07) was correct but we need additional logic to
      pass the CUDA compile options to the CUDA compiler.  Also we should
      still pass the CXX or C options to MSVC (ClCompile) when those languages
      are enabled even if the link language is CUDA.
    • Michael Stürmer's avatar
  9. 14 Jun, 2017 1 commit
    • Brad King's avatar
      IPO: Consider support for each language separately · ba247cca
      Brad King authored
      We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
      Fortran languages.  Do not try to enable support for other languages.
      Furthermore, each language builds with a different compiler, so check
      for support by CMake and the compiler for each language independently.
      Fixes: #16944
  10. 05 Jun, 2017 1 commit
  11. 02 Jun, 2017 1 commit
  12. 31 May, 2017 2 commits
  13. 30 May, 2017 3 commits
  14. 29 May, 2017 2 commits
  15. 26 May, 2017 3 commits
  16. 24 May, 2017 1 commit
    • Alex Turbov's avatar
      Improve Doxygen support · 59ffabfe
      Alex Turbov authored
      Except Graphviz's `dot` Doxygen may use few other utilities like
      `mscgen` (Message Sequence Chart) and `dia` (Diagram Editor).
      Now this module allows to manage Doxygen settings from `CMakeLists.txt`
      and forget about `Doxyfile`s. Also it provides a helper function
      to add a target to generate documentation: `doxygen_add_docs`.
      Implement code review notes:
      - Introduce `COMPONENTS` to find: `dot`, `mscgen` and `dia`;
      - Deprecate variables `DOXYGEN_SKIP_DOT`, `DOXYGEN_EXECUTABLE`,
        `doxygen_add_docs ` usage instead;
      - Properly handle paths to found tools in Windows;
      - Prevent adding a custom target if Doxygen was not really found;
      - Introduce exported (executable) targets for found components.
      Co-Author: Craig Scott <craig.scott@crascit.com>
  17. 23 May, 2017 1 commit
  18. 22 May, 2017 2 commits
    • Matthew Woehlke's avatar
      Improve find_dependency argument handling · ab358d6a
      Matthew Woehlke authored
      Remove highly specialized and totally positional argument handling in
      find_dependency macro, and instead just pass arguments through to
      find_package. This gives users access to the full suite of arguments
      that find_package knows, and is backward compatible with the old
      Also, rewrite the unit tests for this, since the old tests are
      exclusively focused on testing the old argument handling and are no
      longer applicable, and add some success tests (the old tests did not
      even set up the CMake state in a way that CMake had any hope of ever
      finding the test package).
    • Brad King's avatar
      FindProtobuf: Rename imported targets to match upstream names · a5ccddf0
      Brad King authored
      Rename our recently added imported targets to match those provided by
      the upstream's CMake-based build.  That way a project using
      `find_package(Protobuf)` can get the same target names no matter how
      protobuf is found.
      Suggested-by: Konstantin Podsvirov's avatarKonstantin Podsvirov <konstantin@podsvirov.pro>
  19. 20 May, 2017 1 commit
    • Christian Pfeiffer's avatar
      ImplicitLinkInfo: Add support for PGI on Windows · c2c2d366
      Christian Pfeiffer authored
      Since PGI does not write linker directives into objects, the necessary
      libraries have to be parsed from commandline. PGI does however link the
      Visual C++ runtime libraries, so they have to be filtered out to ensure
      no collision with settings of other languages can occur.
  20. 18 May, 2017 4 commits
  21. 17 May, 2017 1 commit
    • stryku's avatar
      source_group: Restore TREE support for relative paths · 4716f2be
      stryku authored
      The fix in commit v3.8.1~4^2 (source_group: Fix TREE with root that is
      not current source dir, 2017-04-20) accidentally broke support for
      specifying paths relative to the source directory.  Fix it and add a
      test covering the case.
      While at it, fix a typo in a variable name.
      Fixes: #16876
  22. 16 May, 2017 2 commits
  23. 15 May, 2017 2 commits