Test compiler to decide to add -std=c++11 option

Copied from renderdoc cmake configuration
This commit is contained in:
Jake Turner
2021-02-18 15:41:40 +00:00
committed by Baldur Karlsson
parent b7eebf9f68
commit 46f84675f8
+5
View File
@@ -108,6 +108,11 @@ set(SRC main.cpp
linux/linux_window.cpp)
project(demos)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
add_executable(demos ${SRC} ${VULKAN_SRC} ${OPENGL_SRC})
install(TARGETS demos DESTINATION .)