-
Notifications
You must be signed in to change notification settings - Fork 20
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
#define duplication between CMakeLists and caffe_config.h #41
Comments
Yes that makes sense, the CMake system needs a makeover. |
So, I tentatively took the path of replacing #cmakedefines with |
Ok, this is resolved then. |
Thanks. If you ultimately decide that #cmakedefine was the way to go, drop me a note. |
@intelfx |
(This is a copy of issue BVLC#4625, related to PR BVLC#4609.)
While refactoring the buildsystem I've noticed that several
USE_xxx
definitions are duplicated incaffe_config.h
(via#cmakedefine
) and in CMake code (viaadd_definitions()
or equivalent).Because I'm going to post the equivalent PR here due to complex merge conflicts, I'd better ask you the same question. What is the reason for this? Is it on purpose? Originally, I proposed to get rid of #cmakedefines in
caffe_config.h.in
and instead add these definitions from CMakeLists because this way the definitions can be properly exported to the library clients, but I see that in this fork you actually did the inverse — i. e. removed more defines from CMakeLists and moved them tocaffe_config.h
. So, there are two ways:add_definitions()
from CMakeLists, move them as #cmakedefines tocaffe_config.h.in
, install that file and include it from all public headers (probably splittingcaffe_config.h.in
in two files for private and public definitions);caffe_config.h.in
and instead use code in CMakeLists to add them.The first option can be deemed more "stylish" because the definitions are then more easily visible and they are automatically generated from CMake variables. The second option is easier to implement because there is no need to modify C code and inspect all headers.
The text was updated successfully, but these errors were encountered: