1. 22 Jun, 2015 1 commit
  2. 20 May, 2015 2 commits
  3. 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
  4. 08 May, 2015 1 commit
  5. 07 May, 2015 1 commit
    • Thomas Herz's avatar
      Ninja: Do not use newlines in response files with Windows GNU tools (#15439) · 20560e8d
      Thomas Herz authored and Brad King's avatar Brad King committed
      Since commit v2.8.11~213^2 (Ninja: Avoid LNK1170 linker error, 2013-02-01)
      we generate linker response files with "$in_newline" to support a large
      number of object files with the MS link.exe tool.  However, the GNU linker
      on Windows does not understand the newline endings that Ninja puts in the
      response files.  Switch back to "$in" for that case.
  6. 10 Mar, 2015 1 commit
  7. 23 Jan, 2015 1 commit
  8. 11 Jan, 2015 1 commit
  9. 22 Dec, 2014 1 commit
    • Brad King's avatar
      Ninja: Generate rules only for languages compiled in a target (#15325) · fdbfcfdf
      Brad King authored
      Refactoring in commit v3.1.0-rc1~688^2~2 (cmTarget: Compute languages
      from object libraries on demand, 2014-03-18) taught cmTarget::GetLanguages
      to (correctly) include the languages of object library sources.  Previously
      this was done only in cmTarget::ComputeLinkImplementationLanguages to
      choose the linker language.
      The Ninja generator writes out generic build rules for each language
      compiled within a target using the rule variables defined in the
      directory of the target.  This only needs to be done for languages
      actually compiled within the current target.  Switch from using the
      cmTarget::GetLanguages method to get the list of languages over to
      using cmTarget::GetSourceFiles directly so we do not get the languages
      in object libraries.
      Strictly speaking this should make no difference because it is not safe
      to use objects from a language not enabled in the directory containing
      a target or else the link information for the language may not be
      considered.  However, in cases when no link information happens to be
      needed for a language it was possible in CMake 3.0 and below to enable
      a language only in a subdirectory providing an object library, and then
      use the objects from a containing directory.  The above change teaches
      the Ninja generator to continue working in this case.
  10. 14 Nov, 2014 3 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.
    • 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.
    • Brad King's avatar
      Ninja: Use a TARGET_FILE variable to hold the link output file · ef42e57d
      Brad King authored
      Use an explicit "$TARGET_FILE" variable instead of "$out" so that
      we can have multiple output files while still only referencing the
      main one in command lines.
  11. 15 Oct, 2014 1 commit
  12. 29 Jul, 2014 1 commit
  13. 01 Jul, 2014 1 commit
    • Ben Boeckel's avatar
      Ninja: Add order-only dependencies to link commands (#14728) · ac8879ce
      Ben Boeckel authored and Brad King's avatar Brad King committed
      A library or executable target that consists only of a reference to an
      object library may have no sources to compile or custom commands to run.
      The command in the target is the link (or archive) command.  Add missing
      order-only dependencies to link commands so that target ordering
      dependencies are satisfied for it without depending on an intermediate
      compilation rule.
      Extend the ObjectLibrary test to cover this case.
      Co-Author: Brad King <brad.king@kitware.com>
  14. 21 May, 2014 1 commit
  15. 15 Apr, 2014 3 commits
  16. 08 Apr, 2014 1 commit
  17. 02 Apr, 2014 1 commit
    • 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
      Loop over the configs in cmComputeTargetDepends and compute the
      object library dependencies for each config.
  18. 01 Apr, 2014 1 commit
  19. 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.
  20. 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.
  21. 10 Mar, 2014 1 commit
  22. 08 Mar, 2014 3 commits
  23. 25 Nov, 2013 1 commit
  24. 22 Nov, 2013 1 commit
  25. 19 Nov, 2013 1 commit
  26. 24 Oct, 2013 1 commit
  27. 22 Jul, 2013 1 commit
    • Clinton Stimpson's avatar
      OS X: Fix regression handling frameworks for Ninja · 603bc599
      Clinton Stimpson authored and Brad King's avatar Brad King committed
      Fix a regression created by commit 373faae5 (Refactor how bundles and
      frameworks are supported, 2013-05-05).
      Since the ninja file isn't aware of how framework symlinks work, we
      suppress symlink creation and let cmOSXBundleGenerator handle it.  Also,
      use the real name of framework library in build rules as was done
      before, instead of the symlink.
  28. 12 Jul, 2013 1 commit
  29. 01 Jul, 2013 1 commit
  30. 21 Jun, 2013 1 commit
  31. 07 Jun, 2013 1 commit
    • Stephen Kelly's avatar
      Use --sysroot when cross compiling. · de4da665
      Stephen Kelly authored
      As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
      introduced, which is never a list.
      The contents of this variable is passed to supporting compilers
      as --sysroot. It is also accounted for when processing implicit
      link directories reported by the compiler, and when generating
      RPATH information.
  32. 03 Jun, 2013 1 commit
  33. 23 May, 2013 1 commit
    • Clinton Stimpson's avatar
      Refactor how bundles and frameworks are supported. · 373faae5
      Clinton Stimpson authored and Brad King's avatar Brad King committed
      Make handling of directory separators consistent between
      non-bundle and bundle code.
      Remove xcode specific flag from cmTarget when getting install_name.
      Add (more) consistent convenience functions in cmTarget to get
      directories inside of bundles and frameworks to add files to.
      This refactor also fixes bug #12263 where frameworks
      had the wrong install name when SKIP_BUILD_RPATH.
      Also make install_name for frameworks consistent between Makefile
      and Xcode generator.