- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to show what compiler & version was used to build my program inside my console Fortran program. I use visual studio 2005 to build my solution and have several ifort compilers installed to choose from. I notice the version in the output window while building... but do not know if there is a macro to get hold of it there inside VS.
I now use a "pre-Build Event" to show version in repository and would like to add to this info.
From ifort /help -"/Qsox[-] enable/disable(DEFAULT) saving of compiler options and version in
the executable" but how do i watch this info when running this executable if possible?
Another possibility -"/what display detailed compiler version information"... but I cant figure how to use this in VS either.
Any ideas are welcome
Cheers
Magnus
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There isn't yet a way to do exactly what you want. There is a F2008 intrinsic that will do it, but we don't support it. There are the predefined preprocessor symbols __INTEL_COMPILER and __INTEL_COMPILER_BUILD_DATE which can be used to identify the version indrectly.
You could, I suppose, have a build event that directs the output of an "ifort -what" to a file and then ready the file and create an include file. Seems rather convoluted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes getting "ifort -what" output to file seems promising. What we do today to get the version from tortoisesvn is similar "SubWCRev.exe > file.txt". My worry is, how do I run the same 'ifort' as VS does when it compiles the project/solution, I see no macro for the compiler path in VS. :(
I would gladly make a macro do ifort -what > foo.txt; I will test for sure, and see if the right ifort is choosen!
If we cant run -what for the 'same' ifort in some way, those preprocessor symbols are a substitute for now.
Thank you!
/Magnus

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page