From 625ba4fd3a2770219d49755a532a48e96b495bba Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Thu, 14 Nov 2024 10:03:27 -0800 Subject: [PATCH] Check platform --- cmake/AwsPrebuildDependency.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/AwsPrebuildDependency.cmake b/cmake/AwsPrebuildDependency.cmake index 592b74b38..101367e10 100644 --- a/cmake/AwsPrebuildDependency.cmake +++ b/cmake/AwsPrebuildDependency.cmake @@ -96,6 +96,12 @@ function(aws_get_variables_for_prebuild_dependency AWS_CMAKE_PREBUILD_ARGS) set(variables "") set(variablesToIgnore CMAKE_INSTALL_PREFIX) + # The CMake variables below were chosen for Unix-like platforms. If you want to use the prebuild logic on other + # platforms, the chances are you have to handle additional variables (like CMAKE_OSX_SYSROOT). + if (NOT UNIX OR APPLE) + message(FATAL_ERROR "aws_get_variables_for_prebuild_dependency is called for unsupported platform") + endif() + get_cmake_property(vars CACHE_VARIABLES) foreach(var ${vars}) message("= Checking ${var}")