diff --git a/CMakeLists.txt b/CMakeLists.txt index a133cd66bc5da..88996aa252177 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,7 +172,7 @@ message("Setting CMAKE_CXX_FLAGS=${SCRIPT_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D USE_VELOX_COMMON_BASE") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D HAS_UNCAUGHT_EXCEPTIONS") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D HAS_UNCAUGHT_EXCEPTIONS -fPIC") # Under Ninja, we are able to designate certain targets large enough to require # restricted parallelism. diff --git a/velox/connectors/hive/CMakeLists.txt b/velox/connectors/hive/CMakeLists.txt index 3b91864bc38fa..ba029222f820a 100644 --- a/velox/connectors/hive/CMakeLists.txt +++ b/velox/connectors/hive/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -add_library(velox_hive_connector OBJECT HiveConnector.cpp FileHandle.cpp) +add_library(velox_hive_connector HiveConnector.cpp FileHandle.cpp) target_link_libraries(velox_hive_connector velox_connector velox_dwio_dwrf_reader velox_dwio_dwrf_writer velox_file) diff --git a/velox/functions/prestosql/CMakeLists.txt b/velox/functions/prestosql/CMakeLists.txt index a2270176adbfa..553e3a6ac764c 100644 --- a/velox/functions/prestosql/CMakeLists.txt +++ b/velox/functions/prestosql/CMakeLists.txt @@ -16,7 +16,7 @@ add_subdirectory(types) add_subdirectory(window) add_library( - velox_functions_prestosql_impl OBJECT + velox_functions_prestosql_impl ArrayConstructor.cpp ArrayContains.cpp ArrayDistinct.cpp diff --git a/velox/functions/prestosql/aggregates/CMakeLists.txt b/velox/functions/prestosql/aggregates/CMakeLists.txt index 9940c8efe11d8..c914eb7a3a800 100644 --- a/velox/functions/prestosql/aggregates/CMakeLists.txt +++ b/velox/functions/prestosql/aggregates/CMakeLists.txt @@ -13,7 +13,7 @@ # limitations under the License. add_library( - velox_aggregates OBJECT + velox_aggregates AggregateNames.h ApproxDistinctAggregate.cpp ApproxMostFrequentAggregate.cpp