Skip to content

Commit

Permalink
Fix unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
melroy89 committed Dec 17, 2023
1 parent 570e4b6 commit ca8885b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ else()

# Set C++20
target_compile_features(${PROJECT_TARGET_LIB} PUBLIC cxx_std_20)
set_target_properties(${PROJECT_TARGET_LIB} PROPERTIES CXX_EXTENSIONS OFF)
# Set C99
target_compile_features(${PROJECT_TARGET_LIB} PUBLIC c_std_99)

Expand Down
6 changes: 6 additions & 0 deletions tst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@ get_property(CMARK_BINARY_DIR GLOBAL PROPERTY COMMONMARKER_BINARY_DIR)
enable_testing()

add_executable(draw draw_test.cc mock-middleware.h)
target_compile_features(draw PUBLIC cxx_std_20)
set_target_properties(draw PROPERTIES CXX_EXTENSIONS OFF)
target_include_directories(draw PRIVATE ${CMAKE_SOURCE_DIR}/src ${CMARK_BINARY_DIR} ${GTKMM_INCLUDE_DIRS})
target_link_libraries(draw PRIVATE libreweb-browser-lib-draw ${GTKMM_LIBRARIES} LibCommonMarker gtest_main gmock_main)
add_test(NAME draw_test COMMAND draw)

add_executable(file file_test.cc)
target_compile_features(file PUBLIC cxx_std_20)
set_target_properties(file PROPERTIES CXX_EXTENSIONS OFF)
target_include_directories(file PRIVATE ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(file PRIVATE libreweb-browser-lib-file gtest_main)
add_test(NAME file_test COMMAND file)

add_executable(parser parser_test.cc)
target_compile_features(parser PUBLIC cxx_std_20)
set_target_properties(parser PROPERTIES CXX_EXTENSIONS OFF)
target_include_directories(parser PRIVATE ${CMAKE_SOURCE_DIR}/src ${CMARK_BINARY_DIR} ${GTKMM_INCLUDE_DIRS})
target_link_libraries(parser PRIVATE libreweb-browser-lib-parser ${GTKMM_LIBRARIES} LibCommonMarker gtest_main)
add_test(NAME parser_test COMMAND parser)
Expand Down

0 comments on commit ca8885b

Please sign in to comment.