加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 937 Bytes
一键复制 编辑 原始数据 按行查看 历史
pygone 提交于 2023-11-06 14:57 . lab-1 init&&base env
cmake_minimum_required(VERSION 3.10)
# Set the project name
project(riscv-pke)
# Set the C compiler
set(CMAKE_C_COMPILER ${CMAKE_SOURCE_DIR}/riscv64-elf-gcc/bin/riscv64-unknown-elf-gcc)
set(CMAKE_ASM_COMPILER ${CMAKE_SOURCE_DIR}/riscv64-elf-gcc/bin/riscv64-unknown-elf-gcc)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/obj)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/obj)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/obj)
# Set the C flags
set(CMAKE_C_FLAGS "-Wall -Werror -fno-builtin -nostdlib -D__NO_INLINE__ -mcmodel=medany -g -Og -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks -fno-PIE")
# Include directories
include_directories(${CMAKE_SOURCE_DIR})
# Add the directories containing the source files
add_subdirectory(util)
add_subdirectory(spike_interface)
add_subdirectory(kernel)
add_subdirectory(user)
# Set the default build target
set(DEFAULT_BUILD_TYPE "Release")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化