diff --git a/.appveyor.yml b/.appveyor.yml index 0fdbde4..e6b034c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -80,6 +80,7 @@ environment: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - CMP: vs2019 BASE: 3.15 + CLEAN_DEPS: NO APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - CMP: vs2019 BASE: 3.14 diff --git a/.travis.yml b/.travis.yml index aa9d2c3..1cb6a50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,7 +98,7 @@ jobs: - env: SET=test01 BCFG=static-debug dist: bionic - - env: SET=test01 + - env: SET=test01 CLEAN_DEPS=NO dist: trusty - env: SET=test01 BCFG=static-debug diff --git a/README.md b/README.md index 9e76bcc..48a1db1 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,10 @@ location for the dependency builds. [default is `$HOME/.cache`] Set `PARALLEL_MAKE` to the number of parallel make jobs that you want your build to use. [default is the number of CPUs on the runner] +Set `CLEAN_DEPS` to `NO` if you want to leave the object file directories +(`**/O.*`) in the cached dependencies. [default is to run `make clean` +after building a dependency] + Service specific options are described in the README files in the service specific subdirectories: diff --git a/cue.py b/cue.py index 1ac9a0b..dce7854 100644 --- a/cue.py +++ b/cue.py @@ -79,8 +79,14 @@ def detect_context(): if 'PARALLEL_MAKE' in os.environ: ci['parallel_make'] = os.environ['PARALLEL_MAKE'] - logger.debug('Detected a build hosted on %s, using %s on %s (%s) configured as %s (test: %s)', - ci['service'], ci['compiler'], ci['os'], ci['platform'], ci['configuration'], ci['test']) + ci['clean_deps'] = True + if 'CLEAN_DEPS' in os.environ and os.environ['CLEAN_DEPS'].lower() == 'no': + ci['clean_deps'] = False + + logger.debug('Detected a build hosted on %s, using %s on %s (%s) configured as %s ' + + '(test: %s, clean_deps: %s)', + ci['service'], ci['compiler'], ci['os'], ci['platform'], ci['configuration'], + ci['test'], ci['clean_deps']) curdir = os.getcwd() @@ -854,6 +860,8 @@ USR_CXXFLAGS += {0}'''.format(os.environ['USR_CXXFLAGS']) place = places[setup[mod + "_VARNAME"]] print('{0}Building dependency {1} in {2}{3}'.format(ANSI_YELLOW, mod, place, ANSI_RESET)) call_make(cwd=place, silent=silent_dep_builds) + if ci['clean_deps']: + call_make(args=['clean'], cwd=place, silent=silent_dep_builds) fold_end('build.dependencies', 'Build missing/outdated dependencies') print('{0}Dependency module information{1}'.format(ANSI_CYAN, ANSI_RESET))