Hi,

Thanks for the reply.  Following your note, I did the following:

Start the Intel oneAPI Tools command line (installed when I installed their
fortran compiler).
Go to plplot code and make a build directory.
cmake ..

When I do this, it finds ifort as the fortran compiler, which meets your
expectations.

Then I deleted the build folder and started over with all the options I
wanted

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

When I did this, cmake found the ifx compiler instead.  I know next to
nothing about Cmake so my opinion bears little weight, but it seems
suspicious that the compiler detection depends on the options I specified.
But it was reproducible.  When I pass no options, cmake finds ifort first.
When I pass the options I want, it finds ifx first.

Thanks,
Jeremy

On Thu, Aug 24, 2023 at 4:04 AM Arjen Markus <arjen.mar...@deltares.nl>
wrote:

> Hi Jeremy,
>
>
>
> My apologies for not reacting sooner (me being one of the maintainers of
> PLplot), but at the very least you were able to solve your problem
> yourself. Could you specify the problems you met with the Intel oneAPI ifx
> compiler? Intel intends to phase out the classic one at some point in the
> near future and I was not aware of any problems it might cause. I have not
> seen any issues with other CMake-enabled builds for Fortran programs. As
> far as I know CMake picks the classic ifort compiler by default.
>
>
>
> Regards,
>
>
>
> Arjen
>
>
>
> *From:* Jeremy Nesbitt <jrnesb...@gmail.com>
> *Sent:* Saturday, August 19, 2023 3:30 AM
> *To:* plplot-devel@lists.sourceforge.net
> *Subject:* Re: [Plplot-devel] Building plplot in Windows with Intel
> Fortran Compiler
>
>
>
> *Caution:* This message was sent from outside of Deltares. Please do not
> click links or open attachments unless you recognize the source of this
> email and know the content is safe. Please report all suspicious emails to "
> servicedesk-...@deltares.nl" as an attachment.
>
>
>
> 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
>
> DISCLAIMER: This message is intended exclusively for the addressee(s) and
> may contain confidential and privileged information. If you are not the
> intended recipient please notify the sender immediately and destroy this
> message. Unauthorized use, disclosure or copying of this message is
> strictly prohibited. The foundation 'Stichting Deltares', which has its
> seat at Delft, The Netherlands, Commercial Registration Number 41146461, is
> not liable in any way whatsoever for consequences and/or damages resulting
> from the improper, incomplete and untimely dispatch, receipt and/or content
> of this e-mail.
>
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to