Skip to content

Commit

Permalink
modify cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhu1024 committed Dec 5, 2024
1 parent 908be33 commit 5bef7fb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gpgpu-testcase/driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ cmake_minimum_required(VERSION 3.21)
set(PROJECT spike_driver)
project(${PROJECT})

# Define KERNEL_ADDRESS if not already defined, with a default value of 0x80000098
# Define KERNEL_ADDRESS if not already defined (default: 0x800000b8)
if(NOT DEFINED KERNEL_ADDRESS)
set(KERNEL_ADDRESS "0x800000b8")
message(STATUS "KERNEL_ADDRESS not specified, using default address 0x800000b8")
set(KERNEL_ADDRESS "0x800000b8")
else()
message(STATUS "Using specified KERNEL_ADDRESS: ${KERNEL_ADDRESS}")
endif()

# Add the KERNEL_ADDRESS definition as a compile-time macro
add_compile_definitions(KERNEL_ADDRESS=${KERNEL_ADDRESS})

set(CMAKE_CXX_STANDARD 17)
Expand All @@ -21,6 +23,8 @@ include_directories($ENV{SPIKE_SRC_DIR}/build)
include_directories($ENV{SPIKE_SRC_DIR}/softfloat)
include_directories($ENV{SPIKE_SRC_DIR}/fesvr)

#set(CMAKE_POSITION_INDEPENDENT_CODE True)

file(GLOB_RECURSE SRCS ./ventus.cpp)

link_directories($ENV{SPIKE_TARGET_DIR}/lib)
Expand Down

0 comments on commit 5bef7fb

Please sign in to comment.