Add MSVC options.
This commit is contained in:
parent
e2e2834993
commit
3b0934fb09
|
@ -1,7 +1,11 @@
|
|||
# For MSVC_RUNTIME_LIBRARY
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_compile_options(-Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context)
|
||||
if (MSVC)
|
||||
add_compile_options(/W1 /w14189 /w16268)
|
||||
else()
|
||||
add_compile_options(-Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
|
||||
message(FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build")
|
||||
|
|
Loading…
Reference in New Issue