It seems the Fortran interface assumes that the CMAKE_BINARY_DIR is the same as the source tree, at least I am getting this error when I do something like mkdir obj-x86_64-linux-gnu; cmake ..; make:
[100%] Generating libint2.h.i
/usr/bin/cc -E -D__COMPILING_LIBINT2 -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/include -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/include/libint2 /<<PKGBUILDDIR>>/include/libint2.h -o /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/fortran/libint2.h.i
cc1: fatal error: opening output file /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/fortran/libint2.h.i: No such file or directory
compilation terminated.
And indeed, there is no fortran directory in obj-x86_64-linux-gnu, it does not seem to get created so I guess it is assumed to be the source one? If I create it, I get a bit further but then hit include errors where the build is looking for headers in <src>/include
[100%] Building Fortran object CMakeFiles/libint_f.dir/fortran/libint_f.F90.o
/usr/bin/gfortran -D__COMPILING_LIBINT2 -I"/build/libint2-PjDXPU/libint2-2.6.0~beta6/include" -I"/build/libint2-PjDXPU/libint2-2.6.0~beta6/fortran" -c "/build/libint2-PjDXPU/libint2-2.6.0~beta6/fortran/libint_f.F90" -o CMakeFiles/libint_f.dir/fortran/libint_f.F90.o
/build/libint2-PjDXPU/libint2-2.6.0~beta6/fortran/libint_f.F90:5:2:
#include <libint2/util/generated/libint2_params.h>
1~~~~~~~~~~~~~~~~~
Fatal Error: libint2/config.h: No such file or directory
compilation terminated.
The generated libint2/config.h header is only in the CMAKE_BINARY_DIR but the -Is are for the source dir.
It seems the Fortran interface assumes that the
CMAKE_BINARY_DIR
is the same as the source tree, at least I am getting this error when I do something likemkdir obj-x86_64-linux-gnu; cmake ..; make
:And indeed, there is no
fortran
directory inobj-x86_64-linux-gnu
, it does not seem to get created so I guess it is assumed to be the source one? If I create it, I get a bit further but then hit include errors where the build is looking for headers in<src>/include
The generated
libint2/config.h
header is only in theCMAKE_BINARY_DIR
but the-I
s are for the source dir.cc @pseewald