[CMake] Changing GCC_INPUT_TYPE for Mac
Michael Wild
themiwi at gmail.com
Mon Jan 12 10:37:56 EST 2009
On 12. Jan, 2009, at 15:12, Clemens Arth wrote:
> Hi,
>
> is there a possibility to change the type of a file from a
> CMakeLists.txt file for Xcode? What I want to do is compiling a
> simple c++ file as objective-c++ instead of c++. As default mode,
> Xcode chooses the file extension to figure out what type the file
> is, but I want to avoid changing the extension of my file from cpp
> to mm. There is a switch in Xcode to change the default behaviour,
> but is there also a possibility to change it from cmake directly?
>
> Regards
> Clemens
>
For g++ the GCC compiler suite this would be the option "-x objective-c
++". Set it using either SET_(TARGET|SOURCE_FILE)_PROPERTIES( <targets|
files> PROPERTIES COMPILE_FLAGS "-x objective-c++" ) or by setting
CMAKE_CXX_FLAGS.
HTH
Michael
More information about the CMake
mailing list