From a25aee96cae1677a7b89b7cdb6b2cced19e68ee8 Mon Sep 17 00:00:00 2001 From: Jay Cornwall Date: Fri, 29 Jul 2016 20:59:52 -0500 Subject: [PATCH] Add -O0 to CMake debug build configuration The default optimization level may interfere with debugging. Change-Id: Ie694ef35b05e4cf2bf4f68bc346e8d60a2d27bc8 [ROCm/ROCR-Runtime commit: d2a4629c555dea970eda6d741adb9dece1d6f27d] --- .../runtime/hsa-runtime/cmake_modules/hsa_common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/cmake_modules/hsa_common.cmake b/projects/rocr-runtime/runtime/hsa-runtime/cmake_modules/hsa_common.cmake index 0f7dd57a05..bc88566b17 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/cmake_modules/hsa_common.cmake +++ b/projects/rocr-runtime/runtime/hsa-runtime/cmake_modules/hsa_common.cmake @@ -63,7 +63,7 @@ if(UNIX) set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" ) endif () if ( "${CMAKE_BUILD_TYPE}" STREQUAL Debug ) - set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb" ) + set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb" ) endif () add_definitions(-D __STDC_LIMIT_MACROS) add_definitions(-D __STDC_CONSTANT_MACROS)