Commit abce7880 authored by loop0day's avatar loop0day Committed by Sergiu Deitsch

cmake: renamed GFLAGS_NAMESPACE to GLOG_GFLAGS_NAMESPACE (#318)

This eliminates a conflict between glog and gflags preprocessor definition of GFLAGS_NAMESPACE that can cause the gflags namespace detection to fail (fixes #317).
parent 2faa186e
...@@ -15,7 +15,7 @@ macro(determine_gflags_namespace VARIABLE) ...@@ -15,7 +15,7 @@ macro(determine_gflags_namespace VARIABLE)
int main(int argc, char**argv) int main(int argc, char**argv)
{ {
GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, true); GLOG_GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, true);
} }
") ")
if (NOT CMAKE_REQUIRED_QUIET) if (NOT CMAKE_REQUIRED_QUIET)
...@@ -33,7 +33,7 @@ int main(int argc, char**argv) ...@@ -33,7 +33,7 @@ int main(int argc, char**argv)
file (WRITE "${_check_file}" "${_check_code}") file (WRITE "${_check_file}" "${_check_code}")
try_compile (${VARIABLE} try_compile (${VARIABLE}
"${CMAKE_BINARY_DIR}" "${_check_file}" "${CMAKE_BINARY_DIR}" "${_check_file}"
COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}" -DGFLAGS_NAMESPACE=${_namespace} COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}" -DGLOG_GFLAGS_NAMESPACE=${_namespace}
LINK_LIBRARIES gflags LINK_LIBRARIES gflags
CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
OUTPUT_VARIABLE OUTPUT) OUTPUT_VARIABLE OUTPUT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment