1 Star 0 Fork 4

梁少杰0.0/riscv-shared-memory-sgd-old

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 853 Bytes
一键复制 编辑 原始数据 按行查看 历史
xuezheng 提交于 2023-11-07 09:31 . add static link support
cmake_minimum_required(VERSION 3.5.1)
project(mininn)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# for RISC-V porting
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR riscv)
set(CMAKE_C_COMPILER riscv64-unknown-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER riscv64-unknown-linux-gnu-g++)
# segment fault when linking statically
# set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
# set(BUILD_SHARED_LIBS OFF)
# set(CMAKE_EXE_LINKER_FLAGS "-static")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -fopenmp")
set(APP_INCLUDES
include/
include/minidnn
)
#Include the directories and now your cpp files will recognize your headers
include_directories(${APP_INCLUDES})
add_executable(mininn main.cpp)
target_sources(mininn PUBLIC mnist.cc)
TARGET_LINK_LIBRARIES(mininn
pthread
#"${TORCH_LIBRARIES}"
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/liang-shaojie-00/riscv-shared-memory-sgd.git
git@gitee.com:liang-shaojie-00/riscv-shared-memory-sgd.git
liang-shaojie-00
riscv-shared-memory-sgd
riscv-shared-memory-sgd-old
master

搜索帮助