From 058fdaa2d0874f852bb1b525f6c2f1a0c9df8751 Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Fri, 8 Nov 2024 15:28:29 -0800 Subject: [PATCH] Pass CMAKE_GENERATOR --- cmake/AwsPrebuildDependency.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/AwsPrebuildDependency.cmake b/cmake/AwsPrebuildDependency.cmake index 957402407..270d48902 100644 --- a/cmake/AwsPrebuildDependency.cmake +++ b/cmake/AwsPrebuildDependency.cmake @@ -48,6 +48,11 @@ function(aws_prebuild_dependency) if (CMAKE_TOOLCHAIN_FILE) list(APPEND cmakeCommand -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}) endif() + + # In case a custom generator was provided via -G option. If we don't propagate it, the default value might + # conflict with other cmake options (e.g. CMAKE_MAKE_PROGRAM). + list(APPEND cmakeCommand -G${CMAKE_GENERATOR}) + # Append provided arguments to CMake command. if(AWS_PREBUILD_CMAKE_ARGUMENTS) list(APPEND cmakeCommand ${AWS_PREBUILD_CMAKE_ARGUMENTS})