diff --git a/presto-native-execution/presto_cpp/main/CMakeLists.txt b/presto-native-execution/presto_cpp/main/CMakeLists.txt index 886cc810b039f..60a2e83d0305d 100644 --- a/presto-native-execution/presto_cpp/main/CMakeLists.txt +++ b/presto-native-execution/presto_cpp/main/CMakeLists.txt @@ -76,8 +76,10 @@ target_link_libraries( # dependencies first followed by FBThrift. target_link_libraries(presto_server_lib presto_thrift-cpp2 presto_thrift_extra ${THRIFT_LIBRARY}) - -set_property(TARGET presto_server_lib PROPERTY JOB_POOL_LINK link_job_pool) +message("Checking CMAKE_JOB_POOL_LINK: ${CMAKE_JOB_POOL_LINK}") +if("${CMAKE_JOB_POOL_LINK}") + set_property(TARGET presto_server_lib PROPERTY JOB_POOL_LINK link_job_pool) +endif() add_executable(presto_server PrestoMain.cpp) @@ -97,7 +99,10 @@ if(PRESTO_ENABLE_REMOTE_FUNCTIONS) target_link_libraries(presto_server_lib presto_server_remote_function) endif() -set_property(TARGET presto_server PROPERTY JOB_POOL_LINK link_job_pool) +message("Checking CMAKE_JOB_POOL_LINK: ${CMAKE_JOB_POOL_LINK}") +if("${CMAKE_JOB_POOL_LINK}") + set_property(TARGET presto_server PROPERTY JOB_POOL_LINK link_job_pool) +endif() if(PRESTO_ENABLE_TESTING) add_subdirectory(tests) diff --git a/presto-native-execution/presto_cpp/main/common/CMakeLists.txt b/presto-native-execution/presto_cpp/main/common/CMakeLists.txt index 7310efbfba24f..4ac4a72129160 100644 --- a/presto-native-execution/presto_cpp/main/common/CMakeLists.txt +++ b/presto-native-execution/presto_cpp/main/common/CMakeLists.txt @@ -14,7 +14,9 @@ add_library(presto_exception Exception.cpp) add_library(presto_common Counters.cpp Utils.cpp ConfigReader.cpp Configs.cpp) target_link_libraries(presto_exception velox_exception) -set_property(TARGET presto_exception PROPERTY JOB_POOL_LINK link_job_pool) +if("${CMAKE_JOB_POOL_LINK}") + set_property(TARGET presto_exception PROPERTY JOB_POOL_LINK link_job_pool) +endif() target_link_libraries(presto_common velox_config velox_core velox_exception) diff --git a/presto-native-execution/presto_cpp/main/http/CMakeLists.txt b/presto-native-execution/presto_cpp/main/http/CMakeLists.txt index e89d439f3bc53..a188c79064dcd 100644 --- a/presto-native-execution/presto_cpp/main/http/CMakeLists.txt +++ b/presto-native-execution/presto_cpp/main/http/CMakeLists.txt @@ -35,7 +35,9 @@ target_link_libraries( ${FMT} ${RE2}) -set_property(TARGET presto_http PROPERTY JOB_POOL_LINK link_job_pool) +if("${CMAKE_JOB_POOL_LINK}") + set_property(TARGET presto_http PROPERTY JOB_POOL_LINK link_job_pool) +endif() if(PRESTO_ENABLE_TESTING) add_subdirectory(tests) diff --git a/presto-native-execution/presto_cpp/main/tests/CMakeLists.txt b/presto-native-execution/presto_cpp/main/tests/CMakeLists.txt index 218ad7bdedc85..cf03eecee53ea 100644 --- a/presto-native-execution/presto_cpp/main/tests/CMakeLists.txt +++ b/presto-native-execution/presto_cpp/main/tests/CMakeLists.txt @@ -46,7 +46,9 @@ target_link_libraries( gtest gtest_main) -set_property(TARGET presto_server_test PROPERTY JOB_POOL_LINK link_job_pool) +if("${CMAKE_JOB_POOL_LINK}") + set_property(TARGET presto_server_test PROPERTY JOB_POOL_LINK link_job_pool) +endif() if(PRESTO_ENABLE_REMOTE_FUNCTIONS) add_executable(presto_server_remote_function_test diff --git a/presto-native-execution/presto_cpp/main/types/CMakeLists.txt b/presto-native-execution/presto_cpp/main/types/CMakeLists.txt index 6fe310df3ca3e..3275e52720ec3 100644 --- a/presto-native-execution/presto_cpp/main/types/CMakeLists.txt +++ b/presto-native-execution/presto_cpp/main/types/CMakeLists.txt @@ -24,7 +24,9 @@ add_dependencies(presto_types presto_operators presto_type_converter velox_type target_link_libraries(presto_types presto_type_converter velox_type_fbhive velox_hive_partition_function velox_tpch_gen) -set_property(TARGET presto_types PROPERTY JOB_POOL_LINK link_job_pool) +if("${CMAKE_JOB_POOL_LINK}") + set_property(TARGET presto_types PROPERTY JOB_POOL_LINK link_job_pool) +endif() if(PRESTO_ENABLE_TESTING) add_subdirectory(tests)