<div dir="ltr"><div>Hi,<br><br>I&#39;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&#39;t really 
help. I&#39;ve tried setting the property &quot;set_property(GLOBAL PROPERTY 
USE_FOLDERS ON)&quot; but to no avail. <br>
<br><div>2) The application I&#39;m working on works with GCC only and 
version &gt;= 4.6. I&#39;ve installed gcc 4.7 with macports but I&#39;m unable 
to generate a project with Xcode. I&#39;ve tried overriding with the 
following toochain file.<br>
<br>if( &quot;${CMAKE_GENERATOR}&quot; STREQUAL &quot;Xcode&quot;)<br></div><div>    # This works halfway through, until i run into incompatible flags<br></div><div>    set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION &quot;com.apple.compilers.gcc.4_7&quot;)<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: 
&#39;-Wmost&#39;). 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>