インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス
Module Intrinsic Inquiry Function: Returns a string containing the compiler options that were used for compilation.
USE ISO_FORTRAN_ENV
result = COMPILER_OPTIONS( )
The result is a scalar of type default character of processor-defined length.
The return value is a list of the compiler options that were used for compilation.
Consider the following file named t.f90:
use ISO_FORTRAN_ENV character (len = :), allocatable :: res res = compiler_options () print *, "len of res is: ", len (res) print *, "('<<', A, '>>')") res deallocate (res) end
The following is the output:
On Windows:
Win>ifort /exe:t /warn:alignments /assume:writeable-strings t.f90 Intel® Visual Fortran Compiler for applications running on architecture, Version version Built date-and-time by user on platform in directory Copyright (C) 1985-2016 Intel Corporation. All rights reserved. Microsoft ® Incremental Linker Version version Copyright (C) Microsoft Corporation. All rights reserved. -out:t.exe -subsystem:console t.obj Win> t.exe len of compiler_options is: 48 <</exe:t /warn:alignments /assume:writeable-strings>>
On Linux:
Lin$ ifort -o t.out -warn alignments -assume writeable-strings t.f90 Lin$ ./t.out len of res is: 51 <<-o t.out -warn alignments -assume writeable-strings>>