Skip to content

Commit

Permalink
Check CMAKE_CROSSOMPILING
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Nov 14, 2024
1 parent b567baf commit f4771da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/AwsPrebuildDependency.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,12 @@ function(aws_get_variables_for_prebuild_dependency AWS_CMAKE_PREBUILD_ARGS)
message("= Checking ${var}")
if (var MATCHES "^(CMAKE_)?ANDROID_"
OR var STREQUAL "CMAKE_TOOLCHAIN_FILE"
OR var STREQUAL "CMAKE_SYSTEM_NAME"
OR var STREQUAL "CMAKE_SYSTEM_VERSION"
# CMAKE_CROSSCOMPILING will be set to true by CMake if the CMAKE_SYSTEM_NAME variable has been set
# manually. By checking CMAKE_CROSSCOMPILING, we handle a possible case when CMAKE_SYSTEM_NAME was set
# automatically to the host system.
# CMAKE_SYSTEM_VERSION is coupled with CMAKE_SYSTEM_NAME, so apply the same logic to it.
OR (var STREQUAL "CMAKE_SYSTEM_NAME" AND CMAKE_CROSSCOMPILING)
OR (var STREQUAL "CMAKE_SYSTEM_VERSION" AND CMAKE_CROSSCOMPILING)
OR var STREQUAL "CMAKE_C_COMPILER"
OR var STREQUAL "CMAKE_CXX_COMPILER"
OR var STREQUAL "CMAKE_C_FLAGS"
Expand Down

0 comments on commit f4771da

Please sign in to comment.