-
Notifications
You must be signed in to change notification settings - Fork 5
Fix make/cmake and includes. #28
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
base: master
Are you sure you want to change the base?
Fix make/cmake and includes. #28
Conversation
DDvO
left a comment
There was a problem hiding this 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.
| if(DEFINED ENV{NDEBUG}) | ||
| add_definitions(-DNDEBUG=1 -O2) |
There was a problem hiding this comment.
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
| $(OUT_DIR)/$(OUTLIB)* $(OUT_DIR)/util/$(OUTBIN) $(OUT_DIR)/util/icvutil.o | ||
|
|
||
| clean: | ||
| $(MAKE) -C util clean |
There was a problem hiding this comment.
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.
| $(MAKE) COMPILE_TYPE=$(COMPILE_TYPE) build_only | ||
|
|
||
| util: | ||
| util: $(OUT_DIR)/$(OUTLIB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better:
util: build_only
| build_all: | ||
| $(MAKE) build | ||
| $(MAKE) util |
There was a problem hiding this comment.
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?
No description provided.