From d15d55667aa4e03c7b6f8f5d0931538912c93007 Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Sun, 9 Jul 2017 02:04:17 +0200 Subject: [PATCH] cmake: fixed gflags namespace detection (fixes #193) This commit fixes gflags namespace detection using Intel compiler and ensures the generated try_compile command line does not produce malformed paths. --- cmake/DetermineGflagsNamespace.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/DetermineGflagsNamespace.cmake b/cmake/DetermineGflagsNamespace.cmake index e5e50ccd0..5f3026702 100755 --- a/cmake/DetermineGflagsNamespace.cmake +++ b/cmake/DetermineGflagsNamespace.cmake @@ -35,7 +35,7 @@ int main(int argc, char**argv) "${CMAKE_BINARY_DIR}" "${_check_file}" COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}" -DGFLAGS_NAMESPACE=${_namespace} LINK_LIBRARIES "${gflags_LIBRARIES}" - CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING="${gflags_INCLUDE_DIR}" + CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} "-DINCLUDE_DIRECTORIES:STRING=${gflags_INCLUDE_DIR}" OUTPUT_VARIABLE OUTPUT) if (${VARIABLE})