Skip to content

Commit

Permalink
ORC-1733: [C++][CMake] Fix CMAKE_MODULE_PATH not to use PROJECT_SOURC…
Browse files Browse the repository at this point in the history
…E_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]>
  • Loading branch information
wgtmac committed Jun 25, 2024
1 parent 8003801 commit 2609934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2609934

Please sign in to comment.