[petsc-dev] [PATCH 3 of 3] cmake: replace invalid characters with underscores

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


# HG changeset patch
# User Sean Farley <sean at mcs.anl.gov>
# Date 1345951634 18000
# Node ID 577257bfa0b5538f55d5f81b38628cb3dec0d627
# Parent  63d07634522344a4f6078db68a6e31e1ea6d5d59
cmake: replace invalid characters with underscores

This seemingly fixes -framework being passed to cmake

diff --git a/config/PETSc/Configure.py b/config/PETSc/Configure.py
--- a/config/PETSc/Configure.py
+++ b/config/PETSc/Configure.py
@@ -436,11 +436,11 @@
       extendby(self.libraries.rt)
       extendby(self.compilers.flibs)
       extendby(self.compilers.cxxlibs)
       extendby(self.compilers.LIBS.split())
       for libname in nublast(lib_libs):
-        libvar = 'PETSC_' + libname.upper() + '_LIB'
+        libvar = 'PETSC_' + libname.upper().replace('-','').replace(' ','_') + '_LIB'
         addpath = ''
         for lpath in nublast(lib_paths):
           addpath += '"' + str(lpath) + '" '
         fd.write('find_library (' + libvar + ' ' + libname + ' HINTS ' + addpath + ')\n')
         libvars.append(libvar)



More information about the petsc-dev mailing list