summaryrefslogtreecommitdiffstats
path: root/deps/xdiff/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'deps/xdiff/CMakeLists.txt')
-rw-r--r--deps/xdiff/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/deps/xdiff/CMakeLists.txt b/deps/xdiff/CMakeLists.txt
new file mode 100644
index 0000000..743ac63
--- /dev/null
+++ b/deps/xdiff/CMakeLists.txt
@@ -0,0 +1,28 @@
+
+file(GLOB SRC_XDIFF "*.c" "*.h")
+list(SORT SRC_XDIFF)
+
+add_library(xdiff OBJECT ${SRC_XDIFF})
+target_include_directories(xdiff SYSTEM PRIVATE
+ "${PROJECT_SOURCE_DIR}/include"
+ "${PROJECT_SOURCE_DIR}/src/util"
+ "${PROJECT_BINARY_DIR}/src/util"
+ ${LIBGIT2_SYSTEM_INCLUDES}
+ ${LIBGIT2_DEPENDENCY_INCLUDES})
+
+# the xdiff dependency is not (yet) warning-free, disable warnings
+# as errors for the xdiff sources until we've sorted them out
+if(MSVC)
+ set_source_files_properties(xdiffi.c PROPERTIES COMPILE_FLAGS -WX-)
+ set_source_files_properties(xemit.c PROPERTIES COMPILE_FLAGS -WX-)
+ set_source_files_properties(xhistogram.c PROPERTIES COMPILE_FLAGS -WX-)
+ set_source_files_properties(xmerge.c PROPERTIES COMPILE_FLAGS -WX-)
+ set_source_files_properties(xutils.c PROPERTIES COMPILE_FLAGS -WX-)
+ set_source_files_properties(xpatience.c PROPERTIES COMPILE_FLAGS -WX-)
+else()
+ set_source_files_properties(xdiffi.c PROPERTIES COMPILE_FLAGS "-Wno-sign-compare -Wno-unused-parameter")
+ set_source_files_properties(xemit.c PROPERTIES COMPILE_FLAGS "-Wno-sign-compare -Wno-unused-parameter")
+ set_source_files_properties(xhistogram.c PROPERTIES COMPILE_FLAGS "-Wno-sign-compare")
+ set_source_files_properties(xutils.c PROPERTIES COMPILE_FLAGS "-Wno-sign-compare")
+ set_source_files_properties(xpatience.c PROPERTIES COMPILE_FLAGS "-Wno-sign-compare")
+endif()