Using C++0x in Xcode 4.2 project via CMake

前端 未结 2 2027
猫巷女王i
猫巷女王i 2021-02-04 04:04

I\'m using CMake to generate a project file for Xcode 4.2 on OSX Lion, and I\'m using some of the C++0x features in LLVM like nullptr and auto. In order to use these, Xcode requ

2条回答
  •  太阳男子
    2021-02-04 04:43

    The first one you could change the CMAKE_CXX_FLAGS attribute and add it: SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=C++0x")

    As for selecting GCC instead of Clang you'll have to use something like: Switching between GCC and Clang/LLVM using CMake

    That will override the CLang default values to use GCC

提交回复
热议问题