mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 12:16:40 +08:00
FASTBuild: don't set default cache path
Leave only 2 option to set cache path: 1. CMake variable 2. Environment variable Update docs to reflect the changes.
This commit is contained in:

committed by
Eduard Voronkin

parent
563e11b6fd
commit
f77628e0af
@@ -27,6 +27,19 @@ This writes a FASTBuild configuration file named ``fbuild.bff`` into
|
||||
These IDE files can be generated by building ``xcode`` or ``solution`` targets
|
||||
and will build using FASTBuild as the backend.
|
||||
|
||||
Caching
|
||||
-------
|
||||
|
||||
To enable FASTBuild caching, set the cache path using the
|
||||
:variable:`CMAKE_FASTBUILD_CACHE_PATH` variable or the
|
||||
``FASTBUILD_CACHE_PATH`` environment variable.
|
||||
|
||||
Then build with the ``-cache`` flag:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
cmake --build <path-to-build> -- -cache
|
||||
|
||||
Configuration Variables
|
||||
-----------------------
|
||||
|
||||
|
@@ -1,9 +1,10 @@
|
||||
CMAKE_FASTBUILD_CACHE_PATH
|
||||
---------------------------
|
||||
--------------------------
|
||||
|
||||
Specifies the directory for the FASTBuild artifact cache.
|
||||
Specifies the directory for the FASTBuild artifact cache in the generated file.
|
||||
|
||||
Defaults to :variable:`CMAKE_BINARY_DIR` ``/fbuild.cache`` if not set.
|
||||
If not set, FASTBuild will use the ``FASTBUILD_CACHE_PATH`` environment
|
||||
variable at build time.
|
||||
|
||||
See the `FASTBuild caching documentation <https://www.fastbuild.org/docs/features/caching.html>`_
|
||||
for more information.
|
||||
|
@@ -538,12 +538,8 @@ void cmGlobalFastbuildGenerator::WriteSettings()
|
||||
auto val = this->GetSafeGlobalSetting(FASTBUILD_CACHE_PATH);
|
||||
if (!val.empty()) {
|
||||
cacheDir = std::move(val);
|
||||
} else {
|
||||
// Default value.
|
||||
cacheDir =
|
||||
this->GetCMakeInstance()->GetHomeOutputDirectory() + "/fbuild.cache";
|
||||
cmSystemTools::ConvertToOutputSlashes(cacheDir);
|
||||
}
|
||||
cmSystemTools::ConvertToOutputSlashes(cacheDir);
|
||||
|
||||
WriteDivider();
|
||||
*this->BuildFileStream << "// Settings\n\n";
|
||||
|
Reference in New Issue
Block a user