Page 1 of 1
-pedantic compiler option causes dependency compile errors
Posted: Wed Sep 12, 2012 10:01 am
by d000hg
In XCode 3, the Ogre 1.8.1 CMake script generates -pedantic as a C++ flag. This leads to compile errors in dependency headers which have trailing semi-colons:
It wasn't a problem in the 1.8 RC version. Is this a deliberate change, or maybe CMake for Xcode 3 didn't get properly QA'd?
Can anyone tell me where/how to fix this in my own CMake script rather than fixing it in the generated Xcode projects?
Re: -pedantic compiler option causes dependency compile erro
Posted: Wed Sep 12, 2012 3:36 pm
by masterfalcon
To be honest Xcode 3 isn't tested at all anymore. But GCC bundled with Xcode 3 must treat them as errors rather than warnings.
Re: -pedantic compiler option causes dependency compile erro
Posted: Wed Sep 12, 2012 3:39 pm
by d000hg
Yeah, it does. But my question I guess is why -pedantic got added, it wasn't there in 1.8 RC which suggests it was deliberate? Or do Xcode3/4 share the same CMake scripts somehow?
Re: -pedantic compiler option causes dependency compile erro
Posted: Wed Sep 12, 2012 4:40 pm
by Mikachu
d000hg wrote:But my question I guess is why -pedantic got added
I think Svenstaro pushed for adoption of these flags (there have been a few discussions on the topic in developper forum)
d000hg wrote:This leads to compile errors in dependency headers which have trailing semi-colons
It is generally a bad thing to enforce strict rules on headers you can't modify.
A workaround is to change this : (in CMakeLists.txt)
Code: Select all
include_directories(${MY_DEPENDENCIES_DIR})
into that :
Code: Select all
include_directories(SYSTEM ${MY_DEPENDENCIES_DIR})