diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2021-07-06 21:19:57 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2021-07-07 09:13:05 +0200 |
commit | ca9ec9cfa8af99eb1e5c39c9dffdc1c611ed235c (patch) | |
tree | 11850d3daf3cc4c3a4b214a9c80567df961b6b8d /cmake | |
parent | 5d318eb1ef56b361bdfad2ee1f5af722391ef48a (diff) | |
download | ccache-ca9ec9cfa8af99eb1e5c39c9dffdc1c611ed235c.tar.gz |
Remove system.hpp, including what’s needed instead
This is the next step after a57f70eda32e99221de56f5499079b4f00dc2bc5.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/GenerateConfigurationFile.cmake | 4 | ||||
-rw-r--r-- | cmake/config.h.in | 32 |
2 files changed, 34 insertions, 2 deletions
diff --git a/cmake/GenerateConfigurationFile.cmake b/cmake/GenerateConfigurationFile.cmake index 244a5c58..30d50c10 100644 --- a/cmake/GenerateConfigurationFile.cmake +++ b/cmake/GenerateConfigurationFile.cmake @@ -98,5 +98,9 @@ endif() # alias set(MTR_ENABLED "${ENABLE_TRACING}") +if(HAVE_SYS_MMAN_H AND HAVE_PTHREAD_MUTEXATTR_SETPSHARED) + set(INODE_CACHE_SUPPORTED 1) +endif() + configure_file(${CMAKE_SOURCE_DIR}/cmake/config.h.in ${CMAKE_BINARY_DIR}/config.h @ONLY) diff --git a/cmake/config.h.in b/cmake/config.h.in index ed2e19d4..957118f3 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -64,8 +64,6 @@ #cmakedefine _WIN32_WINNT @_WIN32_WINNT@ // clang-format on -#define SYSCONFDIR "@CMAKE_INSTALL_FULL_SYSCONFDIR@" - #ifdef __clang__ # pragma clang diagnostic pop #endif @@ -184,11 +182,41 @@ #endif #ifdef _WIN32 +# define NOMINMAX 1 +# define STDIN_FILENO 0 +# define STDOUT_FILENO 1 +# define STDERR_FILENO 2 + # ifdef _MSC_VER +# define PATH_MAX MAX_PATH typedef unsigned __int32 mode_t; typedef int pid_t; + +# ifndef __MINGW32__ +typedef __int64 ssize_t; +# endif # endif #endif // _WIN32 +// GCC version of a couple of standard C++ attributes. +#ifdef __GNUC__ +# define nodiscard gnu::warn_unused_result +# define maybe_unused gnu::unused +#endif + +// O_BINARY is needed when reading binary data on Windows, so use it everywhere +// with a compatibility define for Unix platforms. +#if !defined(_WIN32) && !defined(O_BINARY) +# define O_BINARY 0 +#endif + +#ifndef ESTALE +# define ESTALE -1 +#endif + +#define SYSCONFDIR "@CMAKE_INSTALL_FULL_SYSCONFDIR@" + +#cmakedefine INODE_CACHE_SUPPORTED + // Buffer size for I/O operations. Should be a multiple of 4 KiB. #define CCACHE_READ_BUFFER_SIZE 65536 |