Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions coreneuron/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,18 @@ if(CORENRN_ENABLE_GPU)
cuda_add_library("cudacoreneuron" ${CORENEURON_CUDA_FILES} OPTIONS ${cuda_arch_flags} -Xcompiler
-fPIC)
set(link_cudacoreneuron cudacoreneuron)
# nrnran123.cpp is a symlink to nrnran123.cu, in GPU builds we compile this as CUDA code (so we
# want to remove the .cpp here), while in non-GPU builds we compile it as plain C++ (so we want to
# remove the .cu below). Unfortunately CMake <v3.20 does not pass explicit -x <lang> options based
# on the LANGUAGE property (https://cmake.org/cmake/help/latest/policy/CMP0119.html), so using a
# single .cu file and setting LANGUAGE=CXX in non-GPU builds does not work.
list(REMOVE_ITEM CORENEURON_CODE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cpp")
list(REMOVE_ITEM CORENEURON_UTILS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cpp")
else()
set(link_cudacoreneuron "")
# See above regarding CMake policy CMP0119.
list(REMOVE_ITEM CORENEURON_CODE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cu")
list(REMOVE_ITEM CORENEURON_UTILS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cu")
endif()

# =============================================================================
Expand Down
146 changes: 0 additions & 146 deletions coreneuron/utils/randoms/nrnran123.cpp

This file was deleted.

1 change: 1 addition & 0 deletions coreneuron/utils/randoms/nrnran123.cpp
Loading