@@ -29,6 +29,7 @@ class ConfigFile(Configurable):
2929 "_cmake_configure_file" ,
3030 "_config_file_template" ,
3131 "_default_subst" ,
32+ "_project_variables_file" ,
3233 )
3334
3435 def __init__ (
@@ -45,6 +46,13 @@ def __init__(
4546 """
4647 super ().__init__ (manager = manager )
4748 self ._config_file_template = config_file_template .resolve ()
49+
50+ config_file = self .template_file
51+ if config_file .suffix == ".in" :
52+ # remove the trailing .in
53+ config_file = config_file .with_suffix ("" )
54+
55+ self ._project_variables_file = self .project_arch_dir / config_file .name
4856 self ._default_subst = {"PYTHON_EXECUTABLE" : sys .executable }
4957
5058 @property
@@ -72,7 +80,7 @@ def project_variables_file(self) -> Path:
7280 The file is not guaranteed to exist, or be up to date. Usually it is
7381 created/refreshed during finalization of this object.
7482 """
75- return self .project_arch_dir / "gmakevariables"
83+ return self ._project_variables_file
7684
7785 def _read_entire_cmake_cache (self , cmake_cache : Path ) -> dict [str , str ]:
7886 r"""Read a CMakeCache.txt and convert all of the cache values to
@@ -164,7 +172,7 @@ def finalize(self) -> None:
164172 If the user config file contains an unknown AEDIFIX substitution.
165173 """
166174 project_file = self .project_variables_file
167- template_file = self ._config_file_template
175+ template_file = self .template_file
168176 self .log (f"Using project file: { project_file } " )
169177 self .log (f"Using template file: { template_file } " )
170178
0 commit comments