Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit b48efb7

Browse files
committed
Tweaks towards an LLVM build.
1 parent d88353b commit b48efb7

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CMake/MakefileBuildOptions.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ list(REMOVE_ITEM CORENRN_LINK_LIBS "Threads::Threads")
5050

5151
# replicate CMake magic to transform system libs to -l<libname>
5252
foreach(link_lib ${CORENRN_LINK_LIBS})
53+
if(TARGET ${link_lib})
54+
get_property(link_flag TARGET ${link_lib} PROPERTY INTERFACE_LINK_LIBRARIES)
55+
string(APPEND CORENRN_COMMON_LDFLAGS " ${link_flag}")
56+
continue()
57+
endif()
5358
if(${link_lib} MATCHES "\-l.*")
5459
string(APPEND CORENRN_COMMON_LDFLAGS " ${link_lib}")
5560
continue()

CMake/OpenAccHelper.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if(CORENRN_ENABLE_GPU)
7070
string(APPEND NVHPC_ACC_COMP_FLAGS " -mp=gpu -Minfo=mp")
7171
string(APPEND NVHPC_ACC_LINK_FLAGS " -mp=gpu")
7272
endif()
73-
set(NVHPC_ACC_COMP_FLAGS)
73+
set(NVHPC_ACC_COMP_FLAGS "-fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -Wno-unknown-cuda-version -I${CUDAToolkit_INCLUDE_DIRS}")
7474
set(NVHPC_ACC_LINK_FLAGS)
7575
# avoid PGI adding standard compliant "-A" flags
7676
# set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14)

coreneuron/sim/scopmath/sparse_thread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ static int matsol(SparseObj* so, int _iml) {
211211
/* Upper triangularization */
212212
so->numop = 0;
213213
for (unsigned i = 1; i <= so->neqn; i++) {
214-
Elm* pivot;
215-
if (fabs((pivot = so->diag[i])->value[_iml]) <= ROUNDOFF) {
214+
Elm* pivot{so->diag[i]};
215+
if (fabs(pivot->value[_iml]) <= ROUNDOFF) {
216216
return SINGULAR;
217217
}
218218
/* Eliminate all elements in pivot column */

external/nmodl

0 commit comments

Comments
 (0)