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

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


The following commit(s) were added to refs/heads/main by this push:
     new 2609934f9 ORC-1733: [C++][CMake] Fix CMAKE_MODULE_PATH not to use 
PROJECT_SOURCE_DIR
2609934f9 is described below

commit 2609934f9f45dedf38260670fea0f6454b10aec8
Author: Gang Wu <[email protected]>
AuthorDate: Tue Jun 25 23:49:23 2024 +0800

    ORC-1733: [C++][CMake] Fix CMAKE_MODULE_PATH not to use PROJECT_SOURCE_DIR
    
    ### What changes were proposed in this pull request?
    Change `PROJECT_SOURCE_DIR` to `CMAKE_CURRENT_SOURCE_DIR` for 
`CMAKE_MODULE_PATH`.
    
    ### Why are the changes needed?
    Line below is not portable when ORC is used by downstream projects:
    ```
    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
"${PROJECT_SOURCE_DIR}/cmake_modules")
    ```
    
    ### How was this patch tested?
    Make sure all CIs pass.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    Closes #1959 from wgtmac/ORC-1733.
    
    Authored-by: Gang Wu <[email protected]>
    Signed-off-by: Gang Wu <[email protected]>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 213f55721..29cb1af79 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "2")
 SET(CPACK_PACKAGE_VERSION_MINOR "1")
 SET(CPACK_PACKAGE_VERSION_PATCH "0-SNAPSHOT")
 SET(ORC_VERSION 
"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
"${PROJECT_SOURCE_DIR}/cmake_modules")
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # For clang-tidy.
 
 option (BUILD_JAVA

Reply via email to