mirror of https://github.com/thesofproject/sof.git
smex: un-hardcode "-O2 -g", use CMAKE_BUILD_TYPE, default to Debug
Anyone having a performance issue can use the standard -DCMAKE_BUILD_TYPE=Release. Crashes seem more common. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
46ddb38159
commit
ef03e727db
|
@ -4,6 +4,11 @@ cmake_minimum_required(VERSION 3.10)
|
|||
|
||||
project(SOF_SMEX C)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message(STATUS "No CMAKE_BUILD_TYPE, defaulting to Debug")
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
|
||||
endif()
|
||||
|
||||
set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..")
|
||||
|
||||
add_executable(smex
|
||||
|
@ -12,8 +17,9 @@ add_executable(smex
|
|||
smex.c
|
||||
)
|
||||
|
||||
# In addition to the usual flags from CMAKE_BUILD_TYPE
|
||||
target_compile_options(smex PRIVATE
|
||||
-O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wimplicit-fallthrough=3
|
||||
-Wall -Werror -Wl,-EL -Wmissing-prototypes -Wimplicit-fallthrough=3
|
||||
)
|
||||
|
||||
target_include_directories(smex PRIVATE
|
||||
|
|
Loading…
Reference in New Issue