Hi, I had some time today and figured out the issue. CMake found the Intel IFX compiler first and it seemed to cause confusion about what type of compiler was actually being used. I worked around this by simply using set FC=ifort and re-running CMake. Was able to get everything I wanted built and tested using the command line tools.
I'm guessing this is not a common use case, but if it happens to others it might be worth updating the CMake files to handle both the Fortran compilers that are installed from the Intel OneAPI tools. Thanks, Jeremy On Thu, Aug 17, 2023 at 9:10 AM Jeremy Nesbitt <jrnesb...@gmail.com> wrote: > Hi, > > I would like to get plplot built in windows with intel fortran bindings > using the Visual Studio command line. I can get build files generated via > CMake if I turn off fortran bindings, but if I enable fortran I always get > an error when running CMake. I have tried NMake, Ninja, and Visual Studio > 2022 generator files. > > In initial troubleshooting to see if this is a more general problem, I > came across this note on the plplot site: > > *Intel Fortran* > If you use Intel Fortran, the solution/project files may cause errors when > building. These affect only the Fortran libraries and examples. It is due > to a small bug in CMake that should be fixed with the next release. > > Was wondering if anyone had any more information on this, such as what bug > it is, what version of CMake it might be fixed in, and whether there is a > workaround? I don't know CMake at all, but if I know there is some hope to > get tthis working I can give it a shot. > > Some details if anyone cares: > -I am using CMake 3.26-msvc > > For NMake, used this command > cmake .. -G "NMake Makefiles" -DBUILD_TEST=ON -DBUILD_SHARED_LIBS=ON > -DPKG_CONFIG_EXECUTABLE=C:\gtk-build\gtk\x64\release\bin\pkg-config.exe > -DCMAKE_INSTALL_PREFIX=C:\usr\lib\plplot -DENABLE_fortran=ON > > Error I get at end > -- Configuring done (29.4s) > CMake Error at cmake/modules/plplot_functions.cmake:577 (add_library): > Cannot find source file: > > plplotfortran.def > > Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm > .h > .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc > Call Stack (most recent call first): > bindings/fortran/CMakeLists.txt:172 (configure_library_build) > > > CMake Error at cmake/modules/plplot_functions.cmake:577 (add_library): > No SOURCES given to target: plplotfortran > Call Stack (most recent call first): > bindings/fortran/CMakeLists.txt:172 (configure_library_build) > > > CMake Generate step failed. Build files cannot be regenerated correctly. > > ___ > > What I use for Visual Studio IDE > cmake .. -G "Visual Studio 17 2022" -Ax64 -DBUILD_TEST=ON > -DBUILD_SHARED_LIBS=ON > -DPKG_CONFIG_EXECUTABLE=C:\gtk-build\gtk\x64\release\bin\pkg-config.exe > -DCMAKE_INSTALL_PREFIX=C:\usr\lib\plplot -DENABLE_fortran=ON > > Error I get (Truncated as it repeats several times at the end) > -- Configuring done (201.6s) > CMake Error in bindings/fortran/CMakeLists.txt: > Evaluation file to be written multiple times with different content. > This > is generally caused by the content evaluating the configuration type, > language, or location of object files: > > C:/PLplot/build/bindings/fortran/plplotfortran_ifort.def.sh > > > CMake Error in bindings/fortran/CMakeLists.txt: > Evaluation file to be written multiple times with different content. > This > is generally caused by the content evaluating the configuration type, > language, or location of object files: > > C:/PLplot/build/bindings/fortran/plplotfortran_ifort.def.sh > > Thanks, > Jeremy > >
_______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel