File: CMakeLists.txt

package info (click to toggle)
cppcheck 2.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,132 kB
  • sloc: cpp: 268,935; python: 20,890; ansic: 8,090; sh: 1,045; makefile: 1,008; xml: 1,005; cs: 291
file content (24 lines) | stat: -rw-r--r-- 988 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
22
23
24
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)
    target_compile_options(tinyxml2_objs PRIVATE -Wno-useless-cast)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    target_compile_options_safe(tinyxml2_objs -Wno-implicit-fallthrough)
    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)
    target_compile_options_safe(tinyxml2_objs -Wno-inconsistent-missing-destructor-override)
endif()
if(CYGWIN)
    target_compile_definitions(-D_LARGEFILE_SOURCE)  # required for fseeko() and ftello()
endif()