Improve unity/nounity description in linux doc

This commit is contained in:
Mike Ellery
2018-05-15 16:10:00 -07:00
committed by seelabs
parent 7c785d0d7c
commit ca29c2b906
2 changed files with 11 additions and 9 deletions

View File

@@ -108,10 +108,11 @@ cmake -Dtarget=gcc.debug.unity ..
``` ```
The target variable can be adjusted as needed for `gcc` vs `clang`, `debug` vs. The target variable can be adjusted as needed for `gcc` vs `clang`, `debug` vs.
`release` and `unity` vs. `nounity` builds. `unity` builds are typically faster `release` and `unity` vs. `nounity` builds. `unity` builds are faster to
to compile but run the risk of ODR violations given that multiple compilation compile since they combine multiple sources into a single compiliation unit.
units are merged together at compile time. `nounity` builds will take longer to `nounity` builds can be helpful for detecting include omissions or for finding
compile but align more closely with language standards. other build-related issues, but aren't generally needed for testing and
running.
Once you have generated the build system, you can run the build via cmake: Once you have generated the build system, you can run the build via cmake:

View File

@@ -151,11 +151,12 @@ or
cmake -G "Ninja" -Dtarget=clang.debug.unity .. cmake -G "Ninja" -Dtarget=clang.debug.unity ..
``` ```
The target variable can be adjusted as needed for `debug` vs. `release` and The target variable can be adjusted as needed for `gcc` vs `clang`, `debug` vs.
`unity` vs. `nounity` builds. `unity` builds are typically faster to compile `release` and `unity` vs. `nounity` builds. `unity` builds are faster to
but run the risk of ODR violations given that multiple compilation units are compile since they combine multiple sources into a single compiliation unit.
merged together at compile time. `nounity` builds will take longer to compile `nounity` builds can be helpful for detecting include omissions or for finding
but align more closely with language standards. other build-related issues, but aren't generally needed for testing and
running.
Once you have generated the build system, you can run the build via cmake: Once you have generated the build system, you can run the build via cmake: