Skip to content

Commit

Permalink
Use nocmodl target
Browse files Browse the repository at this point in the history
  • Loading branch information
matz-e committed May 29, 2024
1 parent 9ac0537 commit 27e37cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ endif()
# initialize CLI11 submodule
cpp_cc_git_submodule(CLI11 BUILD PACKAGE CLI11 REQUIRED)

# coreneuron targets will get appended here
set(NRN_INSTALL_TARGETS nrniv_lib)
# coreneuron targets will get propagated down from the subdirectory
set(NRN_INSTALL_TARGETS nrniv_lib nocmodl)

# =============================================================================
# Enable CoreNEURON support
Expand Down
1 change: 0 additions & 1 deletion cmake/neuronConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set(_CORENEURON_MECH_ENG "${_prefix}/share/coreneuron/enginemech.cpp")
set(_CORENEURON_RANDOM_INCLUDE "${_prefix}/include/coreneuron/utils/randoms")
set(_CORENEURON_FLAGS @CORENRN_CXX_FLAGS@)

find_program(NOCMODL nocmodl REQUIRED)
find_program(NMODL nmodl REQUIRED)

include(${CMAKE_CURRENT_LIST_DIR}/neuronMechMaker.cmake)
6 changes: 2 additions & 4 deletions cmake/neuronMechMaker.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function(create_nrnmech)
endforeach()

foreach(MOD_FILE IN LISTS MOD_FILES)
# set(MOD_FILE common/mod/DetAMPANMDA.mod)
get_filename_component(MOD_STUB "${MOD_FILE}" NAME_WLE)
set(CPP_FILE "cpp/${MOD_STUB}.cpp")
file(RELATIVE_PATH MOD_SHORT "${CMAKE_SOURCE_DIR}" "${MOD_FILE}")
Expand All @@ -35,9 +34,9 @@ function(create_nrnmech)
list(APPEND L_MECH_REGISTRE "_${MOD_STUB}_reg()\;")

add_custom_command(
COMMAND "${NOCMODL}" -o "${CMAKE_CURRENT_BINARY_DIR}/cpp" "${MOD_FILE}"
COMMAND neuron::nocmodl -o "${CMAKE_CURRENT_BINARY_DIR}/cpp" "${MOD_FILE}"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${CPP_FILE}"
DEPENDS "${NOCMODL}")
DEPENDS neuron::nocmodl)

list(APPEND L_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/${CPP_FILE}")
endforeach()
Expand All @@ -56,7 +55,6 @@ function(create_nrnmech)
endforeach()

foreach(MOD_FILE IN LISTS MOD_FILES)
# set(MOD_FILE common/mod/DetAMPANMDA.mod)
get_filename_component(MOD_STUB "${MOD_FILE}" NAME_WLE)
set(CPP_FILE "cpp_core/${MOD_STUB}.cpp")
file(RELATIVE_PATH MOD_SHORT "${CMAKE_SOURCE_DIR}" "${MOD_FILE}")
Expand Down

0 comments on commit 27e37cf

Please sign in to comment.