Skip to content

Commit

Permalink
Add ctest too
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausKlein committed Jun 29, 2024
1 parent 9b95dca commit d1ca6dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,10 @@ if(USE_MODULES)
else()
target_link_libraries(server PRIVATE asio)
endif()

enable_testing()
if(APPLE)
add_test(NAME server COMMAND dyld_info server)
else()
add_test(NAME server COMMAND ldd server)
endif()
7 changes: 4 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
export CXXFLAGS=-std=c++23

.PHONY: all build install clean distclean
.PHONY: all install clean distclean
all: stagedir build
ninja -C build
cd build && ctest --verbose

build:
build: CMakeLists.txt GNUmakefile
cmake -G Ninja -S . -B build -D CMAKE_PREFIX_PATH=stagedir --fresh #XXX --debug-find-pkg=Asio

stagedir:
stagedir: CMakeLists.txt GNUmakefile
cmake -G Ninja -S asio-module -B build/asio -D CMAKE_INSTALL_PREFIX=$(CURDIR)/stagedir --fresh
cmake --build build/asio
cmake --install build/asio # --prefix stagedir
Expand Down

0 comments on commit d1ca6dc

Please sign in to comment.