Skip to content

CMake build: add uatom.f and uniquetyp.f to the source list - #187

Open
exergonic wants to merge 1 commit into
TinkerTools:mainfrom
exergonic:cmake-source-list-fix
Open

exergonic wants to merge 1 commit into
TinkerTools:mainfrom
exergonic:cmake-source-list-fix

Conversation

@exergonic

Copy link
Copy Markdown

Building from main fails partway through: mdsave.f cannot open the uatom module, and the link then stops with undefined references to symbols from the two files below (utv1/utv2/utv3, uniquetyp_, velunique_). The build compiles a hand-maintained source list — set(_FILES ...) in cmake/CMakeLists.txt — and uatom.f and uniquetyp.f are the only files under source/ that appear in neither _FILES nor _BINS, so neither is ever compiled: mdsave.f uses the uatom module and calls velunique, and mdinit.f calls uniquetyp. Adding both names to the list in their alphabetical positions fixes the compile and link stages with no other change. Verified on Linux with gfortran 13.3; the resulting binaries reproduce the release binaries' output on the same inputs. Fixes #184.

Both files exist under source/ but appear in neither _FILES nor _BINS in cmake/CMakeLists.txt, so they never compile: mdsave.f fails on the missing uatom module and the link fails with undefined references to uniquetyp_/velunique_. Adding both names to the alphabetical list restores the build. Fixes TinkerTools#184.
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.

CMake build fails: Cannot open module file 'uatom.mod'; link fails with undefined reference to uniquetyp_/velunique_

1 participant