Skip to content

Commit

Permalink
Test gpulike_subroutine compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasReutelsterz committed Jul 9, 2024
1 parent 59e91b4 commit 7b28ec2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/code-gen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ foreach(EXAMPLE ${EXAMPLES})
# compile source code
add_executable(${EXAMPLE}-target ${TEST_RUNNER} ${GENERATED_SRC})

# set(GENERATED_GPU_SRC ${GEN_DIR}/gpulike_subroutine.cpp)
# enable_language(CUDA)
# set(CMAKE_CUDA_STANDARD 17)
# add_library(${EXAMPLE}-target-gpu SHARED ${GENERATED_GPU_SRC})
# target_link_libraries(${EXAMPLE}-target PUBLIC ${EXAMPLE}-target-gpu)
# set_target_properties(${EXAMPLE}-target-gpu PROPERTIES POSITION_INDEPENDENT_CODE ON)
# set_source_files_properties(${GENERATED_GPU_SRC} PROPERTIES LANGUAGE_CUDA)
# set_target_properties(${EXAMPLE}-target-gpu PROPERTIES CUDA_ARCHITECTURES 'sm_60')
set(GENERATED_GPU_SRC ${GEN_DIR}/gpulike_subroutine.cpp)
enable_language(CUDA)
set(CMAKE_CUDA_STANDARD 17)
add_library(${EXAMPLE}-target-gpu SHARED ${GENERATED_GPU_SRC})
target_link_libraries(${EXAMPLE}-target PUBLIC ${EXAMPLE}-target-gpu)
set_target_properties(${EXAMPLE}-target-gpu PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_source_files_properties(${GENERATED_GPU_SRC} PROPERTIES LANGUAGE_CUDA)
set_target_properties(${EXAMPLE}-target-gpu PROPERTIES CUDA_ARCHITECTURES 'sm_60')

# attach necessary include dirs
target_include_directories(${EXAMPLE}-target PUBLIC ${CMAKE_SOURCE_DIR}/common
Expand Down

0 comments on commit 7b28ec2

Please sign in to comment.