mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-06 09:42:54 +03:00
Fix MSVC compilation
Using the Ninja generator with the MSVC compiler leads to errors due to incorrect compiler call options. In CMake, the generator and the compiler are different entities. This fix replaces the incorrect CMake variable with the correct one that describes the current MSVC-compatible compiler.
This commit is contained in:
1 parent
fb77750ad3
commit
e9c1b0b5ea
1 file changed
+1
-1
+1
-1
@@ -68,7 +68,7 @@ add_compile_options(
|
||||
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Werror>)
|
||||
endif()
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
if(MSVC)
|
||||
option(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS "Export all symbols when compiling to a .dll" ON)
|
||||
# add_compile_options(/Wall /wd4100 /wd4820 /wd4668 /wd4061)
|
||||
if(${WARNING_TO_ERROR})
|
||||
|
||||
Reference in new issue
Block a user