diff --git a/omnioperator/omniop-spark-extension/cpp/CMakeLists.txt b/omnioperator/omniop-spark-extension/cpp/CMakeLists.txt index f400007aad9540233b68d66c00fd5d2b560d8d92..03cdf8c441b1b797b4ebb92fc063f2144ba1cd8f 100644 --- a/omnioperator/omniop-spark-extension/cpp/CMakeLists.txt +++ b/omnioperator/omniop-spark-extension/cpp/CMakeLists.txt @@ -16,6 +16,7 @@ configure_file( "${PROJECT_SOURCE_DIR}/config.h" ) +aux_source_directory(${CMAKE_CURRENT_LIST_DIR} ROOT_SRCS) # for header searching include_directories(SYSTEM src) diff --git a/omnioperator/omniop-spark-extension/cpp/test/CMakeLists.txt b/omnioperator/omniop-spark-extension/cpp/test/CMakeLists.txt index 5795f9192b9274c71006e1739f359890afce5985..2f52efd6f7c6b8cd65f78e708d3d4ecf694f7935 100644 --- a/omnioperator/omniop-spark-extension/cpp/test/CMakeLists.txt +++ b/omnioperator/omniop-spark-extension/cpp/test/CMakeLists.txt @@ -1,3 +1,5 @@ +aux_source_directory(${CMAKE_CURRENT_LIST_DIR} TEST_ROOT_SRCS) + add_subdirectory(shuffle) add_subdirectory(utils) add_subdirectory(tablescan) @@ -5,23 +7,16 @@ add_subdirectory(tablescan) # configure set(TP_TEST_TARGET tptest) set(MY_LINK - utilstest shuffletest + utilstest tablescantest ) # find gtest package find_package(GTest REQUIRED) -set (UT_FILES - tptest.cpp - shuffle/shuffle_test.cpp - tablescan/scan_test.cpp - ) - # compile a executable file -add_executable(${TP_TEST_TARGET} ${UT_FILES}) -add_dependencies(${TP_TEST_TARGET} ${MY_LINK}) +add_executable(${TP_TEST_TARGET} ${ROOT_SRCS} ${TEST_ROOT_SRCS}) # dependent libraries target_link_libraries(${TP_TEST_TARGET} diff --git a/omnioperator/omniop-spark-extension/cpp/test/shuffle/CMakeLists.txt b/omnioperator/omniop-spark-extension/cpp/test/shuffle/CMakeLists.txt index ff8bf512a412063f3adb32e6bf02f3fd672ea797..7155af40b948dcb1fc3c7329dfe2fb8a610c63d6 100644 --- a/omnioperator/omniop-spark-extension/cpp/test/shuffle/CMakeLists.txt +++ b/omnioperator/omniop-spark-extension/cpp/test/shuffle/CMakeLists.txt @@ -2,6 +2,7 @@ aux_source_directory(${CMAKE_CURRENT_LIST_DIR} SHUFFLE_TESTS_LIST) set(SHUFFLE_TEST_TARGET shuffletest) add_library(${SHUFFLE_TEST_TARGET} STATIC ${SHUFFLE_TESTS_LIST}) target_compile_options(${SHUFFLE_TEST_TARGET} PUBLIC ) +target_link_libraries(${SHUFFLE_TEST_TARGET} utilstest) target_include_directories(${SHUFFLE_TEST_TARGET} PUBLIC ${CMAKE_BINARY_DIR}/src) target_include_directories(${SHUFFLE_TEST_TARGET} PUBLIC /opt/lib/include) target_include_directories(${SHUFFLE_TEST_TARGET} PUBLIC $ENV{JAVA_HOME}/include)