You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2022/05/27 21:31:42 UTC
[arrow] branch master updated: MINOR: [C++] Fix foreach usage in Usevcpkg.cmake (#13253)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new c7444224c5 MINOR: [C++] Fix foreach usage in Usevcpkg.cmake (#13253)
c7444224c5 is described below
commit c7444224c5f670423ddf3ec577915aa754b013ac
Author: Yibo Cai <yi...@apache.org>
AuthorDate: Sat May 28 05:31:36 2022 +0800
MINOR: [C++] Fix foreach usage in Usevcpkg.cmake (#13253)
`foreach(out IN LISTS list1 list2 "item")` will not iterate "item".
Should be `foreach(out IN LISTS list1 list2 IN ITEMS "item")`,
or simpler `foreach(out ${list1} ${list2} "item")`.
Authored-by: Yibo Cai <yi...@apache.org>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
cpp/cmake_modules/Usevcpkg.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/cmake_modules/Usevcpkg.cmake b/cpp/cmake_modules/Usevcpkg.cmake
index 6892f03477..ee2cfbc670 100644
--- a/cpp/cmake_modules/Usevcpkg.cmake
+++ b/cpp/cmake_modules/Usevcpkg.cmake
@@ -121,7 +121,7 @@ set(_INST_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/vcpkg_installed") # try here fi
set(_INST_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg_installed") # try here second
set(_INST_VCPKG_ROOT "${VCPKG_ROOT}/installed")
# Iterate over the places
-foreach(_INST_DIR IN LISTS _INST_BUILD_DIR _INST_SOURCE_DIR _INST_VCPKG_ROOT "notfound")
+foreach(_INST_DIR ${_INST_BUILD_DIR} ${_INST_SOURCE_DIR} ${_INST_VCPKG_ROOT} "notfound")
if(_INST_DIR STREQUAL "notfound")
message(FATAL_ERROR "vcpkg installed libraries directory not found. "
"Install packages with vcpkg before executing cmake.")