Compiling using CMake is broken
FHedin opened this issue · comments
Florent Hédin commented
Dear Jay, dear all,
This issue was observed with the last commit of branch release.
We try to compile tinker using CMake as following:
mkdir build && cd build
cmake ../cmake
make
CMake complains that module expol is not found:
/tmp/tinker/source/alterpol.f:59:10:
59 | use expol
| 1
Fatal Error: Cannot open module file '**expol.mod**' for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/tinker.dir/build.make:127: CMakeFiles/tinker.dir/tmp/tinker/source/alterpol.f.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:211: CMakeFiles/tinker.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
It seems that expol was not listed in the file CMakeLists.txt
; here is a patch that fixed the problem:
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 61e06340..b02a74d5 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -120,7 +120,7 @@ set(_FILES
erxnfld1 erxnfld2 erxnfld3 esolv esolv1 esolv2 esolv3 estrbnd
estrbnd1 estrbnd2 estrbnd3 estrtor estrtor1 estrtor2 estrtor3 etors
etors1 etors2 etors3 etortor etortor1 etortor2 etortor3 eurey eurey1
- eurey2 eurey3 evcorr ewald extra extra1 extra2 extra3 faces fatal
+ eurey2 eurey3 evcorr ewald expol extra extra1 extra2 extra3 faces fatal
fft fft3d fftpack field fields files final flatten fracs freeunit
freeze geometry getarc getcart getdcd getint getkey getmol getmol2
getnumb getpdb getprm getref getstring gettext getword getxyz
Best regards,
Florent & Daniele & Evgeny from Qubit Pharmaceuticals
Jay Ponder commented
Thanks. This is fixed in the recent commits to Tinker.