<div dir="ltr"><div>Hi,<br><br>I'm currently working on porting a project Mac OS X and need some help with some things. <br><br></div>1)
Is it possible to preserve the source code hierarchy in the generate
project? Having every source listed in a single level doesn't really
help. I've tried setting the property "set_property(GLOBAL PROPERTY
USE_FOLDERS ON)" but to no avail. <br>
<br><div>2) The application I'm working on works with GCC only and
version >= 4.6. I've installed gcc 4.7 with macports but I'm unable
to generate a project with Xcode. I've tried overriding with the
following toochain file.<br>
<br>if( "${CMAKE_GENERATOR}" STREQUAL "Xcode")<br></div><div> # This works halfway through, until i run into incompatible flags<br></div><div> set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.gcc.4_7")<br>
else() <br></div><div> # This one works just fine when using Makefiles<br></div><div> set(CMAKE_SYSTEM_NAME Darwin)<br> set(CMAKE_C_COMPILER /opt/local/bin/gcc-mp-4.7)<br> set(CMAKE_CXX_COMPILER /opt/local/bin/g++-mp-4.7)<br>
endif()<br><br><br></div><div>The first condition uses this hack(<a href="http://hamelot.co.uk/programming/add-custom-compiler-to-xcode/" target="_blank">http://hamelot.co.uk/programming/add-custom-compiler-to-xcode/</a>)
to integrate the newer version of GCC in Xcode. However, this leads to
some compiler error since some flags are not supported by it (e.g:
'-Wmost'). Is there anyway I can alter the default Xcode projects used
by CMake to test the compiler?<br>
<br></div>Kind Regards,<br><br>Leander</div>