37 lines
1.6 KiB
CMake
37 lines
1.6 KiB
CMake
cmake_minimum_required(VERSION 3.21)
|
|
project(coremark C)
|
|
set(TARGET coremark)
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
|
|
|
|
# Source files
|
|
set(SOURCES
|
|
core_portme.c
|
|
cvt.c
|
|
ee_printf.c
|
|
cm/core_list_join.c
|
|
cm/core_main.c
|
|
cm/core_matrix.c
|
|
cm/core_state.c
|
|
cm/core_util.c
|
|
)
|
|
|
|
|
|
# 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_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")
|
|
add_subdirectory(../../bare-metal-bsp bsp)
|
|
target_link_libraries(${TARGET} PRIVATE bsp)
|
|
|
|
include(CMakePrintHelpers)
|
|
cmake_print_properties(TARGETS ${TARGET} PROPERTIES COMPILE_DEFINITIONS COMPILE_OPTIONS LINK_OPTIONS INTERFACE_LINK_OPTIONS)
|
|
|
|
add_custom_command(TARGET ${TARGET} POST_BUILD
|
|
COMMAND ${CMAKE_OBJDUMP} -S ${TARGET}.elf > ${TARGET}.dis
|
|
COMMENT "Creating disassembly for ${TARGET}")
|