BUG: commit cdfc299d6876

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
jms
Gnoblar
Posts: 2
Joined: Sat Aug 04, 2012 12:43 pm

BUG: commit cdfc299d6876

Post by jms »

Commit "Fixed -msse flag when building with MinGW." introduces a bug when compiling under linux with gcc if CMAKE_CXX_FLAGS is set by the user.

I usually configure ogre with -DCMAKE_CXX_FLAGS="-w" (an option to disable OGRE_WARNING_FLAGS would be nice btw) and after updating to the newest source (v1-8) I got this error:

Code: Select all

c++: fatal error: no input files
compilation terminated.
/bin/sh: 1: -msse: not found
Make invokes c++ with the following flags:

Code: Select all

/usr/bin/c++   -DOgreMain_EXPORTS -DBOOST_ALL_NO_LIB -DOGRE_NONCLIENT_BUILD -DFREEIMAGE_LIB -D_MT -D_USRDLL -w;-msse -Wno-deprecated -Wall -Wctor-dtor-privacy -Winit-self -Wno-overloaded-virtual -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -pedantic -Wshadow -Wno-missing-field-initializers -Wno-long-long -Wno-unused-but-set-parameter -O3 -DNDEBUG -fPIC [includes, source file, object file etc]
Looks like CMAKE_CXX_FLAGS is a string, not a list.
Possible solution:

Code: Select all

-   list(APPEND CMAKE_CXX_FLAGS -msse)
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse")
Thanks
TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin
x 65

Re: BUG: commit cdfc299d6876

Post by TheSHEEEP »

Oh, my!
Indeed seems like that.
I'll fix it immediatly.

I originally used the list command as I thought it just looks more clear. Good to know it tends to break strings. :)
Thanks for the hint!

Edit:
Committed to v1-8. Please tell me if the problem remains, can't test on Linux right now. :)
My site! - Have a look :)
Also on Twitter - extra fluffy
jms
Gnoblar
Posts: 2
Joined: Sat Aug 04, 2012 12:43 pm

Re: BUG: commit cdfc299d6876

Post by jms »

It works now, thanks :)