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

Commit 0ea510b

Browse files
authored
Added dependency for nrnivmodl-core and nmodl (#530)
* Added dependency for nrnivmodl-core and nmodl - Added dependency of nmodl if needed when configuring nrnivmodl-core - Added dependency of nrnivmodl-core in coreneuron target to make sure all the components of coreneuron are built before other external targets depend on it * Added comments with explanations
1 parent 8380a62 commit 0ea510b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

coreneuron/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ add_library(
168168
coreneuron ${COMPILE_LIBRARY_TYPE} ${CORENEURON_HEADER_FILES} ${CORENEURON_TEMPLATE_FILES}
169169
${CORENEURON_CODE_FILES} ${cudacorenrn_objs} ${NMODL_INBUILT_MOD_OUTPUTS})
170170

171-
# need to have _kinderiv.h for mod2c generated files
172-
add_dependencies(coreneuron kin_deriv_header)
171+
# need to have _kinderiv.h for mod2c generated files and nrnivmodl-core and nmodl building
172+
add_dependencies(coreneuron kin_deriv_header nrnivmodl-core)
173173

174174
# scopmath is created separately for nrnivmodl-core workflow
175175
add_library(scopmath STATIC ${CORENEURON_HEADER_FILES} ${SCOPMATH_CODE_FILES})

extra/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
configure_file(nrnivmodl_core_makefile.in
1111
${CMAKE_BINARY_DIR}/share/coreneuron/nrnivmodl_core_makefile @ONLY)
1212
configure_file(nrnivmodl-core.in ${CMAKE_BINARY_DIR}/bin/nrnivmodl-core @ONLY)
13+
# nrnivmodl-core depends on the building of NMODL_TARGET_TO_DEPEND and the configuration of the
14+
# nrnivmodl-core and nrnivmodl_core_makefile this doesn't imply that whenever there is a change in
15+
# one of those files then the prebuilt mod files are going to be rebuilt
16+
add_custom_target(
17+
nrnivmodl-core ALL
18+
DEPENDS ${CMAKE_BINARY_DIR}/bin/nrnivmodl-core
19+
${CMAKE_BINARY_DIR}/share/coreneuron/nrnivmodl_core_makefile ${NMODL_TARGET_TO_DEPEND})
1320

1421
# =============================================================================
1522
# Install for end users

0 commit comments

Comments
 (0)