Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28996 Discussions

looking for a way to embed compiler / linker args in the program?

gauthier_108
Novice
242 Views

Hello, I'd like to embed the compiler / linker args in my program, I'm using windows / visual fortran tooling, but also interested in cmake solution.

 

I tried to look at environment variables in pre-build step (by calling "set") but it doesn't seem to have the information I need.

 

Is there a $(SomeVariable) that visual fortran generates before calling ifx?

 

I think if such variable is defined, I can use this to automate what I want.

 

Thanks.

0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
235 Views

Do you mean the standard routines COMPILER_VERSION and COMPILER_OPTIONS perhaps? These capture the "exact" information about what compiler was used to build your program and the options that were used. They are contained in the module ISO_FORTRAN_ENV.

View solution in original post

0 Kudos
2 Replies
Arjen_Markus
Honored Contributor I
236 Views

Do you mean the standard routines COMPILER_VERSION and COMPILER_OPTIONS perhaps? These capture the "exact" information about what compiler was used to build your program and the options that were used. They are contained in the module ISO_FORTRAN_ENV.

0 Kudos
gauthier_108
Novice
230 Views

@Arjen_Markus this is exactly what I needed, thanks for the pointer!

 

https://fortranwiki.org/fortran/show/compiler_options

 

I think the linker arguments are less of an issue in my context.

0 Kudos
Reply