Skip to content

Commit

Permalink
Add gtest in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 committed Apr 7, 2021
1 parent b695c07 commit 493efab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,17 @@ if(ENABLE_CUDF)
target_link_libraries("${CURA_LIBRARY_NAME}" PUBLIC "${CUDA_LIBRARY}" "${CUDA_RT_LIBRARY}" "${CUDF_LIBRARIES}" "${RMM_LIBRARY}")
endif(ENABLE_CUDF)

if(BUILD_TESTS)
include(CTest)
include(ConfigureGoogleTest)

if(GTEST_FOUND)
message(STATUS "Google C++ Testing Framework (Google Test) found in ${GTEST_ROOT}")
include_directories(${GTEST_INCLUDE_DIR})
add_subdirectory(${CMAKE_SOURCE_DIR}/tests)
else()
message(AUTHOR_WARNING "Google C++ Testing Framework (Google Test) not found: automated tests are disabled")
endif(GTEST_FOUND)
endif(BUILD_TESTS)

message(STATUS "CURA_TEST_LIST set to: ${CURA_TEST_LIST}")
2 changes: 2 additions & 0 deletions tests/relational/parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ void testParser(std::shared_ptr<const Rel> rel) {
std::cout << "======= Original Plan =======" << std::endl;
explainRel(rel, true);
auto json = toJson(rel);
std::cout << "======= Intermediate Json =======" << std::endl;
std::cout << json << std::endl;
std::cout << "======= Re-parsed Plan =======" << std::endl;
auto parsed = parseJson(json);
explainRel(parsed, true);
Expand Down

0 comments on commit 493efab

Please sign in to comment.