Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion velox/vector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ target_link_libraries(velox_vector velox_encode velox_memory velox_time

add_subdirectory(arrow)
add_subdirectory(fuzzer)
add_subdirectory(tests)

if(${VELOX_BUILD_TESTING} OR ${VELOX_ENABLE_BENCHMARKS_BASIC})
add_subdirectory(tests)
add_subdirectory(benchmarks)
endif()
144 changes: 75 additions & 69 deletions velox/vector/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,81 +11,87 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
add_library(velox_vector_test_lib VectorMaker.cpp VectorTestBase.cpp)
if(${VELOX_BUILD_TEST_UTILS}
OR ${VELOX_BUILD_TESTING}
OR ${VELOX_ENABLE_BENCHMARKS_BASIC})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its better to have this logic in the parent CMakeLists rather than have this if logic here as it makes it much harder to reason about what gets built etc.

if (${VELOX_ENABLE_BENCHMARKS_BASIC})
set($VEOX_BUILD_TEST_UTILS ON)
..
endif()

add_library(velox_vector_test_lib VectorMaker.cpp VectorTestBase.cpp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These libraries are required even with VELOX_BUILD_TESTING ; I suspect This is why xsimd doesnt get picked up as its header only.

target_link_libraries(velox_vector_test_lib velox_vector)
endif()

target_link_libraries(velox_vector_test_lib velox_vector)
if(${VELOX_BUILD_TESTING})
add_executable(
velox_vector_test
VectorCompareTest.cpp
VectorMakerTest.cpp
VectorPoolTest.cpp
VectorTest.cpp
VectorToStringTest.cpp
VectorEstimateFlatSizeTest.cpp
VectorPrepareForReuseTest.cpp
DecodedVectorTest.cpp
SelectivityVectorTest.cpp
EnsureWritableVectorTest.cpp
IsWritableVectorTest.cpp
LazyVectorTest.cpp
MayHaveNullsRecursiveTest.cpp)

add_executable(
velox_vector_test
VectorCompareTest.cpp
VectorMakerTest.cpp
VectorPoolTest.cpp
VectorTest.cpp
VectorToStringTest.cpp
VectorEstimateFlatSizeTest.cpp
VectorPrepareForReuseTest.cpp
DecodedVectorTest.cpp
SelectivityVectorTest.cpp
EnsureWritableVectorTest.cpp
IsWritableVectorTest.cpp
LazyVectorTest.cpp
MayHaveNullsRecursiveTest.cpp)
add_test(velox_vector_test velox_vector_test)

add_test(velox_vector_test velox_vector_test)
target_link_libraries(
velox_vector_test
velox_vector_test_lib
velox_buffer
velox_vector
velox_serialization
velox_memory
velox_presto_serializer
${Boost_ATOMIC_LIBRARIES}
${Boost_CONTEXT_LIBRARIES}
${Boost_DATE_TIME_LIBRARIES}
${Boost_FILESYSTEM_LIBRARIES}
${Boost_PROGRAM_OPTIONS_LIBRARIES}
${Boost_REGEX_LIBRARIES}
${Boost_THREAD_LIBRARIES}
${Boost_SYSTEM_LIBRARIES}
gtest
gtest_main
${FOLLY_WITH_DEPENDENCIES}
${DOUBLE_CONVERSION}
${gflags_LIBRARIES}
glog::glog
${FMT}
dl)

target_link_libraries(
velox_vector_test
velox_vector_test_lib
velox_buffer
velox_vector
velox_serialization
velox_memory
velox_presto_serializer
${Boost_ATOMIC_LIBRARIES}
${Boost_CONTEXT_LIBRARIES}
${Boost_DATE_TIME_LIBRARIES}
${Boost_FILESYSTEM_LIBRARIES}
${Boost_PROGRAM_OPTIONS_LIBRARIES}
${Boost_REGEX_LIBRARIES}
${Boost_THREAD_LIBRARIES}
${Boost_SYSTEM_LIBRARIES}
gtest
gtest_main
${FOLLY_WITH_DEPENDENCIES}
${DOUBLE_CONVERSION}
${gflags_LIBRARIES}
glog::glog
${FMT}
dl)
add_executable(simple_vector_test SimpleVectorTest.cpp
ToStringUtilityTest.cpp)

add_executable(simple_vector_test SimpleVectorTest.cpp ToStringUtilityTest.cpp)
add_test(simple_vector_test simple_vector_test)

add_test(simple_vector_test simple_vector_test)
target_link_libraries(
simple_vector_test
velox_vector
velox_buffer
velox_type
velox_vector_test_lib
gtest
gtest_main
${FOLLY_WITH_DEPENDENCIES}
${gflags_LIBRARIES}
glog::glog
${FMT})

target_link_libraries(
simple_vector_test
velox_vector
velox_buffer
velox_type
velox_vector_test_lib
gtest
gtest_main
${FOLLY_WITH_DEPENDENCIES}
${gflags_LIBRARIES}
glog::glog
${FMT})
add_executable(bias_vector_test BiasVectorTest.cpp)

add_executable(bias_vector_test BiasVectorTest.cpp)
add_test(bias_vector_test bias_vector_test)

add_test(bias_vector_test bias_vector_test)

target_link_libraries(
bias_vector_test
velox_vector
Boost::filesystem
gtest
gtest_main
${FOLLY_WITH_DEPENDENCIES}
${gflags_LIBRARIES}
glog::glog
${FMT})
target_link_libraries(
bias_vector_test
velox_vector
Boost::filesystem
gtest
gtest_main
${FOLLY_WITH_DEPENDENCIES}
${gflags_LIBRARIES}
glog::glog
${FMT})
endif()