This commit is contained in:
terik23 2019-04-25 22:08:44 +05:00
parent fbd4518d13
commit e9b4f63c92
2 changed files with 4 additions and 4 deletions

View file

@ -4,10 +4,10 @@ set(OPTIONS "")
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_VERBOSE_MAKEFILE ON)
set(OPTIONS -Wall -Wextra -pedantic-errors) set(OPTIONS -Wall -Wextra -pedantic-errors -Werror)
set(OPTIONS ${OPTIONS} -std=c++17) set(OPTIONS ${OPTIONS} -std=c++17)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(OPTIONS /W4) set(OPTIONS /W4 /WX)
check_cxx_compiler_flag(/permissive HAS_PERMISSIVE_FLAG) check_cxx_compiler_flag(/permissive HAS_PERMISSIVE_FLAG)
if(HAS_PERMISSIVE_FLAG) if(HAS_PERMISSIVE_FLAG)
set(OPTIONS ${OPTIONS} /permissive-) set(OPTIONS ${OPTIONS} /permissive-)

View file

@ -5,7 +5,7 @@ set(SOURCES test.cpp)
set(OPTIONS "") set(OPTIONS "")
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(OPTIONS /W4) set(OPTIONS /W4 /WX)
check_cxx_compiler_flag(/permissive HAS_PERMISSIVE_FLAG) check_cxx_compiler_flag(/permissive HAS_PERMISSIVE_FLAG)
if(HAS_PERMISSIVE_FLAG) if(HAS_PERMISSIVE_FLAG)
set(OPTIONS ${OPTIONS} /permissive-) set(OPTIONS ${OPTIONS} /permissive-)
@ -16,7 +16,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
check_cxx_compiler_flag(/std:c++latest HAS_CPPLATEST_FLAG) check_cxx_compiler_flag(/std:c++latest HAS_CPPLATEST_FLAG)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_VERBOSE_MAKEFILE ON)
set(OPTIONS -Wall -Wextra -pedantic-errors) set(OPTIONS -Wall -Wextra -pedantic-errors -Werror)
check_cxx_compiler_flag(-std=c++17 HAS_CPP17_FLAG) check_cxx_compiler_flag(-std=c++17 HAS_CPP17_FLAG)
check_cxx_compiler_flag(-std=c++20 HAS_CPP20_FLAG) check_cxx_compiler_flag(-std=c++20 HAS_CPP20_FLAG)