[Piglit] [PATCH] CMake: compile with debug info on by default
Jose Fonseca
jfonseca at vmware.com
Wed Nov 16 07:51:17 PST 2011
----- Original Message -----
> This makes debugging crashes feasible out of the box.
> ---
> CMakeLists.txt | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 5a97486..87a5668 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -41,6 +41,10 @@ if(NOT import_numpy_error_code EQUAL 0)
> message(FATAL_ERROR "numpy library not found")
> endif(NOT import_numpy_error_code EQUAL 0)
>
> +# Default to compiling with debug information (`gcc -g`):
> +SET(CMAKE_BUILD_TYPE Debug CACHE STRING
> + "May be one of: None Debug RelWithDebInfo Release MinSizeRel"
> FORCE)
> +
I don't oppose debug build by default, given that piglit does not include benchmarks.
But I think this will force Debug build regardless of user request.
Please follow the instructions in
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_change_the_default_build_mode_and_see_it_reflected_in_the_GUI.3F
Another alternative is choose "RelWithDebInfo" by default, i.e., -O2 & -g
Jose
More information about the Piglit
mailing list