You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
cmake: export targets, allow building mechanisms via CMake, part 1 (#3468)
This PR aims to allow dependent projects to build their models via CMake
rather than a combination of shell scripts and Makefiles. In the long
term, this may help facilitate building natively on Windows.
To try:
```
nrnivmodl-cmake
```
or
```
git clone -b imported-main https://github.com/BlueBrain/neurodamus-models.git
cd neurodamus-models
```
Create a `CMakeLists.txt` with contents like:
```cmake
cmake_minimum_required(VERSION 3.28)
project(newrodamus)
find_package(neuron REQUIRED)
create_libnrnmech(MOD_FILES
neocortex/mod/v6/CaDynamics_DC0.mod
neocortex/mod/v6/Ca_HVA2.mod
neocortex/mod/v6/Ca_LVAst.mod
neocortex/mod/v6/DetAMPANMDA.mod
neocortex/mod/v6/DetGABAAB.mod
neocortex/mod/v6/GluSynapse.mod
neocortex/mod/v6/Ih.mod
neocortex/mod/v6/K_Pst.mod
neocortex/mod/v6/K_Tst.mod
neocortex/mod/v6/KdShu2007.mod
neocortex/mod/v6/NaTg.mod
neocortex/mod/v6/Nap_Et2.mod
neocortex/mod/v6/ProbAMPANMDA_EMS.mod
neocortex/mod/v6/ProbGABAAB_EMS.mod
neocortex/mod/v6/SK_E2.mod
neocortex/mod/v6/SKv3_1.mod
neocortex/mod/v6/StochKv3.mod
neocortex/mod/v6/TTXDynamicsSwitch.mod
neocortex/mod/v6/VecStim.mod
neocortex/mod/v6/gap.mod
neocortex/mod/v6/netstim_inhpoisson.mod
)
```
Then build and install:
```
cmake -B build -S . -GNinja -DCMAKE_INSTALL_PREFIX=x86_64
cmake --build build
cmake --install build
```
---------
Co-authored-by: Matthias Wolf <matthias.wolf@epfl.ch>
Co-authored-by: nrnhines <michael.hines@yale.edu>
0 commit comments