From 7310e922cd38e58a3d1474567d01e9fb4ebdbd6a Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Fri, 11 Oct 2024 14:43:31 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Michael Graeb --- cmake/AwsPrebuildDependency.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake/AwsPrebuildDependency.cmake b/cmake/AwsPrebuildDependency.cmake index 2ad885811..598ea2aa4 100644 --- a/cmake/AwsPrebuildDependency.cmake +++ b/cmake/AwsPrebuildDependency.cmake @@ -25,14 +25,13 @@ function(aws_prebuild_dependency) set(depInstallDir ${depBinaryDir}/install) file(MAKE_DIRECTORY ${depBinaryDir}) - # Conver the prefix path from list to escaped string to be passed as value used by - # `-DCMAKE_PREFIX_PATH` for the subprecoess - string(REPLACE ";" "\\\\;" ESCAPDED_PREFIX_PATH "${CMAKE_PREFIX_PATH}") + # Convert prefix path from list to escaped string, to be passed on command line + string(REPLACE ";" "\\\\;" ESCAPED_PREFIX_PATH "${CMAKE_PREFIX_PATH}") # For execute_process to accept a dynamically constructed command, it should be passed in a list format. set(cmakeCommand "${CMAKE_COMMAND}") list(APPEND cmakeCommand -S ${AWS_PREBUILD_SOURCE_DIR}) list(APPEND cmakeCommand -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) - list(APPEND cmakeCommand -DCMAKE_PREFIX_PATH=${ESCAPDED_PREFIX_PATH}) + list(APPEND cmakeCommand -DCMAKE_PREFIX_PATH=${ESCAPED_PREFIX_PATH}) list(APPEND cmakeCommand -DCMAKE_INSTALL_PREFIX=${depInstallDir}) list(APPEND cmakeCommand -DCMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH}) list(APPEND cmakeCommand -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS})