the default. Using this option has the same effect as setting the
environment variable `CCACHE_CONFIGPATH` temporarily.
-*-d*, *--directory* _PATH_::
+*-d*, *--dir* _PATH_::
Let the command line options operate on cache directory _PATH_ instead of
the default. For example, to show statistics for a cache directory at
- `/shared/ccache` you can run `ccache -d /shared/ccache -s`. Using this
- option has the same effect as setting the environment variable `CCACHE_DIR`
+ `/shared/ccache` you can run `ccache -d /shared/ccache -s`. Using this option
+ has the same effect as setting the environment variable `CCACHE_DIR`
temporarily.
*--evict-older-than* _AGE_::
See also _<<Location of the primary configuration file>>_.
+
If you want to use another `CCACHE_DIR` value temporarily for one ccache
-invocation you can use the `-d`/`--directory` command line option instead.
+invocation you can use the `-d`/`--dir` command line option instead.
[#config_compiler]
*compiler* (*CCACHE_COMPILER* or (deprecated) *CCACHE_CC*)::
-C, --clear clear the cache completely (except configuration)
--config-path PATH operate on configuration file PATH instead of the
default
- -d, --directory PATH operate on cache directory PATH instead of the
+ -d, --dir PATH operate on cache directory PATH instead of the
default
--evict-older-than AGE remove files older than AGE (unsigned integer
with a d (days) or s (seconds) suffix)
{"cleanup", no_argument, nullptr, 'c'},
{"clear", no_argument, nullptr, 'C'},
{"config-path", required_argument, nullptr, CONFIG_PATH},
- {"directory", required_argument, nullptr, 'd'},
+ {"dir", required_argument, nullptr, 'd'},
+ {"directory", required_argument, nullptr, 'd'}, // backward compatibility
{"dump-manifest", required_argument, nullptr, DUMP_MANIFEST},
{"dump-result", required_argument, nullptr, DUMP_RESULT},
{"evict-older-than", required_argument, nullptr, EVICT_OLDER_THAN},
const std::string arg = optarg ? optarg : std::string();
switch (c) {
- case 'd': // --directory
+ case 'd': // --dir
Util::setenv("CCACHE_DIR", arg);
break;
switch (c) {
case CONFIG_PATH:
- case 'd': // --directory
+ case 'd': // --dir
case TRIM_MAX_SIZE:
case TRIM_METHOD:
// Already handled in the first pass.