]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix a cmake compatiblity issue related to quoting with cmake 2.8.12
authorJeff Trawick <trawick@apache.org>
Tue, 16 Sep 2014 01:21:24 +0000 (01:21 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 16 Sep 2014 01:21:24 +0000 (01:21 +0000)
and later.

PR: 56615
Submitted by: Chuck Liu <cliu81 gmail.com>, trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1625196 13f79535-47bb-0310-9956-ffa450edef68

CMakeLists.txt

index ba6f1d0c2b69584afbe293a564142461e15cf8ac..082241f699722a92fa16c72c5657e2e90459c154 100644 (file)
@@ -80,11 +80,11 @@ FOREACH(onelib ${APR_LIBRARIES})
 ENDFOREACH()
 
 MACRO(DEFINE_WITH_BLANKS output_definition input_symbol input_value)
-  IF(MSVC_IDE)
+  IF(MSVC_IDE OR ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.11)
     SET(${output_definition} "-D${input_symbol}=\"${input_value}\"")
   ELSE()
-    # assume command-line tool, where extra quotes must be added and escaped to
-    # survive
+    # command-line tool + older cmake, where extra quotes must be added and
+    # escaped to survive
     SET(${output_definition} "-D${input_symbol}=\"\\\"${input_value}\\\"\"")
   ENDIF()
 ENDMACRO()