Approximatrix, LLC

Download! Purchase!

Platform:

  • Simply Fortran Documentation
  • Project Options

    The project options dialog configures most aspects of a given project with the exception of the files to be included. This dialog is project-specific, meaning different values will be present for different projects. Each tab in the project options dialog is described below:

    Project Options Dialog

    General

    This first tab allows users to change common project options.

    Target Options

    The target options specify the project’s final build product. Simply Fortran supports three basic target types: executables, shared libraries, and static libraries. Each is explained below.

    Target Name

    The target name specifies the final product of the build process. The target name is generated within the project’s base directory unless a relative path is specified.

    Executable

    Selecting this option instructs the compiler to create an executable as its product.

    Shared Library

    Building a shared library will generate a dynamic link library (DLL) from the project sources.

    Static Library

    A static library, which often ends in the suffixes lib or a, can be compiled into another library or executable.

    Icon

    If the target is an executable and the Windows GUI checkbox is checked, the icon button allow the user to select an icon from an icon file. The icon will be compiled into the resulting target and used as the program’s system menu and taskbar icon. By clicking the button, a file dialog will open allowing the user to select an appropriate icon ending with the .ico extension. Pressing Cancel in the file dialog will clear any previously selected icon. The icon, once selected, should be displayed in the button itself.

    Architecture

    Two architectures are available under Simply Fortran, either 32-bit or 64-bit. Both are available regardless of the Windows version currently in use, but 64-bit targets will not be executable on 32-bit versions of Windows. The default will match the current platform’s operating system.

    Windows GUI

    This option can be used when compiling programs that include a graphical user interface, or GUI. When unselected, a console will be opened every time the program is run. For most Fortran text-mode programs, opening is console is the desired behavior. However, if the program makes use of a GUI, the console may be undesirable. By clicking this checkbox, the compiler will be passed the -mwindows flag, which indicates that the program should not open a console at startup.

    Code Generation

    Project Options Dialog

    The code generation tab allows control over optimization and debugging settings.

    Optimization Level

    This dropdown provides four different optimization options. The available modes are:

    * None – No optimizations will be performed * Size – Generates the smallest possible target * Common – Allows for a number of common optimizations, equivalent to GNU Fortran’s “-02” * Extreme – Allows for additional optimization, equivalent to GNU Fortran’s “-03”

    Aggressive Loop Optimizations

    Enabling the option allows the compiler to perform a number of optimizations related to loops, including reordering nested loops and attempting to parallelize loops where possible.

    Enable Debugging

    When enabled, debugging information is generated during compilation, allowing the program to be debugged when requested.

    Enable Profiling

    A target compiled with profiling enabled will generate data concerning the frequency and duration of function calls within the compiled target when the target is launched. This data can then be used to generate a profile analysis.

    Target CPU

    The dropdown offers a list of central processing units for which the compiled code can be tuned. If the resultant target is going to be distributed to others on different machines, generic is suggested as the best option. If the target will solely be used on the user’s machine, the native option will tune the target to make use of any features available on the user’s machine. Alternatively, a model may be selected from the dropdown.

    When the Compile Strictly for Selection option is enabled, the resultant target will not run on CPUs that do not possess the features specified in the Target CPU’s dropdown box. Enabling this option can provide speed benefits at the cost of compatibility.

    Fortran

    Project Options Dialog

    The Fortran tab offers options related specifically to the Fortran compiler.

    Use Double Precision for all Reals

    Enabling this option promotes all variables and functions declared as Fortran REAL to double precision. Double precision can improve mathematic precision at the expense of memory consumed. Enabling this option does not affect variables explicitly declared as double precision.

    Enable Cray Pointers

    By default, GNU Fortran assumes that keywords associated with pointers are referring to Fortran 90 pointers. Enabling this option allows the compiler to accept Cray pointer syntax as well.

    Enable Runtime Diagnostics

    Enabling this option causes certain runtime checks to be performed while your target program runs. Specifically, warnings will be generated for:

    This feature can be helpful when debugging troublesome targets.

    Enable C Preprocessor

    When enabled, any Fortran source files are first fed into the C preprocessor. This option is useful if the source code uses preprocessor directives such as “#include” or “#ifdef.”

    Enable OpenMP

    Enabling this option allows the compiler to understand OpenMP directives while compiling code.

    Non-standard Line Length

    When enabled, the specified line length will be used as the maximum allowable line length for both free- and fixed-format Fortran source files.

    Enforce Standard

    If this option is enabled, the compiler will enforce the specified Fortran standard for all source files during compilation, disabling any compiler extensions or features unavailable in the chosen standard. If strict FORTRAN 77 compliance is necessary, legacy should be chosen.

    Linker

    Project Options Dialog

    This tab provides the user with some basic parameters for the linking step of the build process.

    Static Linking

    The first group of buttons controls whether the C, C++, and Fortran runtime libraries should be statically linked to the project. It is generally suggested that users select All Static because it eliminates dependencies on DLLs that may or may not be present on the path of the system where the project’s target will be used.

    Build Import Library

    This option is only enabled when constructing a shared library. When enabled, an import library will be generated along with the target DLL, which can ease linking the target DLL with other projects.

    Compiler Flags

    Project Options Dialog

    The compiler flags tab allows the user to manually enter additional flags to be used by the compilers and linker.

    Package Flags

    Also beneath the linker flags box is a button, Package Flags, that allows a user to select flags available from installed addon packages:

    Addon packages are normally installed via the SF Package Manager. Please see http://packages.simplyfortran.com/ for more details.

    The user can select one or more package templates listed from the list. Multiple selections can be made while holding down the Control key. If the user then presses Ok, the flags necessary to use the selected packages will be added to the Fortran Compiler, C Compiler, and Linker Flags for the current project.

    File Locations

    Project Options Dialog

    The file locations tab provides control over where certain paths needed by the compiler are located.

    Build Directory

    The build directory specifies the location for storing compiled files relative to the project’s home directory. By default Simply Fortran will create a directory at compile time and direct all compiler output to said directory. This directory is also deleted during the clean process.

    Module Directory

    The module directory is the location relative to the project’s home directory where modules are stored. At compile time, Simply Fortran will create this directory if necessary, and the module directory will be deleted during the clean process.

    Users should not place files in the module directory as they will be deleted during the build process. To include external modules, users should specify a directory via the Search Directories option.

    Search Directories

    The Search Directories dialog lists the directories where the compilers search for libraries, headers, and Fortran modules.

    Search Directories Dialog

    The dialog contains two tabs corresponding to include search directories and library search directories. The include search directories corresponds not only to C compiler headers, but also to Fortran module files. The dialog is used only to specify the directories to search as opposed to actual libraries to incorporate during linking.

    The Add… button opens a directory search dialog for the user to specify a directory. Similarly, the Remove button will remove any selection from the current search list. Default directories which are present in new projects can be removed using the Remove button, but are added back in simply by pressing the Add Defaults button.

    Make Options

    Project Options Dialog

    The final tab provides control over the project’s Makefile.

    Makefile Name

    This text box specifies the name of the Makefile to be created and used by Simply Fortran during the build process. This file will be created in the project’s directory.

    Always Regenerate Makefile

    By enabling this option, Simply Fortran will regenerate the makefile associated with the current project every time the user initiates the build process . Any user-created changes to a makefile will be destroyed if this option is selected. All dependencies will be updated during every build cycle, however, which is often useful for development projects and eliminates the generate makefile step.

    See Also

    Compiler Options