From 3b77b957a41ce00c8e5d8d47ce442887181d669d Mon Sep 17 00:00:00 2001
From: Roman Wüger <roman.wueger@gmx.at>
Date: Thu, 12 Mar 2015 11:51:24 +0100
Subject: [PATCH] WCDH: Fix cxx_nullptr for compilers which doesn't support
 C++11

---
 Modules/WriteCompilerDetectionHeader.cmake | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index d18f47c..721bbdb 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -586,7 +586,11 @@ function(write_compiler_detection_header
 #  if ${def_name}
 #    define ${def_value} nullptr
 #  else
-#    define ${def_value} static_cast<void*>(0)
+#    ifdef NULL
+#      define ${def_value} NULL
+#    else
+#      define ${def_value} 0
+#    endif
 #  endif
 \n")
       endif()
-- 
1.9.5.msysgit.0

