Hello,

I've attached a patch for this problem.

Best Regards

From 3b77b957a41ce00c8e5d8d47ce442887181d669d Mon Sep 17 00:00:00 2001
From: Roman Wüger <[email protected]>
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



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to