|
21 | 21 | from lib.amazon import get_ssm_param |
22 | 22 | from lib.amazon_properties import get_properties_compilers_and_libraries, get_specific_library_version_details |
23 | 23 | from lib.binary_info import BinaryInfo |
24 | | -from lib.compiler_utils import CompilerInfo, PlatformEnvironmentManager |
| 24 | +from lib.compiler_utils import CMakeCacheExtractor, CompilerInfo, PlatformEnvironmentManager |
25 | 25 | from lib.installation_context import FetchFailure, PostFailure |
26 | 26 | from lib.library_build_config import LibraryBuildConfig |
27 | 27 | from lib.library_build_history import LibraryBuildHistory |
@@ -119,6 +119,9 @@ def __init__( |
119 | 119 | # Initialize shared environment manager |
120 | 120 | self.env_manager = PlatformEnvironmentManager(self.platform) |
121 | 121 |
|
| 122 | + # Initialize CMake cache extractor for generator logic |
| 123 | + self.cmake_extractor = CMakeCacheExtractor(self.logger, self.platform) |
| 124 | + |
122 | 125 | self.history = LibraryBuildHistory(self.logger) |
123 | 126 |
|
124 | 127 | if self.language in _propsandlibs: |
@@ -603,12 +606,9 @@ def writebuildscript( |
603 | 606 | '"-DBOOST_IOSTREAMS_ENABLE_ZSTD=OFF" "-DBOOST_LOCALE_ENABLE_ICU=OFF" ' |
604 | 607 | ) |
605 | 608 |
|
606 | | - generator = "" |
607 | | - if self.platform == LibraryPlatform.Linux: |
608 | | - if make_utility == "ninja": |
609 | | - generator = "-GNinja" |
610 | | - elif self.platform == LibraryPlatform.Windows: |
611 | | - generator = "-GNinja" |
| 609 | + # Use shared generator logic from CMakeCacheExtractor |
| 610 | + generator_args = self.cmake_extractor.get_cmake_generator(make_utility) |
| 611 | + generator = " ".join(generator_args) |
612 | 612 |
|
613 | 613 | for line in self.buildconfig.prebuild_script: |
614 | 614 | expanded_line = self.expand_build_script_line( |
|
0 commit comments