From e88c1148fb6de21fb77580d68f68abea547223a9 Mon Sep 17 00:00:00 2001
From: Hongyu Liu <hongyu@minres.com>
Date: Fri, 14 Mar 2025 14:26:49 +0100
Subject: [PATCH] removes default release build

---
 benchmarks/coremark/CMakeLists.txt  | 7 +++++--
 benchmarks/dhrystone/CMakeLists.txt | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/benchmarks/coremark/CMakeLists.txt b/benchmarks/coremark/CMakeLists.txt
index 85c98d3..05c75a1 100644
--- a/benchmarks/coremark/CMakeLists.txt
+++ b/benchmarks/coremark/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.21)
 project(coremark C)
 set(TARGET coremark)
-set(CMAKE_BUILD_TYPE Release)
+#set(CMAKE_BUILD_TYPE Release)
 
 
 
@@ -21,7 +21,7 @@ set(SOURCES
 # Create executable
 add_executable(coremark ${SOURCES})
 target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/cm)
-target_compile_options(${TARGET} PRIVATE -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -fno-common -funroll-loops -finline-functions -falign-functions=16 -falign-jumps=4 -falign-loops=4 -finline-limit=1000 -fno-if-conversion2 -fselective-scheduling -fno-crossjumping -freorder-blocks-and-partition -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -fno-common -funroll-loops -finline-functions -falign-functions=16 -falign-jumps=4 -falign-loops=4 -finline-limit=1000 -fno-if-conversion2 -fselective-scheduling -fno-crossjumping -freorder-blocks-and-partition )
+target_compile_options(${TARGET} PRIVATE  -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -fno-common -funroll-loops -finline-functions -falign-functions=16 -falign-jumps=4 -falign-loops=4 -finline-limit=1000 -fno-if-conversion2 -fselective-scheduling -fno-crossjumping -freorder-blocks-and-partition -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -fno-common -funroll-loops -finline-functions -falign-functions=16 -falign-jumps=4 -falign-loops=4 -finline-limit=1000 -fno-if-conversion2 -fselective-scheduling -fno-crossjumping -freorder-blocks-and-partition )
 target_compile_definitions(${TARGET} PRIVATE PERFORMANCE_RUN=1 CLOCKS_PER_SEC=10000000 FLAGS_STR="" PERFORMANCE_RUN=1 CLOCKS_PER_SEC=10000000 ITERATIONS=600)
 
 set(BOARD "iss" CACHE STRING "Target board")
@@ -32,6 +32,9 @@ target_link_options(${TARGET} PRIVATE -Wl,-Map=${TARGET}.map)
 include(CMakePrintHelpers)
 cmake_print_properties(TARGETS ${TARGET} PROPERTIES COMPILE_DEFINITIONS COMPILE_OPTIONS LINK_OPTIONS INTERFACE_LINK_OPTIONS)
 
+#message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
+#message(STATUS "CMAKE_C_FLAGS = ${CMAKE_C_FLAGS}")
+
 add_custom_command(TARGET ${TARGET} POST_BUILD
         COMMAND ${CMAKE_OBJDUMP} -S  ${TARGET}.elf > ${TARGET}.dis
         COMMENT "Creating disassembly for ${TARGET}")
diff --git a/benchmarks/dhrystone/CMakeLists.txt b/benchmarks/dhrystone/CMakeLists.txt
index 4d86a66..761b77f 100644
--- a/benchmarks/dhrystone/CMakeLists.txt
+++ b/benchmarks/dhrystone/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.21)
 project(dhrystone C)
 set(TARGET dhrystone)
-set(CMAKE_BUILD_TYPE Release)
+
 set(ITERATIONS 50000) # 20000 for TGC
 
 add_executable(${TARGET} dhry_1.c dhry_2.c dhry_stubs.c)