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

Commit e10e0b5

Browse files
authored
CMake and mod2c update : (#125)
- rebuild external project (which requires cmake 3.1) - add mod2c binary dependency to mod files translation - update mod2c to latest master
1 parent 88fb49e commit e10e0b5

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CMake/config/DeclareMod2CSubModule.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ set(ExternalProjectCMakeArgs
4242
)
4343

4444
ExternalProject_Add(mod2c
45+
BUILD_ALWAYS 1
4546
SOURCE_DIR ${PROJECT_SOURCE_DIR}/external/mod2c
4647
GIT_SUBMODULES
4748
CMAKE_ARGS ${ExternalProjectCMakeArgs}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Initial Setup
3838

39-
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
39+
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
4040
PROJECT(coreneuron)
4141
set(CORENEURON_DESCRIPTION "BBP CoreNeuron simulator")
4242

coreneuron/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if(NOT EXISTS ${MOD2C})
4141
set (MOD2C ${PROJECT_BINARY_DIR}/external/mod2c/bin/mod2c_core)
4242
endif()
4343

44+
set (MOD2C_BINARY ${MOD2C})
4445
get_filename_component(mod2c_install_prefix ${MOD2C} DIRECTORY)
4546
set (MOD2C_UNITS "${PROJECT_BINARY_DIR}/external/mod2c/share/nrnunits.lib")
4647
set(MOD2C env "MODLUNIT=${MOD2C_UNITS}" ${MOD2C})
@@ -68,7 +69,7 @@ macro(mod2c_target name input)
6869
list(APPEND MOD2C_${name}_MODS "${mod2c_modname_}")
6970

7071
add_custom_command(OUTPUT "${mod2c_output_}"
71-
DEPENDS ${input} mod2c
72+
DEPENDS ${input} mod2c ${MOD2C_BINARY}
7273
COMMAND ${CMAKE_COMMAND} -E copy "${mod2c_source_}" "${CMAKE_CURRENT_BINARY_DIR}"
7374
COMMAND ${MOD2C} "${mod2c_modname_}"
7475
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

0 commit comments

Comments
 (0)