Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of hh.mod when using coreNEURON #3301

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

JCGoran
Copy link
Collaborator

@JCGoran JCGoran commented Jan 7, 2025

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.

Copy link

sonarqubecloud bot commented Jan 7, 2025

@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
Copy link

✔️ 12b619f -> Azure artifacts URL

Copy link

codecov bot commented Jan 7, 2025

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.

Copy link
Member

@nrnhines nrnhines left a comment

Choose a reason for hiding this comment

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

LGTM

@JCGoran JCGoran merged commit fbeff9c into master Jan 7, 2025
38 checks passed
@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