1. 22 Jun, 2015 1 commit
  2. 15 Jun, 2015 1 commit
    • Bill Hoffman's avatar
      Add options to launch the compiler through tools like ccache or distcc · 698f7597
      Bill Hoffman authored and Brad King's avatar Brad King committed
      Create a <LANG>_COMPILER_LAUNCHER target property (initialized by a
      CMAKE_<LANG>_COMPILER_LAUNCHER variable) to specify a compiler launcher
      tool.  This will supersede the CMAKE_<LANG>_COMPILER_ARG1 approach to
      using such tools.  The old approach set CMAKE_<LANG>_COMPILER to the
      launcher tool while the new approach leaves this variable set to the
      actual compiler.
      
      Implement this property for Makefile and Ninja generators.  It cannot be
      implemented for VS or Xcode generators as the IDE build tools offer no
      such hooks.
      698f7597
  3. 06 Jun, 2015 1 commit
  4. 19 May, 2015 1 commit
  5. 18 May, 2015 1 commit
    • Brad King's avatar
      Ninja: Generate separate compile and link rules for each target · a390de65
      Brad King authored
      Our <LANG>_COMPILER and <LANG>_<TARGET_TYPE>_LINKER rule generation has
      access to a specific cmTarget so the results may depend on it.  Instead
      generate separate rules for each target using an encoded target name.
      In particular, this makes CTEST_USE_LAUNCHERS report proper target
      information.
      a390de65
  6. 07 May, 2015 2 commits
    • Thomas Herz's avatar
      Ninja: Use forward slashes for any GCC on Windows (#15439) · b3de0dfe
      Thomas Herz authored and Brad King's avatar Brad King committed
      Any GCC compiler on a Windows host needs forward slashes, not just
      those built for MinGW.
      b3de0dfe
    • Brad King's avatar
      Ninja: Refactor detection of MinGW tools on Windows · 378c2a0e
      Brad King authored
      Check for CMAKE_COMPILER_IS_MINGW only after enabling a language when it
      might actually be set.  Previously this worked by accident because the
      check for working compiler or a second language enabled would cause the
      code path to be taken.
      
      Store UsingMinGW as an instance member of cmGlobalNinjaGenerator so that
      it is reset on each reconfigure.  Otherwise cmake-gui cannot switch
      between build trees for MinGW or non-MinGW tools.
      378c2a0e
  7. 20 Apr, 2015 1 commit
  8. 09 Mar, 2015 1 commit
  9. 29 Jan, 2015 1 commit
    • Brad King's avatar
      Ninja: Use "deps = msvc" only for C and CXX (#15253) · 8a93d3ea
      Brad King authored
      The "/showIncludes" flag is only available with MS C and C++ compilers,
      and on compilers that "simulate" them (like Intel for Windows).  Fix our
      logic to choose this type only for MS tools with these languages.  All
      other cases need to use "deps = gcc" and define DEP_FILE in the build
      rule.
      8a93d3ea
  10. 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
  11. 22 Jan, 2015 1 commit
  12. 11 Jan, 2015 1 commit
  13. 22 Dec, 2014 1 commit
  14. 14 Nov, 2014 2 commits
    • Brad King's avatar
      Ninja: Refactor restat to be a string internally · 67bd514a
      Brad King authored
      This will allow values other than "" and "1" to be generated in
      the rules.ninja file.
      67bd514a
    • 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
  15. 15 Oct, 2014 1 commit
  16. 30 Jun, 2014 1 commit
    • Adam Strzelecki's avatar
      Ninja: Skip generating empty phony rules · 93371ed5
      Adam Strzelecki authored and Brad King's avatar Brad King committed
      Ninja generator ensures that all custom commands being target
      dependencies are run before other source compilations. However in case
      there are no such dependencies it currently generates empty phony rules
      which clutter the build graph.
      
      Teach the Ninja generator to produce such rules only when necessary.
      93371ed5
  17. 05 Jun, 2014 1 commit
    • Brad King's avatar
      Add OBJECT_FILE_DIR rule placeholder for compilation lines · 8256ccb7
      Brad King authored
      Some compilers do not offer an option to specify the path to the object
      file, but rather only to the directory in which to place the object
      file.  See issue 14876 for some examples.  Add a new OBJECT_FILE_DIR
      placeholder to specify the directory containing the object file for the
      current compilation.  This may differ from the main target OBJECT_DIR
      when the object corresponds to a source in a subdirectory.
      8256ccb7
  18. 21 May, 2014 1 commit
  19. 09 May, 2014 1 commit
    • Brad King's avatar
      Ninja: Fix deptype for Intel compiler on Linux · 54535f47
      Brad King authored
      Since commit v3.0.0-rc1~305^2 (Ninja: deptype msvc for Intel's compiler
      on Windows, 2013-11-25) we used "deps = msvc" for the Intel compiler.
      This is correct only on Windows.  On Linux we still want "deps = gcc".
      
      Fix the logic to use "deps = msvc" when the compiler id or the "simulate
      id" is "MSVC".  This will preserve the behavior on Intel for Windows and
      fix the behavior on Intel for Linux.  In the future this should be
      converted to a platform information module variable.
      54535f47
  20. 07 May, 2014 3 commits
  21. 02 May, 2014 1 commit
  22. 05 Apr, 2014 1 commit
  23. 02 Apr, 2014 2 commits
    • Stephen Kelly's avatar
      cmTarget: Make the source files depend on the config. · e6971df6
      Stephen Kelly authored
      Disallow the use of config-specific source files with
      the Visual Studio and Xcode generators. They don't have
      any way to represent the condition currently.
      
      Use the same common-config API in cmQtAutoGenerators. While
      it accepts config-specific files, it doesn't have to support
      multiple configurations yet.
      
      Loop over the configs in cmTargetTraceDependencies
      and cmGlobalGenerator::WriteSummary and consume all source
      files.
      
      Loop over the configs in cmComputeTargetDepends and compute the
      object library dependencies for each config.
      e6971df6
    • Stephen Kelly's avatar
      cmTarget: Allow any generator expression in SOURCES property. · e5da9e51
      Stephen Kelly authored
      Remove use of UseObjectLibraries from Makefile and Ninja generators. It
      is not needed now because those generators use GetExternalObjects
      which already contains the objects from object libraries.
      
      The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects
      methods. Ensure that duplicates are not created by skipping objects
      from object libraries in handling of GetExternalObjects.
      
      Similarly, fix VS6, VS7 and Xcode object handling by skipping
      external objects from OBJECT_LIBRARY usage as appropriate.
      
      The error message in the BadSourceExpression1 test is now reported
      by the generator expression evaluator, so it has different text.
      e5da9e51
  24. 23 Mar, 2014 1 commit
  25. 13 Mar, 2014 3 commits
  26. 12 Mar, 2014 1 commit
    • Brad King's avatar
      Generalize cmCustomCommandGenerator to more fields · bc993f27
      Brad King authored
      Until now the cmCustomCommandGenerator was used only to compute the
      command lines of a custom command.  Generalize it to get the comment,
      working directory, dependencies, and outputs of custom commands.  Update
      use in all generators to support this.
      bc993f27
  27. 11 Mar, 2014 1 commit
    • Stephen Kelly's avatar
      Remove some c_str() calls. · 21c573f6
      Stephen Kelly authored
      Use the clang RemoveCStrCalls tool to automatically migrate the
      code. This was only run on linux, so does not have any positive or
      negative effect on other platforms.
      21c573f6
  28. 08 Mar, 2014 3 commits
  29. 26 Feb, 2014 2 commits
    • Brad King's avatar
      MSVC: Add properties to configure compiler PDB files (#14763) · 0ea3aee8
      Brad King authored
      Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
      2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
      properties.  Those properties now exclusively handle linker PDB files.
      Since STATIC libraries do not link their compiler PDB file becomes more
      important.  Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
      "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
      file location and pass the value to the MSVC /Fd option.
      0ea3aee8
    • Brad King's avatar
      MSVC: Add properties to configure compiler PDB files (#14762) · fba51b09
      Brad King authored
      Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
      2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
      properties.  Those properties now exclusively handle linker PDB files.
      Since STATIC libraries do not link their compiler PDB file becomes more
      important.  Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
      "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
      file location and pass the value to the MSVC /Fd option.
      fba51b09
  30. 24 Feb, 2014 1 commit