From GridLAB-D Wiki
Jump to: navigation, search

CXXFLAGS -- Set the C++ compiler flags for runtime classes

Synopsis

#setenv CXXFLAGS=g++-command-line-options
/bin/bash$ export CXXFLAGS=g++-command-line-options

Remarks

The default C++ runtime class compiler options are as follows:

-w
No warning messages generated during compilation of classes.
-I/usr/local/share/gridlabd
GridLAB-D data folder. On cygwin systems this automatically converted to -Ic:/mingw/msys/1.0/local/share/gridlabd.
-O0
No optimization

If CXXFLAGS is set to anything (including an empty string), compiler warnings are enabled. If you wish to keep warnings suppressed you should include the -w option in addition to the other options you include.

If debug output is enabled, the -g optional to enable compiling with debugging symbols is added automatically. If you wish to enable debugging without debug output generated, you must add the -g option to both CXXFLAGS and LDFLAGS.

You can added additional include paths using the -Ipath option.

Any use of the -Olevel option will override the default optimization. This is not advised, especially if you are debugging.

Version

The CXXFLAGS environment variable is supported as of Keeler (Version 4.0).

See also