PDA

View Full Version : CGAL flag options with Qt



bryanxito
21st October 2012, 07:03
Hi guys I need help to pass this CGAL command into a Qt project:


g++ -frounding-math -O3 -lCGAL -lgmp main.cpp

So far the libraries are linked with this:


LIBS += -L/lib64 -lgmp -lCGAL

But I can't pass the flags: -frounding-math -O3

Any ideas? (=

wysota
21st October 2012, 08:27
Set them in QMAKE_CXXFLAGS.

bryanxito
21st October 2012, 16:55
I have tried:



LIBS += -L/lib64 -lgmp -lCGAL
QMAKE_CXXFLAGS += -frounding-math -O3


And I still getting this error



Explanation: Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?

wysota
21st October 2012, 17:20
Are the flags you set in the compiler command being ran?

bryanxito
22nd October 2012, 21:07
Thats weird ! I run again my code with this lines:



LIBS += -L/lib64 -lgmp -lCGAL
QMAKE_CXXFLAGS += -frounding-math -O3


And now all is working fine, I can't explain it maybe a restart of qt was required but I'm not sure about that. Anyway thanks for your advice it was very useful