build: use DEFINED to test the existence of the MSVC variable

This commit is contained in:
Gabriel Ferreira
2023-11-19 15:39:12 -03:00
parent dcad34924f
commit a7ca50cd44
2 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ function(setup_vcpkg)
)
endif()
if(${MSVC})
if(DEFINED MSVC)
message(FATAL_ERROR "vcpkg: Visual Studio is unsupported")
else()
# Check if required packages are installed (unzip curl tar)

View File

@@ -205,7 +205,7 @@ macro(process_options)
# Set warning level and warning as errors
if(${NS3_WARNINGS})
if(MSVC)
if(DEFINED MSVC)
add_compile_options(/W3) # /W4 = -Wall + -Wextra
if(${NS3_WARNINGS_AS_ERRORS})
add_compile_options(/WX)