Skip to content

Commit 5f4e4d0

Browse files
jeanlegokmurray
authored andcommitted
EXTERNAL:libpugixml: disable compact mode when vtr sanitize flags are ON to prevent errors about unaligned structs
1 parent 80667ac commit 5f4e4d0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libs/EXTERNAL/libpugixml/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ set_target_properties(libpugixml PROPERTIES PREFIX "") #Avoid extra 'lib' prefix
1919
set(PUGIXML_SUPPRESS_FLAGS -w)
2020
target_compile_options(libpugixml PRIVATE ${PUGIXML_SUPPRESS_FLAGS})
2121

22-
#Enable compact mode which reduces memory usage.
23-
target_compile_definitions(libpugixml PRIVATE PUGIXML_COMPACT)
22+
#Do not use compact mode with sanitize flags on as pugi structs are not alligned and causes errors.
23+
if(NOT VTR_ENABLE_SANITIZE)
24+
#Enable compact mode which reduces memory usage.
25+
target_compile_definitions(libpugixml PRIVATE PUGIXML_COMPACT)
26+
endif()
2427

2528
install(TARGETS libpugixml DESTINATION bin)

0 commit comments

Comments
 (0)