jt2594838 commented on code in PR #364: URL: https://github.com/apache/tsfile/pull/364#discussion_r1982886699
########## .github/workflows/unit-test-cpp.yml: ########## @@ -0,0 +1,117 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Unit-Test-Cpp + +on: + push: + branches: + - develop + - iotdb + - rc/* + paths-ignore: + - 'docs/**' + - 'java/**' + pull_request: + branches: + - develop + - iotdb + - rc/* Review Comment: Also add ”dev/*“ ########## cpp/test/CMakeLists.txt: ########## @@ -76,27 +99,35 @@ file(GLOB_RECURSE TEST_SRCS "reader/*_test.cc" "writer/*_test.cc" "cwrapper/*_test.cc" - ) +) + if (${COV_ENABLED}) message("Enable code cov...") add_compile_options(-fprofile-arcs -ftest-coverage) endif () -if(NOT WIN32) -#enable address sanitizer default - set(ENV{ASAN_OPTIONS} "detect_container_overflow=0") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g") -endif() +add_definitions(-DANTLR4CPP_STATIC) +set(ANTLR4_WITH_STATIC_CRT OFF) add_executable(TsFile_Test ${TEST_SRCS}) target_link_libraries( - TsFile_Test - GTest::gtest_main - GTest::gmock - tsfile + TsFile_Test + GTest::gtest_main + GTest::gmock + tsfile ) -set_target_properties(TsFile_Test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${LIBTSFILE_SDK_DIR}) +set_target_properties(TsFile_Test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${LIB_TSFILE_SDK_DIR}) + +if (WIN32) + add_custom_command(TARGET TsFile_Test POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + "${LIBRARY_OUTPUT_PATH}/libtsfile.dll" + "$<TARGET_FILE_DIR:TsFile_Test>" + COMMENT "Copying mylib.dll to test executable directory" Review Comment: mylib.dll -> libtsfile.dll -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
