Timeline for Optimize in CMake by default
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 18, 2017 at 7:50 | comment | added | Angew is no longer proud of SO |
@jww What my answer says is what I've inferred from years of following the CMake mailing list. I've never seen anyone recommend not using CMAKE_BUILD_TYPE ; in fact, if(CMAKE_BUILD_TYPE) is sometimes used in CMakeLists to determine that a single-config generator is running. Therefore, I consider it best practice to always specify it.
|
|
Sep 18, 2017 at 0:42 | comment | added | jww | "recommended usage of CMake is to always specify CMAKE_BUILD_TYPE explicitly on the command line ..." - Not according to this Debian bug report: CMake sets the default optimization level to -O3. | |
Jan 6, 2017 at 16:47 | vote | accept | marmistrz | ||
Dec 28, 2016 at 12:22 | history | edited | Angew is no longer proud of SO | CC BY-SA 3.0 |
Clarify scope
|
Dec 28, 2016 at 12:11 | history | edited | Angew is no longer proud of SO | CC BY-SA 3.0 |
Clarify scope
|
Dec 28, 2016 at 12:09 | comment | added | Angew is no longer proud of SO | @roalz The OP wants rather non-standard usage of CMake in the first place. I will however add a suitable disclaimer. | |
Dec 28, 2016 at 12:08 | comment | added | Angew is no longer proud of SO | @marmistrz I've added an update on why this happens, and how to "reset" it. I am trying to think of a way to achieve an implicit reset, but it's not easy. | |
Dec 28, 2016 at 12:08 | comment | added | roalz | I don't remember where I've read it, but it's considered bad practice to set CMAKE_BUILD_TYPE from inside a CMakeLists.txt. Prefer to pass it from CMake command line. | |
Dec 28, 2016 at 12:06 | comment | added | marmistrz |
This works until I make a debug build. After a single debug build, all the subsequent ones are debug builds, even if cmake .. is used
|
|
Dec 28, 2016 at 12:02 | history | answered | Angew is no longer proud of SO | CC BY-SA 3.0 |