Возможность отключения вывода предупреждений в режиме отладки
This commit is contained in:
parent
f97349f404
commit
3ebfdf81a8
@ -1,5 +1,7 @@
|
|||||||
# based on https://github.com/bluescarni/yacma
|
# based on https://github.com/bluescarni/yacma
|
||||||
|
|
||||||
|
option(CMLIB_WARNING_FLAGS "Enable warning flags" ON)
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
macro(CHECK_ENABLE_CXX_FLAG flag)
|
macro(CHECK_ENABLE_CXX_FLAG flag)
|
||||||
@ -35,7 +37,7 @@ if(CMAKE_CXX_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_IS_INTEL OR CMAKE_CXX_COMPI
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||||
set(CMAKE_CXX_EXTENSIONS YES)
|
set(CMAKE_CXX_EXTENSIONS YES)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(CMLIB_WARNING_FLAGS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
check_enable_cxx_flag(-Wall)
|
check_enable_cxx_flag(-Wall)
|
||||||
check_enable_cxx_flag(-Wextra)
|
check_enable_cxx_flag(-Wextra)
|
||||||
check_enable_cxx_flag(-Wnon-virtual-dtor)
|
check_enable_cxx_flag(-Wnon-virtual-dtor)
|
||||||
|
Loading…
Reference in New Issue
Block a user