Skip to content

Commit

Permalink
add STATIC_LIB option
Browse files Browse the repository at this point in the history
use cmake option

remove NFD extended
  • Loading branch information
valentinstoecker committed Oct 24, 2024
1 parent c80f83b commit d18ffc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ set(CMAKE_CUDA_STANDARD_REQUIRED ON)
option(WERROR "add -Werror option" "NO") # inactive per default
option(RAYX_ENABLE_CUDA "This option enables the search for CUDA. Project will be compiled without cuda if not found." ON)
option(RAYX_REQUIRE_CUDA "If option 'RAYX_ENABLE_CUDA' is ON, this option will add the requirement that cuda must be found." OFF)
option(RAYX_STATIC_LIB "Build static library" OFF)

# ------------------

# ---- Code Coverage ----
Expand Down
9 changes: 8 additions & 1 deletion Intern/rayx-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ file(GLOB_RECURSE ALPAKA_SOURCE
${PROJECT_SOURCE_DIR}/src/Shader/*.cpp
${PROJECT_SOURCE_DIR}/src/Tracer/*.cpp
)
add_library(${PROJECT_NAME} SHARED ${SOURCE})

if(RAYX_STATIC_LIB)
add_library(${PROJECT_NAME} STATIC ${SOURCE})
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
else()
add_library(${PROJECT_NAME} SHARED ${SOURCE})
endif()

alpaka_target(${PROJECT_NAME})
alpaka_source(${ALPAKA_SOURCE})
# -----------------
Expand Down

0 comments on commit d18ffc9

Please sign in to comment.