blob: 86d6fb6f1b87bf3acb847642149004e1234e9dde [file] [log] [blame]
#
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
#
include_guard()
set(CMAKE_SYSTEM_NAME "Generic")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
foreach(language IN ITEMS ASM C CXX)
string(APPEND CMAKE_${language}_FLAGS_INIT "-fno-common ")
string(APPEND CMAKE_${language}_FLAGS_INIT "-fomit-frame-pointer ")
string(APPEND CMAKE_${language}_FLAGS_INIT "-ffunction-sections ")
string(APPEND CMAKE_${language}_FLAGS_INIT "-fdata-sections ")
string(APPEND CMAKE_${language}_FLAGS_INIT "-Wall -Werror ")
string(APPEND CMAKE_${language}_FLAGS_DEBUG_INIT "-Og ")
string(APPEND CMAKE_${language}_FLAGS_RELEASE_INIT "-g ")
endforeach()
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--gc-sections ")