I wanted to build gflags and glog in my project. Below you see the code. I compiles nearly OK, but due to some compatibility error, I am presented with different fatal errors, depending on which gflags version I try to use in which glog version. As shown, I am presented with the error
./src/glog/stl_logging.h:56:11: fatal error: 'ext/slist' file not found # include <ext/slist>" )
I found the proud message
Now glog's ABI around flags are compatible with gflags
on site, announcing glog 0.3.3 https://code.google.com/p/google-glog/
but I cannot figure out which version of gflags. (which I found strange, because glog depens on gflags)
# Install GFlags
ExternalProject_Add(
GFlagsLib
URL https://github.com/gflags/gflags/archive/master.zip
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
)
ExternalProject_Get_Property(GFlagsLib install_dir)
include_directories(${install_dir}/include)
set(GFLAGS_LIBRARIES ${install_dir}/lib/libgflags.${link_library_suffix})
set(GFLAGS_PREFIX ${install_dir})
# Install GLog
ExternalProject_Add(
GLogLib
URL http://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --with-gflags=${GFLAGS_PREFIX}
)
ExternalProject_Get_Property(GLogLib install_dir)