1. 01 Jun, 2018 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · d7204e64
      Kitware Robot authored
      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
  2. 13 Jan, 2017 1 commit
  3. 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'
      7a649111
  4. 16 May, 2016 1 commit
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · d9fd2f54
      Kitware Robot authored
      Run the `Utilities/Scripts/clang-format.bash` script to update
      all our C++ code to a new style defined by `.clang-format`.
      Use `clang-format` version 3.8.
      
      * 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.
      d9fd2f54
  5. 09 Mar, 2016 1 commit
    • Brad King's avatar
      Drop Visual Studio 6 generator · b42866a3
      Brad King authored
      This generator has been deprecated since CMake 3.3.  Remove it.
      Update documentation, modules, and tests to drop content specific
      to this generator.
      b42866a3
  6. 28 Jan, 2015 1 commit
    • Brad King's avatar
      Normalize OBJECT_DEPENDS paths to match custom commands (#15366) · 9259d778
      Brad King authored
      Custom command path normalization added in commit v3.1.0-rc1~471^2
      (add_custom_command: Normalize OUTPUT and DEPENDS paths, 2014-05-28)
      broke use of OBJECT_DEPENDS to bring in custom commands because the
      latter paths were not normalized too.  Normalize them and add a test
      case.
      
      Reported-by: Daniel v. Gerpen
      9259d778
  7. 08 Jan, 2015 1 commit
    • Clinton Stimpson's avatar
      Encoding: Modify tests to work using non-ascii paths. · 9a8ab866
      Clinton Stimpson authored
      For complex*, CustomCommand and OutDir tests, non-ascii paths
      are avoided in test code by using relative paths, and setting
      the working when running the test.  This also avoids the
      need to internationalize the test code.
      
      For RunCMake.GeneratorExpression, use a UTF-8 encoding in
      file(STRINGS) to retrieve the compiled absolute path correctly.
      9a8ab866
  8. 14 Nov, 2014 2 commits
    • Brad King's avatar
      Add an option for explicit BYPRODUCTS of custom commands (#14963) · e15a7075
      Brad King authored
      A common idiom in CMake-based build systems is to have custom commands
      that generate files not listed explicitly as outputs so that these
      files do not have to be newer than the inputs.  The file modification
      times of such "byproducts" are updated only when their content changes.
      Then other build rules can depend on the byproducts explicitly so that
      their dependents rebuild when the content of the original byproducts
      really does change.
      
      This "undeclared byproduct" approach is necessary for Makefile, VS, and
      Xcode build tools because if a byproduct were listed as an output of a
      rule then the rule would always rerun when the input is newer than the
      byproduct but the byproduct may never be updated.
      
      Ninja solves this problem by offering a 'restat' feature to check
      whether an output was really modified after running a rule and tracking
      the fact that it is up to date separately from its timestamp.  However,
      Ninja also stats all dependencies up front and will only restat files
      that are listed as outputs of rules with the 'restat' option enabled.
      Therefore an undeclared byproduct that does not exist at the start of
      the build will be considered missing and the build will fail even if
      other dependencies would cause the byproduct to be available before its
      dependents build.
      
      CMake works around this limitation by adding 'phony' build rules for
      custom command dependencies in the build tree that do not have any
      explicit specification of what produces them.  This is not optimal
      because it prevents Ninja from reporting an error when an input to a
      rule really is missing.  A better approach is to allow projects to
      explicitly specify the byproducts of their custom commands so that no
      phony rules are needed for them.  In order to work with the non-Ninja
      generators, the byproducts must be known separately from the outputs.
      
      Add a new "BYPRODUCTS" option to the add_custom_command and
      add_custom_target commands to specify byproducts explicitly.  Teach the
      Ninja generator to specify byproducts as outputs of the custom commands.
      In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets
      that link, the byproducts must be specified as outputs of the link rule
      that runs the commands.  Activate 'restat' for such rules so that Ninja
      knows it needs to check the byproducts, but not for link rules that have
      no byproducts.
      e15a7075
    • Peter Collingbourne's avatar
      Add USES_TERMINAL option for custom commands · fe5d6e8c
      Peter Collingbourne authored
      Teach the add_custom_command and add_custom_target commands a new
      USES_TERMINAL option.  Use it to tell the generator to give the command
      direct access to the terminal if possible.
      fe5d6e8c
  9. 28 May, 2014 1 commit
    • Stephen Kelly's avatar
      add_custom_command: Normalize OUTPUT and DEPENDS paths. · c4af46b4
      Stephen Kelly authored
      While tracing dependencies of a target, cmTargetTraceDependencies
      follows sources by full path to determine if the source is to be
      produced by a custom command.  Commit 4959f341 (cmSourceFileLocation:
      Collapse full path for directory comparisons., 2014-03-27) changed
      the storage of target sources to be in the form of a normalized
      path instead of an unnormalized path.
      
      The path is followed by looking it up in a mapping via
      cmMakefile::GetSourceFileWithOutput to acquire an appropriate
      cmSourceFile.  The mapping is populated with the OUTPUT components
      of add_custom_command invocations, however it is populated with
      unnormalized paths.  This means that the tracing logic does not
      find appropriate cmSourceFiles, and does not generate appropriate
      build rules for the generated sources.
      
      Normalize the paths in the OUTPUT components of add_custom_command
      to resolve this.
      
      The paths in the DEPENDS component of add_custom_command are also
      not normalized, leading to the same problem again.  Normalize the
      depends paths after generator evaluation and expansion.
      c4af46b4
  10. 14 Apr, 2014 1 commit
  11. 20 Mar, 2014 1 commit
  12. 19 Nov, 2013 1 commit
  13. 13 Nov, 2013 1 commit
  14. 28 Oct, 2013 1 commit
  15. 25 Jun, 2013 1 commit
  16. 13 Aug, 2012 3 commits
    • Kitware Robot's avatar
      Remove CMake-language block-end command arguments · 9db31162
      Kitware Robot authored
      Ancient versions of CMake required else(), endif(), and similar block
      termination commands to have arguments matching the command starting the
      block.  This is no longer the preferred style.
      
      Run the following shell code:
      
      for c in else endif endforeach endfunction endmacro endwhile; do
          echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      9db31162
    • Kitware Robot's avatar
      Convert CMake-language commands to lower case · 77543bde
      Kitware Robot authored
      Ancient CMake versions required upper-case commands.  Later command
      names became case-insensitive.  Now the preferred style is lower-case.
      
      Run the following shell code:
      
      cmake --help-command-list |
      grep -v "cmake version" |
      while read c; do
          echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      77543bde
    • Kitware Robot's avatar
      Remove trailing whitespace from most CMake and C/C++ code · 7bbaa428
      Kitware Robot authored
      Our Git commit hooks disallow modification or addition of lines with
      trailing whitespace.  Wipe out all remnants of trailing whitespace
      everywhere except third-party code.
      
      Run the following shell code:
      
      git ls-files -z -- \
       bootstrap doxygen.config '*.readme' \
       '*.c' '*.cmake' '*.cpp' '*.cxx' \
       '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
       '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
      egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
      egrep -z -v '^(Modules/CPack\..*\.in)' |
      xargs -0 sed -i 's/ \+$//'
      7bbaa428
  17. 09 Jul, 2012 1 commit
  18. 30 Mar, 2011 1 commit
    • Brad King's avatar
      Normalize slashes of add_custom_(command|target) DEPENDS (#11973) · 12860505
      Brad King authored
      All commands accepting file paths should normalize the slashes so that
      the string-represented names can be compared reliably.  The commands
      add_library and add_executable have done this for years.  We taught
      add_custom_command to normalize its OUTPUT names in commit a75a0a14
      (Normalize add_custom_command OUTPUT names, 2010-12-15).  We handled a
      special case of the DEPENDS option in commit 7befc007 (Handle trailing
      slashes on add_custom_command DEPENDS, 2011-01-26).
      
      Teach both add_custom_command and add_custom_target to normalize slashes
      of DEPENDS files up front.  This approach subsumes the above-mentioned
      special case so remove the one line added for it but keep its test.
      Extend the CustomCommand test to check that slash count mismatches
      between custom command OUTPUT and DEPENDS can still be linked correctly.
      12860505
  19. 20 Dec, 2010 1 commit
  20. 15 Dec, 2010 2 commits
    • Brad King's avatar
      Introduce "generator expression" syntax to custom commands (#11209) · f0cdb600
      Brad King authored
      Evaluate in the COMMAND arguments of custom commands the generator
      expression syntax introduced in commit d2e1f2b4 (Introduce "generator
      expressions" to add_test, 2009-08-11).  These expressions have a syntax
      like $<TARGET_FILE:mytarget> and are evaluated during build system
      generation.  This syntax allows per-configuration target output files to
      be referenced in custom command lines.
      f0cdb600
    • Brad King's avatar
      Normalize add_custom_command OUTPUT names (#10485) · a75a0a14
      Brad King authored
      Previously the OUTPUT arguments of add_custom_command were not
      slash-normalized but those of add_library and add_executable were.
      This caused the example
      
        add_custom_command(OUTPUT a//b.c ...)
        add_library(... a//b.c ...)
      
      to fail at build time with "no rule to make a/b.c".  Fix this and modify
      the CustomCommand test to try it.
      a75a0a14
  21. 08 Dec, 2010 1 commit
    • Brad King's avatar
      Skip file-level dependencies on custom targets (#11332) · ced1d5ec
      Brad King authored
      A custom command may name a target created by add_custom_target in its
      DEPENDS field.  Treat this case as a target-level dependency only since
      a custom target provides no standard file on which to add a file-level
      dependency.
      ced1d5ec
  22. 20 Sep, 2010 1 commit
    • David Cole's avatar
      Avoid CustomCommand test failure on VS71 (#9963) · a798bb70
      David Cole authored
      Test still failing on dash1.kitware. Give up on testing
      the new arg on MSVC71. Test it with newer nmakes instead.
      All other dashboards are fine with -DPATH=c:/posix/path
      as the first arg, so keep it except when MSVC71 is true.
      a798bb70
  23. 14 Sep, 2010 1 commit
    • David Cole's avatar
      Avoid CustomCommand test failure on VS71 (#9963) · 9b4ab06c
      David Cole authored
      The new first arg in the test is the critical one
      to prove that the new NMake specific code works.
      The additional colons in the middle of the arg
      stream work fine everywhere else, but not on
      dash1.kitware with Visual Studio 7.1. Just avoid
      the failure for now by removing the unnecessary
      new args from the test.
      9b4ab06c
  24. 12 Sep, 2010 1 commit
    • David Cole's avatar
      No extra spaces in CustomCommand test (#9963) · 9d2e6489
      David Cole authored
      The nightly dashboard showed that the following
      platforms had difficulties dealing with "bin dir"
      and/or "check command line" as directory and
      file names:
      
        AIX
        Borland 5.5, 5.6 and 5.8
        IRIX
        NMake 6.0
        OpenBSD
        VS 7.1
        Watcom
      
      Re-visit later, after the release, to use spaces
      in the bin dir and in the target name where possible.
      9d2e6489
  25. 10 Sep, 2010 1 commit
    • David Cole's avatar
      Enable calling commands with : in argv[1] (#9963) · 269a4b87
      David Cole authored
      The solution seems hackish, but it works: for
      NMake only, prepend a no-op command before each
      real command that begins with ".
      
      This is really a work-around for an NMake problem.
      When a command begins with ", nmake truncates the
      first argument to the command after the first :
      in that arg. It has a parsing problem.
      
      Workaround..., hackish..., but it should solve
      the issue for #9963 and its related friends.
      
      Also, modify the CustomCommand test to replicate
      the problem reported in issue #9963. Before the
      NMake specific code change, the test failed.
      Now, it passes. Ahhhhhh.
      269a4b87
  26. 01 Oct, 2009 1 commit
  27. 25 Sep, 2009 2 commits
  28. 08 Jul, 2009 1 commit
  29. 18 Dec, 2008 1 commit
    • Brad King's avatar
      BUG: Fix windows command line escape for empty arg · 0a83aa6f
      Brad King authored
      On Windows the KWSys System package generates escapes for command-line
      arguments.  This fix enables quoting of the empty string as an argument.
      This also adds a test to pass an empty argument to a custom command.
      0a83aa6f
  30. 09 Oct, 2008 1 commit
    • Brad King's avatar
      ENH: Allow custom sources in custom targets · c5f70ff2
      Brad King authored
      This adds a SOURCES option to ADD_CUSTOM_TARGET, enabling users to
      specify extra sources for inclusion in the target.  Such sources may not
      build, but will show up in the IDE project files for convenient editing.
      See issue #5848.
      c5f70ff2
  31. 05 Aug, 2008 1 commit
    • Brad King's avatar
      ENH: Test relative path custom command output · 32df2a71
      Brad King authored
      As of CMake 2.6 a custom command output specified by relative path is
      placed in the build tree.  This adds a test to make sure other
      references to the output are hooked up correctly, fixing a bug in CMake
      2.6.1.
      32df2a71
  32. 05 Jun, 2008 1 commit
  33. 04 Jun, 2008 1 commit
  34. 02 Jun, 2008 1 commit
  35. 14 May, 2008 1 commit