Skip to content

Commit 458eb32

Browse files
kouJens-G
authored andcommitted
THRIFT-5887: ensure using our CMake modules
Client: cpp If we append our CMake module path to `CMAKE_MODULE_PATH` and Apache Thrift is built with FetchContent, our CMake modules in `build/cmake/` may not be used. Because other paths in `CMAKE_MODULE_PATH` may be used. For example, both of Apache Arrow and Apache Thrift has `DefineOptions.cmake`. If Apache Arrow builds Apache Thrift with FetchContent, Apache Arrow's `DefineOptions.cmake` is used unexpectedly.
1 parent 42d0b71 commit 458eb32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ project("thrift" VERSION ${PACKAGE_VERSION})
3535
message(STATUS "Configuring ${CMAKE_PROJECT_NAME} ${thrift_VERSION}")
3636

3737

38-
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
38+
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
3939

4040
# Some default settings
4141
include(DefineCMakeDefaults)

0 commit comments

Comments
 (0)