Skip to content

Commit 2f0a848

Browse files
giordanostaticfloat
authored andcommitted
Suggest to set -DCMAKE_BUILD_TYPE=Release for CMake builds
1 parent 28ece1d commit 2f0a848

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/src/build_tips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Here are examples of autoconfigure build scripts:
4545
For CMake, the wizard will suggest a template for running CMake. Typically, this will look like:
4646

4747
```sh
48-
cmake -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN}
48+
cmake -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release
4949
```
5050

5151
The toolchain file sets up several CMake environment variables for better cross-platform support, such as `CMAKE_SYSROOT`, `CMAKE_C_COMPILER`, etc... Examples of builds that include CMake parts include:

src/wizard/hints.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function provide_hints(state::WizardState, path::AbstractString)
6666
print(state.outs, " This file is likely input to CMake. ")
6767
println(state.outs, "The recommended options for CMake are")
6868
println(state.outs)
69-
printstyled(state.outs, " cmake -DCMAKE_INSTALL_PREFIX=\$prefix -DCMAKE_TOOLCHAIN_FILE=\${CMAKE_TARGET_TOOLCHAIN}", bold=true)
69+
printstyled(state.outs, " cmake -DCMAKE_INSTALL_PREFIX=\$prefix -DCMAKE_TOOLCHAIN_FILE=\${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release", bold=true)
7070
println(state.outs)
7171
println(state.outs)
7272
println(state.outs, " followed by `make` and `make install`. Since the prefix environment")

0 commit comments

Comments
 (0)