2015-02-13 19:00:14 +01:00
|
|
|
file(GLOB hdrs "*.h")
|
|
|
|
file(GLOB srcs "*.cpp")
|
|
|
|
|
2015-11-26 20:25:09 +01:00
|
|
|
add_library(tinyxml_objs OBJECT ${srcs} ${hdrs})
|
2020-04-22 11:04:19 +02:00
|
|
|
|
|
|
|
# TODO: need to be fixed upstream
|
2020-04-08 14:56:12 +02:00
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|
|
|
target_compile_options(tinyxml_objs PRIVATE -Wno-suggest-attribute=format)
|
|
|
|
endif()
|
2020-04-22 11:04:19 +02:00
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
|
|
|
target_compile_options(tinyxml_objs PRIVATE -Wno-extra-semi-stmt)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# TODO: conflicts with ANALYZE_* options
|
2020-05-27 05:15:46 +02:00
|
|
|
if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
2020-04-09 09:23:31 +02:00
|
|
|
add_library(tinyxml_objs_sanitized OBJECT EXCLUDE_FROM_ALL ${srcs} ${hdrs})
|
2020-03-31 09:33:58 +02:00
|
|
|
target_compile_options(tinyxml_objs_sanitized PRIVATE -fsanitize=address)
|
2020-04-22 11:04:19 +02:00
|
|
|
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
|
|
|
target_compile_options(tinyxml_objs_sanitized PRIVATE -Wno-extra-semi-stmt)
|
|
|
|
endif()
|
2020-04-08 14:56:12 +02:00
|
|
|
endif()
|