Fix builds without pthreads (#139)

This commit is contained in:
Alex Kotov 2022-12-12 05:08:15 +04:00 committed by GitHub
parent c19193c390
commit cdb2758489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 6 deletions

View File

@ -11,7 +11,7 @@ main_freebsd_task:
- pkg install --yes autoconf automake libtool
main_build_script:
- ./autogen.sh
- ./configure --enable-debug --enable-checks CFLAGS='-O3'
- ./configure --enable-debug --enable-checks --enable-checks-pthreads CFLAGS='-O3'
- make
- sudo make install
main_test_script:

View File

@ -34,7 +34,7 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure ${{matrix.debug}} --enable-checks --enable-checks-python CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
run: ./configure ${{matrix.debug}} --enable-checks --enable-checks-pthreads --enable-checks-python CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
- name: make
run: make
- name: check
@ -76,7 +76,7 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --host='${{matrix.cross.arch}}-unknown-elf' --enable-checks --enable-checks-python AR='${{matrix.cross.cprefix}}ar' CC='${{matrix.cross.cprefix}}gcc' LD='${{matrix.cross.cprefix}}ld' RANLIB='${{matrix.cross.cprefix}}ranlib'
run: ./configure --host='${{matrix.cross.arch}}-unknown-elf' --enable-checks --enable-checks-pthreads --enable-checks-python AR='${{matrix.cross.cprefix}}ar' CC='${{matrix.cross.cprefix}}gcc' LD='${{matrix.cross.cprefix}}ld' RANLIB='${{matrix.cross.cprefix}}ranlib'
- name: make
run: make
- name: check
@ -99,7 +99,7 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-debug --enable-checks --enable-checks-python --without-${{matrix.packages.without}} ${{matrix.packages.dependencies}}
run: ./configure --enable-debug --enable-checks --enable-checks-pthreads --enable-checks-python --without-${{matrix.packages.without}} ${{matrix.packages.dependencies}}
- name: make
run: make
- name: check
@ -138,7 +138,7 @@ jobs:
- name: extract
run: tar -xzf "libkernaux-$(cat VERSION).tar.gz"
- name: configure
run: cd "libkernaux-$(cat VERSION)" && ./configure --enable-debug --enable-checks --enable-checks-python
run: cd "libkernaux-$(cat VERSION)" && ./configure --enable-debug --enable-checks --enable-checks-pthreads --enable-checks-python
- name: make
run: cd "libkernaux-$(cat VERSION)" && make
- name: check

View File

@ -1,3 +1,7 @@
2022-12-12 Alex Kotov <kotovalexarian@gmail.com>
* examples/Makefile.am: Fix builds without pthreads
2022-12-11 Alex Kotov <kotovalexarian@gmail.com>
* include/kernaux/macro.h: Macro "KERNAUX_STATIC_TEST" has been added

View File

@ -137,8 +137,9 @@ stable options.
#### Features
* `--enable-checks` - enable usual tests and examples
* `--enable-checks-all` - enable all tests
* `--enable-checks-all` - enable all checks
* `--enable-checks-cppcheck` - enable cppcheck
* `--enable-checks-pthreads` - enable tests that require pthreads
* `--enable-checks-python` - enable tests that require Python 3 with YAML and
Jinja2

View File

@ -41,9 +41,11 @@ generic_malloc_SOURCES = main.c generic_malloc.c
# generic_mutex #
#################
if ENABLE_CHECKS_PTHREADS
TESTS += generic_mutex
generic_mutex_LDADD = $(top_builddir)/libkernaux.la
generic_mutex_SOURCES = main.c generic_mutex.c
endif
##############
# macro_bits #