Skip to content

Commit

Permalink
Update README with --release / --debug examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rupsis committed Mar 12, 2024
1 parent 6df3cc3 commit 12d27c4
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,29 @@ GitHub pages serves up https://raytracing.github.io/.

Building and Running
---------------------
Copies of the source are provided for you to check your work and compare against. If you wish to build
the provided source, this project uses CMake. To build, go to the root of the project directory and
run the following commands to create the debug version of every executable:
Copies of the source are provided for you to check your work and compare against. If you wish to
build the provided source, this project uses CMake. To build, go to the root of the project
directory and run the following commands to create the debug version of every executable:

$ cmake -B build
$ cmake --build build

You should run `cmake -B build` whenever you change your project `CMakeLists.txt` file (like when
adding a new source file).

You can specify the target with the `--target <program>` option, where the program may be
`inOneWeekend`, `theNextWeek`, `theRestOfYourLife`, or any of the demonstration programs. By default
(with no `--target` option), CMake will build all targets.

On Windows, you can build either `debug` (the default) or `release` (the optimized version). To
specify this, use the `--config <debug|release>` option.
$ cmake --build build --target inOneWeekend

You can build either `debug` (the default) or `release` (the optimized version). To specify this,
use the `--config <debug|release>` option.

$ cmake --build build --config release

We recommend building and running the `release` version (especially before the final render) for
fastest results, unless you need extra debugging information of the (default) debug build.

### CMake GUI on Windows
You may choose to use the CMake GUI when building on windows.
Expand Down

0 comments on commit 12d27c4

Please sign in to comment.