Skip to content

Commit

Permalink
Move check on env variables to before including riscv toolchain file. (
Browse files Browse the repository at this point in the history
…#101)

Co-authored-by: erling <[email protected]>
  • Loading branch information
magnmaeh and erlingrj authored Sep 16, 2024
1 parent 31032fb commit 772d12d
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
cmake_minimum_required(VERSION 3.22)

include($ENV{FP_SDK_PATH}/cmake/riscv-toolchain.cmake)

project(fp-sdk
DESCRIPTION "Software development kit (SDK) for FlexPRET"
LANGUAGES C ASM
VERSION 0.0.1
)

if (NOT DEFINED TARGET)
set(TARGET "emulator" CACHE STRING "Whether to compile SDK to target FlexPRET on emulator or FPGA" FORCE)
endif()

# Check environment variables are set before anything else
set(ENVS
FP_PATH
FP_SDK_PATH
Expand All @@ -24,6 +13,18 @@ foreach(env ${ENVS})
endif()
endforeach()

include($ENV{FP_SDK_PATH}/cmake/riscv-toolchain.cmake)

project(fp-sdk
DESCRIPTION "Software development kit (SDK) for FlexPRET"
LANGUAGES C ASM
VERSION 0.0.1
)

if (NOT DEFINED TARGET)
set(TARGET "emulator" CACHE STRING "Whether to compile SDK to target FlexPRET on emulator or FPGA" FORCE)
endif()

set(FP_INSTALLED_FILES
"flexpret/fp-emu"
"flexpret/hwconfig.cmake"
Expand Down

0 comments on commit 772d12d

Please sign in to comment.