Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix make/cmake and includes. #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

martin-barta-sie
Copy link
Contributor

No description provided.

Copy link
Member

@DDvO DDvO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly fine to me.
Good that you cleaned up some #includes etc.

Comment on lines -46 to -47
if(DEFINED ENV{NDEBUG})
add_definitions(-DNDEBUG=1 -O2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that regarding (N)DEBUG, CMakeLists.txt and Makefile should remain consistent. In Makefile it now reads

ifdef DEBUG
    DEBUG_FLAGS ?= -g -O0
# Add this to get some additional runtime checks.
# Warning: it's incompatible with tools like Valgrind and you have to add it to the app using this lib too
#	DEBUG_FLAGS += -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all
    override DEBUG_FLAGS += -DNDEBUG=1
else
    DEBUG_FLAGS ?= -g -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all # not every compiler(version) supports -Og
endif

@@ -219,10 +223,10 @@ clean_uta:
$(OUT_DIR)/$(OUTLIB)* $(OUT_DIR)/util/$(OUTBIN) $(OUT_DIR)/util/icvutil.o

clean:
$(MAKE) -C util clean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inconsistent - $(MAKE) util is still part of build_all,
but you moved $(MAKE) -C util clean from clean_all to clean.

@@ -150,11 +152,13 @@ ifeq ($(COV_ENABLED), 1)
endif
$(MAKE) COMPILE_TYPE=$(COMPILE_TYPE) build_only

util:
util: $(OUT_DIR)/$(OUTLIB)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better:
util: build_only

Comment on lines +159 to +161
build_all:
$(MAKE) build
$(MAKE) util
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the advantage of this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants