xunzhang / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Google glog fails to find gflags/gflags.h when using google namespace #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm not sure if this bug should be filed against gflags or glog.

Google glog tries to #include <gflags/gflags.h>. It also assumes that gflags 
lives in the 'google' namespace. But when I set GFLAGS_NAMESPACE to 'google' 
while building gflags, it installs the files to include/google/ instead of 
include/gflags.

Either gflags should be updated to allow the files to be installed to a 
directory that differs from the namespace, or glog needs to be updated to allow 
for a more flexible gflags installation path and/or namespace.

Do you have any suggestions as to how this should be handled?

Original issue reported on code.google.com by godbyk@gmail.com on 26 Mar 2014 at 7:58

GoogleCodeExporter commented 9 years ago
I see. I think how gflags does it now should be correct as a "namespace" only 
makes sense if applied consistently for a package. The "google" namespace for 
gflags is further deprecated. Nonetheless, as the Google folks unlikely will 
follow this change and might still be using their own internal gflags version, 
I am fine to add a separate CMake variable which allows you to specify the 
installation subdirectory for the header files to maintain backwards 
compatibility.

Original comment by andreas....@gmail.com on 26 Mar 2014 at 8:22

GoogleCodeExporter commented 9 years ago
This issue was closed by revision aff8ef820a16.

Original comment by andreas....@gmail.com on 27 Mar 2014 at 1:09

GoogleCodeExporter commented 9 years ago
Added the cached CMake variable GFLAGS_INCLUDE_DIR which is set to "gflags" by 
default. Hence, for use of gflags together with glog, you only need to set 
GFLAGS_NAMESPACE:STRING=google . The include path will still be 
"gflags/gflags.h".

Original comment by andreas....@gmail.com on 27 Mar 2014 at 1:21

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 0c6e5fdb3f94.

Original comment by andreas....@gmail.com on 27 Mar 2014 at 1:31