This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 7f3b32eba3 GH-45142: [C++] Ensure using `cpp/cmake_modules/*.cmake` 
(#45143)
7f3b32eba3 is described below

commit 7f3b32eba3108dcbd49a5ed9c0c8829e2f96fb71
Author: Sutou Kouhei <[email protected]>
AuthorDate: Wed Jan 1 16:27:33 2025 +0900

    GH-45142: [C++] Ensure using `cpp/cmake_modules/*.cmake` (#45143)
    
    ### Rationale for this change
    
    If we use `list(APPEND)` not `list(PREPEND)` for `cpp/cmake_modules/`, 
`*.cmake` that doesn't exist in `cpp/cmake_modules/` may be used.
    
    See also: https://github.com/apache/iceberg-cpp/pull/6/files#r1900075993
    
    ### What changes are included in this PR?
    
    Use `list(PREPEND)`.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    * GitHub Issue: #45142
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 97cbb74d1f..103e0f0844 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -92,7 +92,7 @@ endif()
 string(TOLOWER ${CMAKE_BUILD_TYPE} LOWERCASE_BUILD_TYPE)
 string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_BUILD_TYPE)
 
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
+list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
 
 # this must be included before the project() command, because of the way
 # vcpkg (ab)uses CMAKE_TOOLCHAIN_FILE to inject its logic into CMake

Reply via email to