babelouest / ulfius

Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
https://babelouest.github.io/ulfius
GNU Lesser General Public License v2.1
1.07k stars 183 forks source link

Add missing check includes if tests are built #182

Closed valera-rozuvan closed 3 years ago

valera-rozuvan commented 3 years ago

On my system running make test failed. I traced it to missing include directories:

% make test

Running tests...
Test project /Users/admin/dev/github.com/ulfius/build
[ 25%] Built target orcania
[ 37%] Built target yder
[ 87%] Built target ulfius
Scanning dependencies of target core
[ 93%] Building C object CMakeFiles/core.dir/test/core.c.o
/Users/admin/dev/github.com/ulfius/test/core.c:13:10: fatal error: 'check.h' file not found
#include <check.h>
         ^~~~~~~~~
1 error generated.
make[4]: *** [CMakeFiles/core.dir/test/core.c.o] Error 1
make[3]: *** [CMakeFiles/core.dir/all] Error 2
make[2]: *** [CMakeFiles/core.dir/rule] Error 2
make[1]: *** [core] Error 2
Problem running command: /usr/bin/make core u_map framework websocket
Problem executing pre-test command(s).
Errors while running CTest
make: *** [test] Error 8

My fix adds missing Check include directories if tests are being built.

babelouest commented 3 years ago

Thanks @valera-rozuvan !