[Piglit] [PATCH] CMake: compile with debug info on by default

Chad Versace chad.versace at linux.intel.com
Wed Nov 16 13:17:38 PST 2011


On 11/15/2011 05:28 PM, Ian Romanick wrote:
> On 11/15/2011 01:34 PM, nobled wrote:
>> 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)
>> +
>>   if (NOT MSVC)
>>       CHECK_C_COMPILER_FLAG("-Wall" C_COMPILER_FLAG_WALL)
>>       IF (C_COMPILER_FLAG_WALL)
> 
> Dear God, yes!  Though I talked to Chad, and he wasn't sure if this would work.  He was going to test it after getting home and reply to the patch.

The issue I imagined was imaginary. I see no problem.

> Acked-by: Ian Romanick <ian.d.romanick at intel.com>


YES!

Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

----
Chad Versace
chad.versace at linux.intel.com


More information about the Piglit mailing list