Skip to content

Commit 39a7675

Browse files
committed
build: add support to warning flags for MSVC
1 parent 467504c commit 39a7675

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

error/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ cmake_minimum_required(VERSION 3.0)
22

33
project(error)
44

5-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -Wpedantic")
5+
if(MSVC)
6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive- /W4 /w14640 /EHsc")
7+
else()
8+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -Wpedantic")
9+
endif()
10+
611
set(CMAKE_CXX_STANDARD 11)
712

813
include(cmake/CPM.cmake)

0 commit comments

Comments
 (0)