1. 04 Jun, 2018 1 commit
    • Jean-Christophe Fillion-Robin's avatar
      ExternalProject: Fix cache generation when args end with "-NOTFOUND" · 7ad5165c
      Jean-Christophe Fillion-Robin authored and Brad King's avatar Brad King committed
      Generalize the fix in commit v3.11.0-rc4~8^2 (ExternalProject: Fix cache
      generation when last args ends with "-NOTFOUND", 2018-03-10) to work for
      any argument rather than just the last one.
      
      ExternalProject can now successfully generate the cache file when any
      (not only the last one) cache variable associated with either
      `CMAKE_CACHE_ARGS` or `CMAKE_DEFAULT_CACHE_ARGS` configure step option
      is set to a `<value>` ending with `-NOTFOUND`.
      7ad5165c
  2. 01 Jun, 2018 2 commits
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · d7204e64
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 6.0.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      d7204e64
    • Brad King's avatar
      clang-format.bash: update to clang-format-6.0 · 523c443d
      Brad King authored
      Update `.clang-format` with configuration to make the 6.0 format as
      close as possible to what 3.8 produced before.  Then revise the style:
      
      * Indent preprocessor directives (a feature new since 3.8)
      * Add a newline and indentation before inheritance `:` and `,`
      
      Rename the Git attribute identifying the format to include the
      clang-format version number: `format.clang-format-6.0`.  This will aid
      external infrastructure in knowing what version of the tool to run.
      523c443d
  3. 29 May, 2018 1 commit
  4. 25 May, 2018 1 commit
  5. 24 May, 2018 1 commit
  6. 15 May, 2018 1 commit
  7. 14 May, 2018 1 commit
    • Brad King's avatar
      add_custom_{command,target}: Fix crash on empty expanded command · 6e594916
      Brad King authored
      Our custom command generation logic assumes that all command lines have
      at least `argv0`.  In `add_custom_{command,target}` we already check
      that at least a `COMMAND` was given, but using `COMMAND_EXPAND_LISTS` in
      combination with a generator expression that expands to an empty string
      may produce an empty command line.  In this case simply add an empty
      string as a command to maintain our internal invariant.
      
      Fixes: #17993
      6e594916
  8. 11 May, 2018 1 commit
  9. 10 May, 2018 1 commit
    • Brad King's avatar
      add_library: Restore error on alias of non-global imported target · e567d7eb
      Brad King authored
      In commit v3.11.0-rc1~433^2~1 (Add support for IMPORTED GLOBAL targets
      to be aliased, 2017-09-14) we accidentally dropped the error on calling
      `add_library` to alias an imported target that is not globally visible.
      The `add_executable` command's equivalent check was properly updated.
      Restore the check in `add_library` with the same update.  Also fix the
      test case accordingly.
      
      Fixes: #17982
      e567d7eb
  10. 09 May, 2018 1 commit
    • Kyle Edwards's avatar
      ctest_start: read model from TAG file · 56378109
      Kyle Edwards authored
      This change reworks ctest_start() so that simply calling
      ctest_start(APPEND) will read all the information from the TAG file.
      On top of that, it relaxes the argument parsing for ctest_start() to
      allow greater flexibility in the argument ordering, and the documentation
      for ctest_start() has been cleaned up.
      56378109
  11. 07 May, 2018 1 commit
  12. 03 May, 2018 2 commits
  13. 26 Apr, 2018 1 commit
    • Brad King's avatar
      Ninja: Avoid empty phony edges for target ordering · 625b8f90
      Brad King authored
      Since commit v3.9.0-rc1~230^2~2 (ninja: break unnecessary target
      dependencies, 2017-04-17) we unconditionally generate a phony edge for
      target ordering.  It is needed in case a later target depends on it.
      However, if the phony edge has no inputs then `ninja -d explain` prints:
      
          ninja explain: output ... of phony edge with no inputs doesn't exist
      
      Furthermore the phony edge's output is considered dirty and can cause
      dependents to be incorrectly considered dirty.  Avoid this by always
      generating at least one input to the target ordering phony edges.
      If we have no real dependencies just use a path that always exists.
      
      Fixes: #17942
      625b8f90
  14. 24 Apr, 2018 1 commit
  15. 23 Apr, 2018 3 commits
    • Raffi Enficiaud's avatar
      FindMatlab: Matlab Runtime Compiler support · 59fb9e89
      Raffi Enficiaud authored and Brad King's avatar Brad King committed
      * Determining automatically the MCR version on OSX and Windows
      * Distinguishing between MCR and Matlab
      * Specific tests for the MCR
      * mexext on windows does not work properly: the mexext is hardcoded
      * Doc updates for the MCR
      
      Fixes: #16487
      59fb9e89
    • Marc Chevrier's avatar
      Genex: Add $<TARGET_GENEX_EVAL:...> and $<GENEX_EVAL:...> · 4d15046e
      Marc Chevrier authored
      Fixes: #17884
      4d15046e
    • Fujii Hironori's avatar
      VS: Generate a custom command only in the least dependent target · f59c33a7
      Fujii Hironori authored
      If a custom command is assigned to multiple targets, generate the build
      rule only in the least-dependent `.vcxproj` file.  Otherwise MSBuild
      will run the command on the first build of a dependent target even if
      its dependencies already brought the command up to date (in order to
      populates its build log).
      
      Generate targets in least-to-most-dependent order, and assign a custom
      command to the least dependent target.
      
      Added cmLocalVisualStudio10Generator::GenerateTargetsDepthFirst to call
      cmVisualStudio10TargetGenerator::Generate in least-dependent order.
      
      Moved SourcesVisited from cmVisualStudio10TargetGenerator to
      cmLocalVisualStudio10Generator to avoid attaching a custom command to
      multiple targets among the local generator.
      
      Fixes: #16767
      f59c33a7
  16. 19 Apr, 2018 1 commit
  17. 18 Apr, 2018 1 commit
    • Brad King's avatar
      CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES · a61ae3fb
      Brad King authored
      Other check modules honor this variable, so include file checks should
      too.  Add policy `CMP0075` to enable the behavior in a compatible way.
      
      This change was originally made by commit v3.11.0-rc1~108^2
      (CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES, 2017-12-24) but it
      was reverted by commit v3.11.1~9^2 (Revert "CheckIncludeFiles: Honor
      CMAKE_REQUIRED_LIBRARIES", 2018-04-04) because the behavior change could
      affect checks in existing projects in an incompatible way.
      
      Fixes: #9514
      a61ae3fb
  18. 17 Apr, 2018 1 commit
    • Brad King's avatar
      Android: Add support for NDK r17 · da294a03
      Brad King authored
      The `armeabi` ABI is no longer available, so we can no longer use it by
      default unconditionally.  Instead detect all available ABIs and choose
      the oldest arm ABI that is available.
      
      Also update the test suite to account for the lack of `armeabi` support
      and pass as of Android NDK r17-beta2.
      da294a03
  19. 16 Apr, 2018 1 commit
  20. 13 Apr, 2018 1 commit
    • Brad King's avatar
      Restore support for explicitly referenced CMakeLists.txt sources · 8480c2af
      Brad King authored
      Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources
      without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to
      target sources but instead generate references to them directly.  This
      broke projects that explicitly specify their `CMakeLists.txt` file as a
      source file because the explicit entry is no longer consolidated with
      the generated one.
      
      Teach the relevant generators to avoid duplicating `CMakeLists.txt`
      source references and add test cases.
      
      Fixes: #17828
      8480c2af
  21. 11 Apr, 2018 1 commit
  22. 10 Apr, 2018 1 commit
    • Brad King's avatar
      CPack: Fix crash on invalid generator name · 6f2701ab
      Brad King authored
      In commit v3.11.0-rc1~68^2 (CPack: accept --trace and --trace-expand,
      2017-12-09) a nullptr dereference was added that occurs when
      `cpack -G NotAGenerator` is invoked.  Add the needed condition.
      
      Fixes: #17900
      6f2701ab
  23. 09 Apr, 2018 1 commit
  24. 05 Apr, 2018 1 commit
    • Brad King's avatar
      Ninja: Fix Fortran support with response files · d6390ce2
      Brad King authored
      The Ninja generator splits preprocessing and compilation steps for
      Fortran.  Fix this logic to work when using response files for
      compilation so that it works for the preprocessing step too.
      
      This fixes behavior under `CMAKE_NINJA_FORCE_RESPONSE_FILE`.
      
      Issue: #17877
      d6390ce2
  25. 03 Apr, 2018 2 commits
  26. 02 Apr, 2018 2 commits
  27. 01 Apr, 2018 1 commit
  28. 28 Mar, 2018 1 commit
  29. 26 Mar, 2018 2 commits
    • Brad King's avatar
      cmake_minimum_required: Tolerate unknown future arguments · 8dc97acb
      Brad King authored
      When a `...<max>` version is given that is larger than the running
      version of CMake, assume that the project is aware of a newer version of
      CMake and that any unknown arguments are future arguments.  This will
      allow future versions of CMake to add arguments to the command that
      projects can use without introducing errors in older versions of CMake
      (back to 3.12).
      8dc97acb
    • Brad King's avatar
      Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF" · 70c50aa2
      Brad King authored
      Revert commit v3.8.0-rc1~305^2 (Remove CTestTestfile.cmake when BUILD_TESTING
      is OFF, 2016-11-14) again.  We reverted it once in commit v3.8.0-rc3~22^2
      (Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF", 2017-03-06) but
      it was accidentally restored by commit v3.11.0-rc1~387^2 (server: add
      "ctestInfo" request to get test info, 2017-10-25), perhaps due to conflict
      resolution during rebase.
      
      We cannot remove `CTestTestfile.cmake` when testing is off because it breaks
      projects that never enable testing but create their own `CTestTestfile.cmake`
      manually instead.  Revert the change again and add a test case.
      70c50aa2
  30. 21 Mar, 2018 4 commits