Commit Graph

63 Commits

Author SHA1 Message Date
Brad King e6f93dc560 Merge topic 'windows_ninja_duplicate_paths'
a11da72 Ninja: Properly convert all paths to unix style before we do set intersection.
2013-07-24 11:02:33 -04:00
Robert Maynard a11da72e7b Ninja: Properly convert all paths to unix style before we do set intersection.
On windows we had a subset of the paths as unix style and a subset as windows
so when doing the set intersection it resulted in the same file being
found twice.
2013-07-22 10:42:37 -04:00
Clinton Stimpson 603bc5998f OS X: Fix regression handling frameworks for Ninja
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.
2013-07-22 09:40:11 -04:00
Robert Maynard 539356f128 Ninja: Custom Command file depends don't need to exist before building
When converting custom commands for the ninja build system we
need to make sure that any file dependencies that exist in the build
tree are converted to phony targets. This tells ninja that these
files might not exist when starting the build, but could be generated
during the build.

This is done by tracking all dependencies for custom command targets.
After all have been written out we remove all items from the set
that have been seen as a target, custom command output, an alias,
or a file in the source directory. Anything that is left is considered
to be a file that will be generated as a side effect of another
custom command.
2013-07-01 09:01:01 -04:00
Robert Maynard 874e17120d Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static
To properly track the usage of dependencies that are generated at
compile time as the side effect of other build steps we need
to make the WriteBuild and WritePhonyBuild commands non static
2013-07-01 08:59:38 -04:00
Robert Maynard 4a6397a70c Ninja: Track configured files so we can regenerate them.
Unlike the Makefile generator the ninja generator did not tack any of
its output files, so if they are deleted the generator would not run.
2013-06-25 08:51:20 -04:00
Petr Kmoch de8be9ef7d Add projectDir parameter to GenerateBuildCommand
Extend the cmGlobalGenerator::GenerateBuildCommand virtual method
signature with a "projectDir" parameter specifying the top of the
project build tree for which the build command will be generated.
Populate it from call sites in cmGlobalGenerator::Build where a
fully-generated build tree should be available.
2013-04-12 11:35:35 -04:00
Brad King a95968fec9 Merge topic 'ninja-escape-line-breaks'
3b4436a Ninja: escape line breaks in literals
2013-03-13 13:42:00 -04:00
Peter Kümmel 2271ca3496 Ninja: the Ninja generator does not support Fortran yet. 2013-03-10 11:36:57 +01:00
Peter Kümmel 3b4436aa90 Ninja: escape line breaks in literals
BUG: 13591
2013-03-09 12:06:24 +01:00
Peter Kümmel 751f712e1a Ninja: use MinGW generator code in EnableLanguage() 2013-03-09 11:28:45 +01:00
Patrick Gansterer 5170a8800f Make cmGlobalGenerator::GetDocumentation() a static function
Making the function static allows us to call it directly,
without creating and removing an instance of the generator.
2012-11-19 12:54:50 -05:00
Peter Kümmel f1670ab18a Ninja: don't confuse ninja's rsp files with nmake's
Move response files into CMakeFiles/ which makes them different to nmake's.
2012-09-28 12:33:57 +02:00
David Cole a51e1529e7 Merge topic 'ninja-fix-macosx'
1fc8df9 Add missing this->.
7a3ecf5 Fix memory leak in Makefile generator.
9f7dc83 Ninja: also bootstrap ninja files
5d365b2 Ninja: enable ninja support everywhere
d569f3e Ninja: void function can't return a value
52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later
56aeac6 Ninja: fixes for bcc
7a6bc9e Ninja: remove 'this' from member initializer list
44ba4cf Ninja: remove warnings
7751966 Ninja: remove 'friend' in ninja code
c3988ee Re-factor OS X content generator start up.
f8e0a51 Re-factor framework directory computation.
f36c7b0 Re-factor Mac OS X content directory computation.
5d885db Re-factor bundle content copying rules generation.
3b2a01e Ninja: Use same echo message as makefiles.
7bb56c5 Re-factor CFBundle generation.
...
2012-07-24 17:03:46 -04:00
Nicolas Despres 10686a17f4 Ninja: Copy resource files in the bundle.
This patch fixes test BundleTest on Darwin.
2012-07-17 14:03:08 +02:00
Peter Kümmel c864103748 Ninja: path is already declared 2012-07-16 17:09:10 +02:00
Peter Kümmel 6547f369e4 Ninja: more searching for windres
search for windres with and without prefix,
and also when only CXX compiler is set.
2012-07-15 19:59:37 +02:00
Peter Kümmel 78588e0343 Ninja: there could be null pointers 2012-07-15 18:48:31 +02:00
Peter Kümmel 0c89c10cfc Ninja: search for windres with prefix 2012-07-15 16:04:26 +02:00
Peter Kümmel 46546809f5 Ninja: windres is also used for cross-compiling
It makes no sense to set windres.exe as default,
especially when we are on Linux or Unix.
2012-07-15 15:19:15 +02:00
Peter Kümmel 3856e6698e Ninja: error on missing rspfile_content 2012-07-10 10:53:25 +02:00
Peter Kümmel 7f647cf5eb Ninja: also write link libraries to rsp file
and enable rspfile support on Linux, needed for commands longer than e.g. 2096152 characters on Ubuntu.
2012-07-10 10:53:24 +02:00
David Cole 2e43272187 Merge topic 'ninja-fixes'
6b31d39 Ninja: don't shadow 'outputs' variable
9b311fb Ninja: add soname test case
e3b1be2 Ninja: Clean all symlink created for libraries.
990f77e Ninja: remove int/size_t warning
2012-07-09 14:23:57 -04:00
David Cole ada7fe248a Merge topic 'ninja-cmdLineLimit'
6332ba5 Ninja: also consider rule command length for rsp file
0c42faf Ninja: also consider variables when checking command line length
2012-07-09 14:23:47 -04:00
David Cole b57dfb5f18 Merge topic 'fix-typo'
b163c45 Ninja: Fix typo: tagets -> targets
2012-07-09 14:22:30 -04:00
David Cole 8947f11d07 Merge topic 'Ninja-absolute-compile-commands'
ca403b8 Construct the full path before escaping it.
f9383a9 STYLE: Fix line length, remove extra blank line
e30d46e Use full paths in compile_commands.json for out of source builds.
2012-07-09 14:21:22 -04:00
Peter Kuemmel 990f77eab3 Ninja: remove int/size_t warning 2012-07-09 14:15:07 -04:00
Peter Kuemmel 6332ba5a58 Ninja: also consider rule command length for rsp file 2012-07-02 10:30:29 +02:00
Peter Kuemmel 0c42faf63a Ninja: also consider variables when checking command line length 2012-07-02 00:01:41 +02:00
David Cole b163c45445 Ninja: Fix typo: tagets -> targets
Thanks to Claus Klein for the report on the mailing list.
2012-06-26 10:35:39 -04:00
David Cole 565744bd3d Merge topic 'ninja-cldeps'
eb410e8 Ninja: disable cldeps for bcc32, it's too old, and ninja would also not build
5ead31d Ninja: try work around for bcc32 bug
1333b57 Ninja: build server fixes
9081e3a remove warning about unused parameter
f430bea Ninja: maybe this fixes the bcc32 build
f2c1288 Ninja: msvc6 for-scoping
44b9bbc Ninja: build with old msvc versions
57156a5 Ninja: build server fixes
f1abdce Ninja: some bytes of the rc files couldn't be piped correctly
2de963d Ninja: don't remove space between command and parameters
50b6f33 Ninja: build cmcldeps with mingw
c05653e Ninja: try to make GetProcessId visible
ab245ff Ninja: but cl supports /nologo ...
bf58e9a Ninja: no /nologo option in old rc.exe
2fb07fc Ninja: Eclipse and KDevelop fixes for ninja
518c065 Ninja: don't pollute build dir with preprocessed rc files
...
2012-06-19 14:42:41 -04:00
Stephen Kelly e30d46e20e Use full paths in compile_commands.json for out of source builds.
Clang tooling requires that paths in the directory and file JSON
fields are relative to the directory field, but clang doesn't normalize
the paths already. The result is that clang doesn't find the relevant
entry for files which begin with ../.
2012-06-19 09:01:28 +02:00
Peter Kuemmel 2fb07fc44c Ninja: Eclipse and KDevelop fixes for ninja
Thx to Claus Klein
2012-06-15 12:14:13 +02:00
Peter Kuemmel 41c28dc35b Ninja: be more accurate when estimating the command line length 2012-06-15 02:00:15 +02:00
Peter Kuemmel f13a6a087e Ninja: undo all the NOSHELL patches 2012-06-15 01:43:08 +02:00
Peter Kuemmel 69bc5131b2 Ninja: remove nop line 2012-06-14 18:16:19 +02:00
Peter Kuemmel f1aa026fb9 Ninja: build with old vc versions 2012-06-14 18:02:43 +02:00
Peter Kuemmel 6546086004 Ninja: don't use shell when cmake is called directly
When linking with cmake and vs_link_* the command line
could be too long for cmd.exe, which needs not to be
called in this case. (was not cached by a test)

