mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-12 13:07:49 +00:00
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:
committed by
poiana
parent
3fff994b19
commit
db52442b3f
@@ -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
Reference in New Issue
Block a user