forked from cppcheck-opensource/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
24 lines (20 loc) · 977 Bytes
/
CMakeLists.txt
File metadata and controls
24 lines (20 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
add_library(tinyxml2 ${srcs} ${hdrs})
target_dll_compile_definitions(tinyxml2 EXPORT TINYXML2_EXPORT IMPORT TINYXML2_IMPORT)
# TODO: needs to be fixed upstream
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(tinyxml2 PRIVATE -Wno-suggest-attribute=format)
target_compile_options(tinyxml2 PRIVATE -Wno-useless-cast)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options_safe(tinyxml2 -Wno-implicit-fallthrough)
target_compile_options_safe(tinyxml2 -Wno-suggest-destructor-override)
target_compile_options_safe(tinyxml2 -Wno-zero-as-null-pointer-constant)
target_compile_options_safe(tinyxml2 -Wno-format-nonliteral)
target_compile_options_safe(tinyxml2 -Wno-inconsistent-missing-destructor-override)
endif()
if(CYGWIN)
target_compile_definitions(-D_LARGEFILE_SOURCE) # required for fseeko() and ftello()
endif()
target_include_directories(tinyxml2 PUBLIC .)