Skip to content

Fix handling of hh.mod when using coreNEURON#3301

Merged
JCGoran merged 1 commit into
masterfrom
jelic/hh_fix
Jan 7, 2025
Merged

Fix handling of hh.mod when using coreNEURON#3301
JCGoran merged 1 commit into
masterfrom
jelic/hh_fix

Conversation

@JCGoran

@JCGoran JCGoran commented Jan 7, 2025

Copy link
Copy Markdown
Collaborator

Fixes #3000.
All mod files are first copied to the build dir (unless it's hh.mod in coreNEURON mode, in which case we modify the file) at configure time, then at build-time those files are actually converted to cpp files and compiled.

Unfortunately, one cannot use file at build-time, so we need to use add_custom_command with an external util (like sed) for replacing _reg() with _reg_() in the generated cpp files (since those are actually generated only at build-time). I also opted for using cmake -E copy etc. for modifying the file because 1) sed '[pattern]' [input] > [output] does not work, and 2) the default MacOS sed has some idiosyncrasies compared to GNU sed that I wanted to avoid.

@sonarqubecloud

sonarqubecloud Bot commented Jan 7, 2025

Copy link
Copy Markdown

@JCGoran JCGoran marked this pull request as ready for review January 7, 2025 13:44
@JCGoran JCGoran requested a review from nrnhines January 7, 2025 13:44
@azure-pipelines

Copy link
Copy Markdown

✔️ 12b619f -> Azure artifacts URL

@codecov

codecov Bot commented Jan 7, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.07%. Comparing base (8dfe5a3) to head (12b619f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3301   +/-   ##
=======================================
  Coverage   67.07%   67.07%           
=======================================
  Files         571      571           
  Lines      111055   111055           
=======================================
+ Hits        74487    74488    +1     
+ Misses      36568    36567    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nrnhines nrnhines left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread cmake/MacroHelper.cmake
@JCGoran JCGoran merged commit fbeff9c into master Jan 7, 2025
@JCGoran JCGoran deleted the jelic/hh_fix branch January 7, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update hh.mod for CoreNEURON compatibility changes hh.mod in place during build

2 participants