diff --git a/BUILDING.md b/BUILDING.md index 7acd4ebec..de33836d6 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -191,4 +191,17 @@ To find system packages, we rely on `pkg-config`. There are several packages tha ### Disabling Conan Conan can be disabled completely using `-Daudacity_conan_enabled=Off` during the configuration. -This option implies `-Daudacity_obey_system_dependencies=On` and disables `local` for packages that are managed with Conan. \ No newline at end of file +This option implies `-Daudacity_obey_system_dependencies=On` and disables `local` for packages that are managed with Conan. + +### Disabling pre-built binaries downloads for Conan + +It is possible to force Conan to build all the dependencies from the source code without using the pre-built binaries. To do so, please pass `-Daudaicity_conan_allow_prebuilt_binaries=Off` to CMake during the configration. This option will trigger rebuild every +time CMake configuration changes. + +### Reducing Conan cache size + +In order to reduce the space used by Conan cache, please run: + +``` +$ conan remove "*" --src --builds --force +``` diff --git a/cmake-proxies/cmake-modules/AudacityDependencies.cmake b/cmake-proxies/cmake-modules/AudacityDependencies.cmake index 8d0cbb05c..a6560e76f 100644 --- a/cmake-proxies/cmake-modules/AudacityDependencies.cmake +++ b/cmake-proxies/cmake-modules/AudacityDependencies.cmake @@ -9,6 +9,12 @@ if( ${_OPT}conan_enabled ) ) endif() +if ( ${_OPT}conan_allow_prebuilt_binaries ) + set ( CONAN_BUILD_MODE BUILD missing ) +else() + set( CONAN_BUILD_MODE BUILD all ) +endif() + set( CONAN_BUILD_REQUIRES ) set( CONAN_REQUIRES ) set( CONAN_PACKAGE_OPTIONS ) @@ -253,7 +259,7 @@ function ( _conan_install build_type ) conan_cmake_install(PATH_OR_REFERENCE . - BUILD missing + ${CONAN_BUILD_MODE} SETTINGS ${settings} ) endfunction()