- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm working with a mixed C/Fortran project which uses waf as its cross-platform build system. While trying to resolve issues with ifort on Windows, the waf developers asked if there was a way to get ifort to list the preprocessor symbols or macros it defines because they need that info to support compilation with ifort.
As an example, if one runs
gfortran.exe -dM -E - < a.f90
where a.f90 is an empty file, gfortran helpfully dumps out a long list of #defines (see attached).
Is this a thing ifort can do? I've looked into
ifort /E /fpp a.f90 /dryrun
but I don't think that's doing quite the same thing.
There's more info on this issue at https://github.com/waf-project/waf/issues/1672 which revolves around the inability to get version information, etc. from ifort.
Thanks much,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried ifort /# a.f90?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also use /list when compiling a source and look at the .lst file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mecej4 - no; where is /# documented? I don't think I've seen that before
@Steve - thanks, I've passed that to the project maintainers; we'll see what they say
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whether documented or not, -# and -### are used by many compilers to turn on verbose output. See, for example, https://docs.oracle.com/cd/E18659_01/html/821-1384/bjapr.html#bjaps .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ifort executable is not encrypted and the command-line switches are all in the same place in the file. A little experimentation and...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I asked where the compiler options were documented so I'd know next time where to look for this information rather than making a forum post. The answer appears that /# is undocumented, for whatever reason (deprecated, under development, etc.)
I hope that expecting users to filter their compiler binary through `strings` to discover legal options is more sarcasm than serious. Having been fighting with msvc, ifort, lib, and link for the past 2 days, I can't honestly tell anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/# is indeed not documented, but it is not deprecated. I'll ask if it should be documented. We (Intel) don't expect users to run the compiler through "strings" - we document hundreds of options. I also gave you a documented way of getting the predefined symbols.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is purposefully undocumented; it's intended to be an internal-only switch because its meaning could change at a whim.
The one that is documented is /watch
--Lorri
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page