Skip to content

Commit

Permalink
Move RiscV flag
Browse files Browse the repository at this point in the history
  • Loading branch information
salvacarrion committed Oct 17, 2022
1 parent d78d44b commit 6964bca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ if(UNIX)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")

if(${BUILD_TARGET} STREQUAL "RISCV")
set(CMAKE_C_FLAGS_RELEASE "-O2 -march=rv64imafdc -mabi=lp64d ")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -march=rv64imafdc -mabi=lp64d ")
endif()

# Flags: Sanitizers
# For the visualized output to be available, switch to Clang at least 3.8.0 or GCC at least 5.0.0
if(BUILD_SANITIZERS)
Expand Down
11 changes: 7 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ endif()
########################## COMPILE FOR RISK-V #############################
###########################################################################

if(USE_RISCV)
set(CMAKE_C_FLAGS_RELEASE "-O2 -march=rv64imafdc -mabi=lp64d ")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -march=rv64imafdc -mabi=lp64d ")
endif()

if(RISKV_COMPILER_PATH)
message(STATUS "Compiling for Risk-V...")
endif()
Expand Down Expand Up @@ -502,10 +507,8 @@ if(USE_FPGA)
message(STATUS "OpenCL include: " ${OpenCL_INCLUDE_DIRS} )
message(STATUS "OpenCL libraries: " ${OpenCL_LIBRARIES} )
endif()
if(RISKV_COMPILER_PATH)
message(STATUS "-------------------------------------------" )
message(STATUS "Risk-V compiler: " ${RISKV_COMPILER_PATH} )
endif()
message(STATUS "-------------------------------------------" )
message(STATUS "RISCV enabled: " ${USE_RISCV} )
message(STATUS "-------------------------------------------" )
message(STATUS "Eigen3 root dir: " ${Eigen3_DIR} )
message(STATUS "Eigen3 include: " ${EIGEN3_INCLUDE_DIR} )
Expand Down

0 comments on commit 6964bca

Please sign in to comment.