Introduce rules which don't use the shell and use this
rule when there are no pre or post step.

For free we get a small speedup, because cmd is then
not called.

Also be more accurate when estimating the
command line length.
2012-06-14 14:22:56 +02:00
Peter Kuemmel 4b43999ca3 Ninja: remove unused CommentStream 2012-06-13 17:23:31 +02:00
Brad King 32313fd0d4 Merge branch 'ninja-rspfile' into no-std-stringstream
Conflicts:
	Source/cmGlobalNinjaGenerator.cxx
	Source/cmLocalNinjaGenerator.cxx
	Source/cmNinjaNormalTargetGenerator.cxx
2012-06-12 15:43:32 -04:00
Brad King 94de982902 Avoid direct use of std::(o|)stringstream (#13272)
Older C++ compilers do not provide a standard std::stringstream.
Use our compatibility interfaces instead.

Also avoid std::stringstream(openmode) signature.  Our approximate
stringstream implementation provided when the standard one is not
available does not support the openmode argument.
2012-06-12 15:40:24 -04:00
Peter Kuemmel ba8d0db217 Ninja: don't pollute the rules file with useless comments 2012-06-10 20:20:29 +02:00
Peter Kuemmel 941afa571c Ninja: allow spaces in source path
And make /showIncude prefix visible for all build rules
2012-06-08 22:59:18 +02:00
Peter Kuemmel 033a687acd Ninja: add wrapper for cl to extract dependencies
cmcldeps wraps cl and adds /showInclude before calling cl.
It parses the output of cl for used headers, drops system
headers and writes them to a GCC like dependency file.

cmcldeps uses ATM ninja code for process handling,
but could be ported later to SystemTools.

TODO: Why needs ninja multiple calls in the BuildDepends test?
2012-06-08 17:42:11 +02:00
Peter Kuemmel e3a1f727f7 Ninja: find mingw's resource compiler 2012-06-06 13:02:30 +02:00
Peter Kuemmel c60557e973 Ninja: don't break because of empty commands 2012-06-06 01:36:34 +02:00
Peter Kuemmel 0266c9bd19 Ninja: check for valid pointer 2012-06-05 23:29:29 +02:00
Peter Kuemmel ad4a768d59 Ninja: add response file support on Windows
When MinGW is used slashes are used for dependencies
because ar.exe can't read rsp files with backslashes.

Many thx to Claus Klein for starting working on this.
2012-06-05 22:39:42 +02:00
Stephen Kelly db839bec7d Make the CMAKE_EXPORT_COMPILE_COMMANDS option work with Ninja. 2012-06-04 23:42:37 +02:00
David Cole 8e9929d527 Merge topic 'ninja-error-failbit'
b94514f Ninja: mark rules/build file streams failed if error occurred (#13067, #13105)
2012-05-17 15:00:01 -04:00