mirror of
https://github.com/obgm/libcoap.git
synced 2025-10-14 02:19:34 +08:00
cmake: Remove the need to configure tests/test_common.h
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -101,7 +101,6 @@ tests/Makefile
|
||||
tests/oss-fuzz/Makefile.ci
|
||||
tests/testdriver
|
||||
tests/*.o
|
||||
tests/test_common.h
|
||||
|
||||
# the cmake/ folder
|
||||
cmake/libcoap
|
||||
|
@@ -763,9 +763,6 @@ configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake_coap_config.h.in
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake_coap_defines.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_defines.h)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/tests/test_common.h.in
|
||||
${CMAKE_CURRENT_LIST_DIR}/tests/test_common.h)
|
||||
|
||||
#
|
||||
# sources
|
||||
#
|
||||
|
@@ -133,6 +133,7 @@ EXTRA_DIST = \
|
||||
src/coap_io_contiki.c \
|
||||
src/coap_io_lwip.c \
|
||||
src/coap_io_riot.c \
|
||||
tests/test_common.h \
|
||||
tests/test_error_response.h \
|
||||
tests/test_encode.h \
|
||||
tests/test_options.h \
|
||||
|
@@ -33,7 +33,7 @@ man/coap*.[357] man/coap*.txt man/Makefile man/Makefile.in
|
||||
missing
|
||||
Makefile Makefile.in
|
||||
stamp-h1 src/.dirstamp libcoap*.la* src/*.*o
|
||||
tests/*.o tests/Makefile tests/Makefile.in tests/testdriver tests/test_common.h
|
||||
tests/*.o tests/Makefile tests/Makefile.in tests/testdriver
|
||||
tests/oss-fuzz/Makefile.ci
|
||||
m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
|
||||
"
|
||||
|
@@ -1382,7 +1382,6 @@ man/coap-rd.txt
|
||||
man/coap-tls-engine-conf.txt
|
||||
man/Makefile
|
||||
scripts/fix_version.sh
|
||||
tests/test_common.h
|
||||
tests/Makefile
|
||||
tests/oss-fuzz/Makefile.ci
|
||||
libcoap-$LIBCOAP_NAME_SUFFIX.pc:libcoap-$LIBCOAP_API_VERSION.pc.in
|
||||
|
@@ -16,7 +16,10 @@ echo $ARCHIVE
|
||||
if test $err = 0 -a "x$ARCHIVE" != "x"; then
|
||||
DIR=`pwd`/`tar taf $ARCHIVE |cut -d/ -f1|head -1`
|
||||
tar xaf $ARCHIVE && cd $DIR
|
||||
err=$terr
|
||||
terr=$?
|
||||
if [ $err = 0 ] ; then
|
||||
err=$terr
|
||||
fi
|
||||
|
||||
# LwIP
|
||||
make -C $DIR/examples/lwip EXTRA_CFLAGS=-Werror
|
||||
@@ -46,6 +49,15 @@ if test $err = 0 -a "x$ARCHIVE" != "x"; then
|
||||
if [ $err = 0 ] ; then
|
||||
err=$terr
|
||||
fi
|
||||
|
||||
# cmake
|
||||
cmake -E make_directory test-cmake
|
||||
cd test-cmake
|
||||
cmake .. -DENABLE_EXAMPLES=ON -DENABLE_TESTS=ON -DENABLE_DTLS=OFF -DENABLE_DOCS=OFF -DWARNING_TO_ERROR=ON
|
||||
terr=$?
|
||||
if [ $err = 0 ] ; then
|
||||
err=$terr
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $err
|
||||
|
@@ -8,4 +8,4 @@
|
||||
* README for terms of use.
|
||||
*/
|
||||
|
||||
#include "coap@LIBCOAP_API_VERSION@/coap_internal.h"
|
||||
#include "coap3/coap_internal.h"
|
Reference in New Issue
Block a user