[petsc-dev] [PATCH 2 of 3] cuda: add __attribute((unused)) since the backend seems to support it

Sean Farley sean at mcs.anl.gov
Sun Aug 26 18:14:05 CDT 2012


# HG changeset patch
# User Sean Farley <sean at mcs.anl.gov>
# Date 1346005847 18000
# Node ID 63d07634522344a4f6078db68a6e31e1ea6d5d59
# Parent  56899038c8e3e8ee070c93767a77632405801842
cuda: add __attribute((unused)) since the backend seems to support it

diff --git a/config/PETSc/Configure.py b/config/PETSc/Configure.py
--- a/config/PETSc/Configure.py
+++ b/config/PETSc/Configure.py
@@ -560,11 +560,11 @@
     if self.checkCompile('#define _POSIX_C_SOURCE 200112L\n#include <stdlib.h>','long v = atoll("25")') or self.checkCompile ('#include <stdlib.h>','long v = atoll("25")'):
        self.addDefine('HAVE_ATOLL', '1')
 
   def configureUnused(self):
     '''Sees if __attribute((unused)) is supported'''
-    if self.framework.argDB['with-ios'] or self.framework.argDB['with-cuda']:
+    if self.framework.argDB['with-ios']:
       self.addDefine('UNUSED', ' ')
       return
     self.pushLanguage(self.languages.clanguage)      
     if self.checkLink('__attribute((unused)) static int myfunc(void){ return 1;}', 'int i = myfunc();\ntypedef void* atype;\n__attribute((unused))  atype a;\n'):
       self.addDefine('UNUSED', '__attribute((unused))')



More information about the petsc-dev mailing list