mirror of
https://github.com/reactos/ninja.git
synced 2024-11-27 05:30:25 +00:00
50 lines
1.8 KiB
Plaintext
50 lines
1.8 KiB
Plaintext
Generating the docs:
|
|
sudo apt-get install asciidoc --no-install-recommends
|
|
./ninja doc
|
|
|
|
Adjusting build flags:
|
|
It's kind of a hack, but edit config.ninja (which was generated by
|
|
bootstrap.sh) to turn on debugging symbols.
|
|
|
|
Test-driven development:
|
|
Set your build command to
|
|
./ninja ninja_test && ./ninja_test --gtest_filter=MyTest.Name
|
|
now you can repeatedly run that while developing until the tests pass.
|
|
Remember to build "all" before committing to verify the other source
|
|
still works!
|
|
|
|
Coding guidelines:
|
|
- Function name are camelcase.
|
|
- Member methods are camelcase, expect for trivial getters which are
|
|
underscore separated.
|
|
- Local variables are underscore separated.
|
|
- Member variables are underscore separated and suffixed by an extra underscore.
|
|
- Two spaces indentation.
|
|
- Opening braces is at the end of line.
|
|
- Lines are 80 columns maximum.
|
|
- All source files should have the Google Inc. license header.
|
|
- Also follow this style:
|
|
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
|
|
|
|
Documentation guidelines:
|
|
- Use /// for doxygen.
|
|
- Use \a to refer to arguments.
|
|
- It's not necessary to document each argument, especially when they're
|
|
relatively self-evident (e.g. in CanonicalizePath(string* path, string* err),
|
|
the arguments are hopefully obvious)
|
|
|
|
Windows development:
|
|
- sudo apt-get install gcc-mingw32 wine
|
|
- ./configure.py --platform=mingw
|
|
- Build gtest:
|
|
- unpack it into your source dir
|
|
- ./configure CC=i586-mingw32msvc-cc CXX=i586-mingw32msvc-c++
|
|
- to work around missing _TlsAlloc I had to hack the libtool script to
|
|
append -lmingw32 -lkernel32 at the *end* of the link line
|
|
- Build ninja: /path/to/linux/ninja ninja
|
|
- Run: ./ninja (implicitly runs through wine(!))
|
|
|
|
Using clang:
|
|
- Enable colors manually:
|
|
CXX='/path/to/llvm/Release+Asserts/bin/clang++ -fcolor-diagnostics' ./configure.py
|