Added cxxflags to cmake version hash calculation.

This commit is contained in:
Patrick 2024-12-13 23:39:27 +01:00
parent b546931c09
commit 134fb106a8

View File

@ -40,10 +40,11 @@ def _generate_cmake_args(env: Environment, dependencies: 'list[dict]') -> 'list[
args.append(f'-D{name}={cmd_quote(value)}')
return args
def _calc_version_hash(dependencies: 'list[dict]') -> str:
def _calc_version_hash(env, dependencies: 'list[dict]') -> str:
return json.dumps({
'version': _VERSION,
'dependencies': dependencies
'dependencies': dependencies,
'cxxflags': env['DEPS_CXXFLAGS']
})
def _cmake_project(env: Environment, project_root: str, generate_args: 'list[str]' = [], build_args : 'list[str]' = [], install_args : 'list[str]' = [], dependencies: 'list[dict]' = []) -> dict:
@ -51,7 +52,7 @@ def _cmake_project(env: Environment, project_root: str, generate_args: 'list[str
build_dir = os.path.join(project_root, f'build_{config}')
install_dir = os.path.join(project_root, f'install_{config}')
version_hash = _calc_version_hash(dependencies)
version_hash = _calc_version_hash(env, dependencies)
stamp_file = pathlib.Path(install_dir, _BUILT_STAMPFILE)
is_built = stamp_file.exists()