Skip to content

Commit 29b1657

Browse files
committed
[native] Pass Presto build options to Velox build options directly
Some Presto build options directly set Velox build option to enable certain features. Previously, configuration values that do not match Velox defaults might not set the Velox config appropriatly. For example, turning off parquet support would not actually disable it at the build level because the Velox config would be left to the default value which is ON.
1 parent b49b416 commit 29b1657

File tree

1 file changed

+24
-36
lines changed

1 file changed

+24
-36
lines changed

presto-native-execution/CMakeLists.txt

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -83,58 +83,46 @@ option(PRESTO_ENABLE_SPATIAL "Enable spatial support" ON)
8383
# and turn on int128.
8484
add_compile_definitions(FOLLY_HAVE_INT128_T=1 FOLLY_CFG_NO_COROUTINES)
8585

86-
if(PRESTO_ENABLE_S3)
87-
set(VELOX_ENABLE_S3
88-
ON
89-
CACHE BOOL "Build S3 support")
90-
endif()
86+
set(VELOX_ENABLE_S3
87+
${PRESTO_ENABLE_S3}
88+
CACHE BOOL "Build S3 support")
9189

92-
if(PRESTO_ENABLE_HDFS)
93-
set(VELOX_ENABLE_HDFS
94-
ON
95-
CACHE BOOL "Build HDFS support")
96-
endif()
90+
set(VELOX_ENABLE_HDFS
91+
${PRESTO_ENABLE_HDFS}
92+
CACHE BOOL "Build HDFS support")
9793

98-
if(PRESTO_ENABLE_GCS)
99-
set(VELOX_ENABLE_GCS
100-
ON
101-
CACHE BOOL "Build GCS support")
102-
endif()
94+
set(VELOX_ENABLE_GCS
95+
${PRESTO_ENABLE_GCS}
96+
CACHE BOOL "Build GCS support")
10397

104-
if(PRESTO_ENABLE_ABFS)
105-
set(VELOX_ENABLE_ABFS
106-
ON
107-
CACHE BOOL "Build ABFS support")
108-
endif()
98+
set(VELOX_ENABLE_ABFS
99+
${PRESTO_ENABLE_ABFS}
100+
CACHE BOOL "Build ABFS support")
109101

110-
if(PRESTO_ENABLE_PARQUET)
111-
set(VELOX_ENABLE_PARQUET
112-
ON
113-
CACHE BOOL "Enable Parquet support")
114-
endif()
102+
set(VELOX_ENABLE_PARQUET
103+
${PRESTO_ENABLE_PARQUET}
104+
CACHE BOOL "Enable Parquet support")
115105

106+
set(VELOX_ENABLE_REMOTE_FUNCTIONS
107+
${PRESTO_ENABLE_REMOTE_FUNCTIONS}
108+
CACHE BOOL "Enable remote function support in Velox")
116109
if(PRESTO_ENABLE_REMOTE_FUNCTIONS)
117-
set(VELOX_ENABLE_REMOTE_FUNCTIONS
118-
ON
119-
CACHE BOOL "Enable remote function support in Velox")
120110
add_compile_definitions(PRESTO_ENABLE_REMOTE_FUNCTIONS)
121111
endif()
122112

113+
set(VELOX_ENABLE_CUDF
114+
${PRESTO_ENABLE_CUDF}
115+
CACHE BOOL "Enable cuDF support")
123116
if(PRESTO_ENABLE_CUDF)
124-
set(VELOX_ENABLE_CUDF
125-
ON
126-
CACHE BOOL "Enable cuDF support")
127117
add_compile_definitions(PRESTO_ENABLE_CUDF)
128118
enable_language(CUDA)
129119
# Determine CUDA_ARCHITECTURES automatically.
130120
cmake_policy(SET CMP0104 NEW)
131121
endif()
132122

133-
if(PRESTO_ENABLE_SPATIAL)
134-
set(VELOX_ENABLE_GEO
135-
ON
136-
CACHE BOOL "Enable Velox Geometry (aka spatial) support")
137-
endif()
123+
set(VELOX_ENABLE_GEO
124+
${PRESTO_ENABLE_SPATIAL}
125+
CACHE BOOL "Enable Velox Geometry (aka spatial) support")
138126

139127
set(VELOX_BUILD_TESTING
140128
OFF

0 commit comments

Comments
 (0)