Disabling compilation of win32draw.c

Satish Balay balay at mcs.anl.gov
Tue Jan 20 18:14:36 CST 2009


For a hacky way to disable it - you can use the attached patch..

cd petsc-3.0
patch -Np1 < ~/win32-draw-disable.patch

Satish

On Tue, 20 Jan 2009, Barry Smith wrote:

> 
>    Tom,
> 
>     We have had an oversight on our part and do not have a specific mechanism
> for turning this off. (We do have a
> mechanism for turning this off for X windows so this is a mistake/oversight
> and not a design decision). Do you have a
> need to turn it off for PETSc release 3.0.0 or do you only see a need to turn
> it off for petsc-dev? Bear in mind we
> may not make the next official release for a year or more.
> 
>   Based on your response we'll come up with a plan for adding simple support
> for this. Thanks for your feedback.
> 
>   Barry
> 
> 
> On Jan 20, 2009, at 4:06 PM, KACVINSKY Tom wrote:
> 
> > How do I disable compilation of win32draw.c?  I do not want/need the
> > graphics
> > stuff on Windows 32 bit.
> > 
> > Thanks,
> > 
> > Tom
> > 
> 
-------------- next part --------------
diff -r b0860bcf99d8 src/sys/draw/impls/win32/makefile
--- a/src/sys/draw/impls/win32/makefile	Mon Jan 19 17:31:21 2009 -0600
+++ b/src/sys/draw/impls/win32/makefile	Tue Jan 20 18:12:28 2009 -0600
@@ -1,5 +1,5 @@
 
-#requirespackage 'PETSC_HAVE_WINDOWS_H'
+#requirespackage 'PETSC_HAVE_WINDOWS_H_disabled'
 
 ALL: lib 
 
diff -r b0860bcf99d8 src/sys/draw/interface/drawreg.c
--- a/src/sys/draw/interface/drawreg.c	Mon Jan 19 17:31:21 2009 -0600
+++ b/src/sys/draw/interface/drawreg.c	Tue Jan 20 18:12:28 2009 -0600
@@ -259,7 +259,7 @@
   } else {
     ierr = PetscOptionsHasName(PETSC_NULL,"-nox",&nox);CHKERRQ(ierr);
     def  = PETSC_DRAW_NULL;
-#if defined(PETSC_HAVE_WINDOWS_H) && !defined(PETSC_HAVE_X11)
+#if defined(PETSC_HAVE_WINDOWS_H_disabled) && !defined(PETSC_HAVE_X11)
     if (!nox) def = PETSC_DRAW_WIN32;
 #elif defined(PETSC_HAVE_X11)
     if (!nox) def = PETSC_DRAW_X;
diff -r b0860bcf99d8 src/sys/draw/interface/drawregall.c
--- a/src/sys/draw/interface/drawregall.c	Mon Jan 19 17:31:21 2009 -0600
+++ b/src/sys/draw/interface/drawregall.c	Tue Jan 20 18:12:28 2009 -0600
@@ -30,7 +30,7 @@
   
 #if defined(PETSC_HAVE_X11)
   ierr = PetscDrawRegisterDynamic(PETSC_DRAW_X,     path,"PetscDrawCreate_X",     PetscDrawCreate_X);CHKERRQ(ierr);
-#elif defined(PETSC_HAVE_WINDOWS_H)
+#elif defined(PETSC_HAVE_WINDOWS_H_disabled)
   ierr = PetscDrawRegisterDynamic(PETSC_DRAW_WIN32, path,"PetscDrawCreate_Win32", PetscDrawCreate_Win32);CHKERRQ(ierr);
 #endif
   ierr = PetscDrawRegisterDynamic(PETSC_DRAW_NULL,  path,"PetscDrawCreate_Null",  PetscDrawCreate_Null);CHKERRQ(ierr);


More information about the petsc-dev mailing list