fix(userspace/falco): fixed windows build by enforcing NOMINMAX compile definition.

Also, minified config schema, since the big schema string leads to an MSVC compiler error.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro
2024-08-22 09:07:14 +02:00
committed by poiana
parent 3fff994b19
commit db52442b3f
2 changed files with 12 additions and 577 deletions

View File

@@ -88,15 +88,17 @@ else() # MSVC
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# The WIN32_LEAN_AND_MEAN define avoids possible macro pollution # The WIN32_LEAN_AND_MEAN define avoids possible macro pollution
# when a libsinsp consumer includes the windows.h header. # when a libsinsp consumer includes the windows.h header:
# See: https://stackoverflow.com/a/28380820 # https://stackoverflow.com/a/28380820
# Same goes for NOMINMAX:
# https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included
add_compile_definitions( add_compile_definitions(
_HAS_STD_BYTE=0 _HAS_STD_BYTE=0
_CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS
WIN32 WIN32
MINIMAL_BUILD MINIMAL_BUILD
WIN32_LEAN_AND_MEAN WIN32_LEAN_AND_MEAN
NOMINMAX
) )
set(FALCOSECURITY_LIBS_COMMON_FLAGS "/EHsc /W3 /Zi /std:c++17") set(FALCOSECURITY_LIBS_COMMON_FLAGS "/EHsc /W3 /Zi /std:c++17")

File diff suppressed because one or more lines are too long