File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 2525 - mkdir build
2626 - cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
2727 - cmake --build build
28+ - cd build
29+ - ctest
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ project(vorbis)
44list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
55
66# Required modules
7+ include (CTest)
78include (GNUInstallDirs)
89include (CheckIncludeFiles)
910include (CheckLibraryExists)
@@ -71,6 +72,10 @@ endif()
7172
7273add_subdirectory (lib)
7374
75+ if (BUILD_TESTING)
76+ add_subdirectory (test )
77+ endif ()
78+
7479configure_pkg_config_file(vorbis.pc.in)
7580configure_pkg_config_file(vorbisenc.pc.in)
7681configure_pkg_config_file(vorbisfile.pc.in)
Original file line number Diff line number Diff line change 1+ add_executable (vorbis_test util.c util.h write_read.c write_read.h test .c)
2+ target_link_libraries (vorbis_test PRIVATE Vorbis::vorbisenc)
3+ add_test (NAME vorbis_test COMMAND vorbis_test)
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include @OGG_CFLAGS@
1212test_SOURCES = util.c util.h write_read.c write_read.h test.c
1313test_LDADD = ../lib/libvorbisenc.la ../lib/libvorbis.la @OGG_LIBS@ @VORBIS_LIBS@
1414
15+ EXTRA_DIST = CMakeLists.txt
16+
1517debug :
1618 $(MAKE ) check CFLAGS=" @DEBUG@"
1719
You can’t perform that action at this time.
0 commit comments