CMAKE_VS_PLATFORM_TOOLSET might be empty (#1009)
According to https://gitlab.kitware.com/cmake/cmake/-/issues/17976, CMAKE_VS_PLATFORM_TOOLSET is set only when using a Visual Studio generator. When we use Ninja as the generator, CMAKE_VS_PLATFORM_TOOLSET will be empty. As a result: if(${CMAKE_VS_PLATFORM_TOOLSET} STREQUAL "v140") will be treated as: if( STREQUAL "v140") We may also quote it like this: if("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v140") but that won't make the warnings disappeared in VS2015.
This commit is contained in:
parent
599e3bc937
commit
cc042c9936
|
@ -77,7 +77,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|||
|
||||
|
||||
if(MSVC)
|
||||
if(${CMAKE_VS_PLATFORM_TOOLSET} STREQUAL "v140")
|
||||
if("${MSVC_TOOLSET_VERSION}" STREQUAL "140")
|
||||
# Visual Studio 2015 issues warnings and we tolerate it, cmake -G"Visual Studio 14" ..
|
||||
target_compile_options(simdjson-internal-flags INTERFACE /W0 /sdl)
|
||||
else()
|
||||
|
|
Loading…
Reference in New Issue