summaryrefslogtreecommitdiff
path: root/lib/common/BoxPlatform.h
diff options
context:
space:
mode:
authorChris Wilson <qris@users.noreply.github.com>2016-10-01 20:44:48 +0100
committerGitHub <noreply@github.com>2016-10-01 20:44:48 +0100
commit80adfe939a663af4e279652f5404429f5594826c (patch)
treef316cd8fe3b837531055f702e79f84b49d8dc654 /lib/common/BoxPlatform.h
parent8718a10d3b457e80a922d0f2ee6b02e686fb452d (diff)
parent65a8cf6577d36ad419f7313800a6fbaf93aaa097 (diff)
Merge rewritten build system.
Add a new CMake build system, based on the one used to build for AppVeyor (Windows) and made to work with Linux and fully tested by Travis CI. Rewrite the old autoconf-based Makefile generator build system to solve performance and correctness problems caused by highly parallelised recursive Make, which was causing Travis builds to fail. Now uses a single monolithic generated Makefile instead of recursive Make. Should also be faster, both for initial builds (with parallelism) and for rebuilds. Remove the old outdated Visual Studio project files, since it should now be possible to generate these with CMake. Add a CMake project that builds Box Backup and its dependencies, particularly useful for getting started as a developer on Windows.
Diffstat (limited to 'lib/common/BoxPlatform.h')
-rw-r--r--lib/common/BoxPlatform.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h
index 35ad7a2c..f7c74bfc 100644
--- a/lib/common/BoxPlatform.h
+++ b/lib/common/BoxPlatform.h
@@ -21,11 +21,13 @@
#define PLATFORM_DEV_NULL "/dev/null"
-#ifdef _MSC_VER
-#include "BoxConfig-MSVC.h"
-#define NEED_BOX_VERSION_H
+#if defined BOX_CMAKE
+# include "BoxConfig.cmake.h"
+#elif defined _MSC_VER
+# include "BoxConfig-MSVC.h"
+# define NEED_BOX_VERSION_H
#else
-#include "BoxConfig.h"
+# include "BoxConfig.h"
#endif
#ifdef WIN32
@@ -96,16 +98,19 @@
#endif
// Handle differing xattr APIs
-#ifdef HAVE_SYS_XATTR_H
- #if !defined(HAVE_LLISTXATTR) && defined(HAVE_LISTXATTR) && HAVE_DECL_XATTR_NOFOLLOW
- #define llistxattr(a,b,c) listxattr(a,b,c,XATTR_NOFOLLOW)
- #endif
- #if !defined(HAVE_LGETXATTR) && defined(HAVE_GETXATTR) && HAVE_DECL_XATTR_NOFOLLOW
- #define lgetxattr(a,b,c,d) getxattr(a,b,c,d,0,XATTR_NOFOLLOW)
- #endif
- #if !defined(HAVE_LSETXATTR) && defined(HAVE_SETXATTR) && HAVE_DECL_XATTR_NOFOLLOW
- #define lsetxattr(a,b,c,d,e) setxattr(a,b,c,d,0,(e)|XATTR_NOFOLLOW)
- #endif
+#if !defined(HAVE_LLISTXATTR) && defined(HAVE_LISTXATTR) && HAVE_DECL_XATTR_NOFOLLOW
+ #define llistxattr(a,b,c) listxattr(a,b,c,XATTR_NOFOLLOW)
+ #define HAVE_LLISTXATTR
+#endif
+
+#if !defined(HAVE_LGETXATTR) && defined(HAVE_GETXATTR) && HAVE_DECL_XATTR_NOFOLLOW
+ #define lgetxattr(a,b,c,d) getxattr(a,b,c,d,0,XATTR_NOFOLLOW)
+ #define HAVE_LGETXATTR
+#endif
+
+#if !defined(HAVE_LSETXATTR) && defined(HAVE_SETXATTR) && HAVE_DECL_XATTR_NOFOLLOW
+ #define lsetxattr(a,b,c,d,e) setxattr(a,b,c,d,0,(e)|XATTR_NOFOLLOW)
+ #define HAVE_LSETXATTR
#endif
#if !HAVE_DECL_INFTIM