[CMake] Changing GCC_INPUT_TYPE for Mac

Clemens Arth clemens.arth at gmx.at
Mon Jan 12 13:30:40 EST 2009


Hi Michael,

thanks for the fast reply. I'll test that tomorrow.

Regards
Clemens

Michael Wild schrieb:
>
> 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
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



More information about the CMake mailing list