Commits

Jed Brown committed c7a579a

cmakegen.py: de-duplicate sources lists for cuda_add_library

Comments (0)

Files changed (1)

config/cmakegen.py

       f.write ('''
 if (PETSC_USE_SINGLE_LIBRARY)
   if (PETSC_HAVE_CUDA)
-    cuda_add_library (petsc %s)
+    cuda_add_library (petsc %(allsrc)s)
   else ()
-    add_library (petsc %s)
+    add_library (petsc %(allsrc)s)
   endif ()
   target_link_libraries (petsc ${PETSC_PACKAGE_LIBS})
   if (PETSC_WIN32FE)
   endif ()
 
 endif ()
-''' % (' '.join([r'${PETSC' + pkg.upper() + r'_SRCS}' for pkg,deps in pkglist]),' '.join([r'${PETSC' + pkg.upper() + r'_SRCS}' for pkg,deps in pkglist])))
+''' % dict(allsrc=' '.join([r'${PETSC' + pkg.upper() + r'_SRCS}' for pkg,deps in pkglist])))
       f.write('''
 if (PETSC_CLANGUAGE_Cxx)
   foreach (file IN LISTS %s)