hi to all,
I'm using cmake under linux for a c++ project.
I want / have to filter out gcc CXXFLAGS provided by the environment.
Supposed a user of my trunk wants to compile my software, and sets some nice
flags my program will not like at runtime:
export CXXFLAGS="-march=prescott -O6 -fguess-not-calc -fbork-me-completely"
I'm only interested in the -march or -mtune flag, so I could do something
like:
SET(RAW_FLAGS $ENV{CXXFLAGS})
STRING(REGEX MATCH "[-]march=.*[ ]|[-]mtune=.*[ ]" result "${RAW_FLAGS}" )
MESSAGE("${result}")
Ok, now I have a something to work with, but how can I make cmake to ignore
the $ENV{CXXFLAGS} for predefined and/or custom build types?
Thank you in advance,
Sk
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake