using FOPTIMIZE


Click here for full thread
Gets Around
The use of FOPTIMIZE has always been a bit of a mystery to me. I may have figured it out before, but if so, I have forgotten it.

Anyways, for posterity, here is how you tweak the compiler optimization flags on a per-subdirectory basis. For example, in src/tce/sort.

The comments below are clear enough, but just in case, note that one has to define OPTIMIZE to something before makefile.h is included, and define FOPTIMIZE after makefile.h is included. If you fail to do both, FOPTIMIZE will be ignored.


LIB_INCLUDES = -I../include

LIBRARY = libtce.a

USES_BLAS = 

HEADERS =

# This has to go before makefile.h
OPTIMIZE = 1

include ../../config/makefile.h

# This has to go after makefile.h
FOPTIMIZE += -qopt-report -qopt-streaming-stores=always -qopt-multi-version-aggressive

include ../../config/makelib.h