Skip to content

Commit

Permalink
Merge pull request #299 from theos-sh/master
Browse files Browse the repository at this point in the history
CMake Changes
  • Loading branch information
ViliusSutkus89 authored Jun 25, 2024
2 parents f644978 + a1fdd7c commit d66f477
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "x86" OR ${OPENLIBM_ARCH_FOLDER} STREQUA
set(OPENLIBM_ARCH_FOLDER "i387")
elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "powerpc")
set(OPENLIBM_ARCH_FOLDER "powerpc")
elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "riscv64")
set(OPENLIBM_ARCH_FOLDER "riscv64")
else()
message(FATAL_ERROR "${PROJECT_NAME} not set up for detected architecture: ${OPENLIBM_ARCH_FOLDER}")
endif()
Expand Down Expand Up @@ -62,7 +64,7 @@ endif()
target_compile_options("${PROJECT_NAME}" PUBLIC ${C_ASM_COMPILE_FLAGS})

# Project Source
set(PROJECT_SRC "${PROJECT_SOURCE_DIR}")
set(PROJECT_SRC "${CMAKE_CURRENT_SOURCE_DIR}")

# Common
list(APPEND OPENLIBM_C_SOURCE
Expand Down Expand Up @@ -503,6 +505,9 @@ elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "powerpc")
list(APPEND OPENLIBM_C_SOURCE
"${PROJECT_SRC}/powerpc/fenv.c"
)
elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "riscv64")
list(APPEND OPENLIBM_C_SOURCE
"${PROJECT_SRC}/riscv64/fenv.c")
else()
message(FATAL_ERROR "${PROJECT_NAME} CMake build is not set up for ${OPENLIBM_ARCH_FOLDER}")
endif()
Expand Down

0 comments on commit d66f477

Please sign in to comment.