Skip to content

Commit

Permalink
fix macos (#42)
Browse files Browse the repository at this point in the history
* upgrade doctest to 2.4.9, update makefile for new pedantic clang silliness

* update license

* exciting new clang warnings

* explicitly enable -wcoversion for gcc
  • Loading branch information
charlesnicholson authored Dec 4, 2022
1 parent 5d47458 commit dbdc6e9
Show file tree
Hide file tree
Showing 3 changed files with 7,061 additions and 6,821 deletions.
31 changes: 30 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
Nanocobs is dual-licensed under both the "Unlicense" and the
"Zero-Clause BSD" (0BSD) licenses. The intent of this dual-licensing
structure is to make nanocobs as consumable as possible in as many
environments / countries / companies as possible without encumbering
users.

This license applies to all of the nanocobs source code, build code,
and tests, with the explicit exception of doctest.h, which exists under
its own license and is included in this repository.

The text of the two licenses follows below:

============================== UNLICENSE ==============================

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
Expand All @@ -21,4 +35,19 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <https://unlicense.org>
For more information, please refer to <http://unlicense.org>

================================ 0BSD =================================

Copyright (C) 2019 by Charles Nicholson <[email protected]>

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ BUILD_DIR := build
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(OBJS:.o=.d)
OS := $(shell uname)
COMPILER_VERSION := $(shell $(CXX) --version)

CFLAGS = --std=c99
CXXFLAGS = --std=c++17

CPPFLAGS += -MMD -MP -Os -g

Expand All @@ -29,13 +33,17 @@ endif

CPPFLAGS += -Wall -Werror -Wextra

ifeq ($(OS),Darwin)
CPPFLAGS += -Weverything -Wno-poison-system-directories -Wno-format-pedantic
ifneq '' '$(findstring clang,$(COMPILER_VERSION))'
CPPFLAGS += -Weverything \
-Wno-poison-system-directories \
-Wno-format-pedantic \
-Wno-c++98-compat-bind-to-temporary-copy
CFLAGS += -Wno-declaration-after-statement
else
CPPFLAGS += -Wconversion
endif

CPPFLAGS += -Wno-c++98-compat -Wno-padded
CFLAGS = --std=c99
CXXFLAGS = --std=c++17

$(BUILD_DIR)/cobs_unittests: $(OBJS) $(BUILD_DIR)/cobs.c.o Makefile
$(CXX) $(LDFLAGS) $(LDFLAGS_SAN) $(OBJS) $(BUILD_DIR)/cobs.c.o -o $@
Expand Down
Loading

0 comments on commit dbdc6e9

Please sign in to comment.