Guard #define HAS_VALGRIND on Windows jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 23 Jan 2017 13:13:27 +0000
branchjv
changeset 4198 533d77906f5b
parent 4194 6fcb7a598b44
child 4199 89ebbba27db6
Guard #define HAS_VALGRIND on Windows ...so it's not defined there. Normally this is not an issue since `stx_libbasic3-config.bat` does not define them. However, this allows to build both Linux and Windows versions in same build tree. Useful for developers only.
stx_libbasic3-config.sh
--- a/stx_libbasic3-config.sh	Fri Jan 13 23:33:19 2017 +0000
+++ b/stx_libbasic3-config.sh	Mon Jan 23 13:13:27 2017 +0000
@@ -16,10 +16,12 @@
 out ""
 for inc in $INCLUDE_DIRS; do
     if [ -r "$inc/valgrind/valgrind.h" ]; then
-        out "#define HAS_VALGRIND"        
+    	out "#if !defined(_WIN32) && !defined(_WIN64)"    	
+        out "# define HAS_VALGRIND"        
         if [ -r "$inc/valgrind/callgrind.h" ]; then
-            out "#define HAS_CALLGRIND"        
+            out "# define HAS_CALLGRIND"        
         fi        
+        out "#endif"
     fi        
 done