File: CMakeLists.txt

package info (click to toggle)
cppcheck 2.10-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,128 kB
  • sloc: cpp: 227,006; python: 12,193; ansic: 7,078; xml: 958; sh: 865; makefile: 709; cs: 291
file content (21 lines) | stat: -rw-r--r-- 855 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")

add_library(tinyxml2_objs OBJECT ${srcs} ${hdrs})
if (BUILD_CORE_DLL)
    target_compile_definitions(tinyxml2_objs PRIVATE TINYXML2_EXPORT)
endif()

# TODO: needs to be fixed upstream
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    target_compile_options(tinyxml2_objs PRIVATE -Wno-suggest-attribute=format)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    target_compile_options_safe(tinyxml2_objs -Wno-extra-semi-stmt)
    target_compile_options_safe(tinyxml2_objs -Wno-implicit-fallthrough)
    target_compile_options_safe(tinyxml2_objs -Wno-suggest-override)
    target_compile_options_safe(tinyxml2_objs -Wno-suggest-destructor-override)
    target_compile_options_safe(tinyxml2_objs -Wno-zero-as-null-pointer-constant)
    target_compile_options_safe(tinyxml2_objs -Wno-format-nonliteral)
endif()