Skip to content

Commit

Permalink
Fixed examples for real
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaAtulTewari committed May 2, 2024
1 parent 9a6574e commit c6305b6
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ set(EXAMPLE_SOURCES
)

function(add_example EXAMPLES)
foreach(EXAMPLE IN LISTS EXAMPLES)
if (PANDO_RT_BACKEND STREQUAL "DRVX")
add_library(${EXAMPLE} SHARED ${EXAMPLE}.cpp)
target_link_libraries(${TARGET} PUBLIC "$<LINK_LIBRARY:WHOLE_ARCHIVE,pando-lib-galois::pando-lib-galois>")
else()
add_executable(${EXAMPLE} ${EXAMPLE}.cpp)
target_link_libraries(${EXAMPLE} PUBLIC pando-lib-galois::pando-lib-galois)
endif()
pando_compiler_warnings(${EXAMPLE})
pando_compiler_options(${EXAMPLE})
endforeach()
foreach(EXAMPLE IN LISTS EXAMPLES)
if (PANDO_RT_BACKEND STREQUAL "DRVX")
add_library(${EXAMPLE} SHARED ${EXAMPLE}.cpp)
else()
add_executable(${EXAMPLE} ${EXAMPLE}.cpp)
endif()
target_link_libraries(${EXAMPLE} PUBLIC pando-lib-galois::pando-lib-galois)
pando_compiler_warnings(${EXAMPLE})
pando_compiler_options(${EXAMPLE})
endforeach()
endfunction()

add_example("${EXAMPLE_SOURCES}")

0 comments on commit c6305b6

Please sign in to comment.