CMake clang y c ++ 0x

Cuando uso clang ++, ¿cómo puedo hacer que CMake use la-std=c++0x marca al compilar, pero no al vincular?

Hay varias otras publicaciones sobre el uso de clang como compilador, pero no he encontrado ninguna pista sobre cómo establecer el estándar de c ++.

Esto es lo que probé:

CMakeLists.txt:

project(test)
add_executable(main main.cxx)

ClangOverride.txt:

SET (CMAKE_C_FLAGS_INIT                "-Wall -std=c99")
SET (CMAKE_C_FLAGS_DEBUG_INIT          "-g")
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT     "-Os -DNDEBUG")
SET (CMAKE_C_FLAGS_RELEASE_INIT        "-O3 -DNDEBUG")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")

SET (CMAKE_CXX_FLAGS_INIT                "-Wall -std=c++0x -stdlib=libc++")
SET (CMAKE_CXX_FLAGS_DEBUG_INIT          "-g")
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT     "-Os -DNDEBUG")
SET (CMAKE_CXX_FLAGS_RELEASE_INIT        "-O3 -DNDEBUG")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET (CMAKE_EXE_LINKER_FLAGS_INIT         "")

main.cxx:

int main(){ return 0; }

Command utilizado para invocarcmake

CC=clang CXX=clang++ cmake .. -DCMAKE_USER_MAKE_RULES_OVERRIDE=ClangOverride.txt -DCMAKE_BUILD_TYPE=Release

Construyendo el proyecto:

VERBOSE=1 make

Esto invocará los siguientes dos comandos:

/usr/bin/clang++    -Wall -std=c++0x -stdlib=libc++ -O3 -DNDEBUG   -o CMakeFiles/main.dir/main.cxx.o -c /tmp/asdf/main.cxx
/usr/bin/clang++    -Wall -std=c++0x -stdlib=libc++ -O3 -DNDEBUG    CMakeFiles/main.dir/main.cxx.o  -o main -rdynamic

El segundo comando genera una advertencia porque si el indicador no utilizado: -std = c ++ 0x

clang: warning: argument unused during compilation: '-std=c++0x'
CMakeFiles/main.dir/main.cxx.o: file not recognized: File format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)

¿Cómo puedo evitar esto?