[CMake] Specifying compilers?
Jason T. Slack-Moehrle
slackmoehrle at gmail.com
Thu Aug 23 11:14:07 EDT 2012
>> I am trying to use come C++v11 features and am trying to get the
>> compiling to work.
>> SET( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++" )
>>
>> PROJECT( ${PROJECT_NAME} )
>
> PROJECT will set up the compiler and stuff. And in this process it will set
> CMAKE_CXX_FLAGS, i.e. will overwrite your lines. Exchange the lines and make
> sure not to overwrite the existing flags, but append to them.
This worked.
Can you explain how I would/should have known that PROJECT will
specify compiler and stuff when I am passing it in with the cmake
command as well as using the SET statement above?
-Jason
More information about the CMake
mailing list