From 8a5e792f206626a102d8e08d8b3a0db68b9876c2 Mon Sep 17 00:00:00 2001 From: Joel Johnson Date: Tue, 31 Dec 2019 20:38:39 -0700 Subject: [PATCH] Add Clang support, be explicit about MSVC flags --- example/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 51c3218..017f560 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -10,9 +10,9 @@ set(EXAMPLES add_definitions(-D_GLIBCXX_USE_CXX11_ABI) set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${EXTRA_CXX_FLAGS}) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ") -else() +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") add_definitions( -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS