From 1b076f72921e72f33abf78b4e457391607ac63f1 Mon Sep 17 00:00:00 2001 From: Abdoulbari ZAKIR Date: Thu, 3 Jun 2021 11:04:59 +0200 Subject: [PATCH] spns #20216 delete cmake warnig due to unused variable --- products/CONFIGURATION.pyconf | 2 +- products/env_scripts/ParaView.py | 2 +- ...uration-avoid-cmakeWarningOnFindGmsh.patch | 17 +++++ .../petsc-3.15-cmakeUnusedOptions.patch | 64 +++++++++++++++++++ products/petsc.pyconf | 2 + 5 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 products/patches/configuration-avoid-cmakeWarningOnFindGmsh.patch create mode 100644 products/patches/petsc-3.15-cmakeUnusedOptions.patch diff --git a/products/CONFIGURATION.pyconf b/products/CONFIGURATION.pyconf index d19df83..d64b98d 100755 --- a/products/CONFIGURATION.pyconf +++ b/products/CONFIGURATION.pyconf @@ -19,5 +19,5 @@ default : configure_dependency : "yes" # the source of this module is required for the configuration of salome is_SALOME_module : "yes" } - patches : [] + patches : ["configuration-avoid-cmakeWarningOnFindGmsh.patch"] } diff --git a/products/env_scripts/ParaView.py b/products/env_scripts/ParaView.py index ee4520a..fbf1cc2 100644 --- a/products/env_scripts/ParaView.py +++ b/products/env_scripts/ParaView.py @@ -67,7 +67,7 @@ def set_vtk_env(env, version): env.set('VTK_ROOT_DIR', root) env.set('VTK_DIR', os.path.join(root, lib_dir, 'cmake', 'paraview-' + version)) # OP TEST - env.prepend('VTK_ROOT_DIR', os.path.join(root, lib_dir, 'cmake', 'paraview-' + version)) + #env.prepend('VTK_ROOT_DIR', os.path.join(root, lib_dir, 'cmake', 'paraview-' + version)) #env.prepend('VTK_ROOT_DIR', os.path.join(root, lib_dir, 'paraview-' + version)) if not platform.system() == "Windows" : diff --git a/products/patches/configuration-avoid-cmakeWarningOnFindGmsh.patch b/products/patches/configuration-avoid-cmakeWarningOnFindGmsh.patch new file mode 100644 index 0000000..9955e7e --- /dev/null +++ b/products/patches/configuration-avoid-cmakeWarningOnFindGmsh.patch @@ -0,0 +1,17 @@ +diff -Naur CONFIGURATION_ref/cmake/FindSalomeGMSH.cmake CONFIGURATION_new/cmake/FindSalomeGMSH.cmake +--- CONFIGURATION_ref/cmake/FindSalomeGMSH.cmake 2021-06-02 12:55:08.959474330 +0200 ++++ CONFIGURATION_new/cmake/FindSalomeGMSH.cmake 2021-06-02 12:56:24.260636526 +0200 +@@ -17,10 +17,10 @@ + # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + # + +-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(GMSH GMSH_INCLUDE_DIRS 2) ++SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(GMSH GMSH_ROOT_DIR 0) + MARK_AS_ADVANCED(GMSH_INCLUDE_DIRS GMSH_LIBRARIES) + + IF(GMSH_FOUND) + SALOME_ACCUMULATE_HEADERS(GMSH_INCLUDE_DIRS) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${GMSH_LIBRARIES}) +-ENDIF() +\ Pas de fin de ligne à la fin du fichier ++ENDIF() diff --git a/products/patches/petsc-3.15-cmakeUnusedOptions.patch b/products/patches/petsc-3.15-cmakeUnusedOptions.patch new file mode 100644 index 0000000..59ccc3a --- /dev/null +++ b/products/patches/petsc-3.15-cmakeUnusedOptions.patch @@ -0,0 +1,64 @@ +diff -Naur petsc_ref/config/BuildSystem/config/package.py petsc_new/config/BuildSystem/config/package.py +--- petsc_ref/config/BuildSystem/config/package.py 2021-03-31 02:22:39.000000000 +0200 ++++ petsc_new/config/BuildSystem/config/package.py 2021-06-01 16:57:13.432206497 +0200 +@@ -1704,7 +1704,7 @@ + + args = ['-DCMAKE_INSTALL_PREFIX='+self.installDir] + args.append('-DCMAKE_INSTALL_NAME_DIR:STRING="'+os.path.join(self.installDir,self.libdir)+'"') +- args.append('-DCMAKE_INSTALL_LIBDIR:STRING="lib"') ++ #args.append('-DCMAKE_INSTALL_LIBDIR:STRING="lib"') + args.append('-DCMAKE_VERBOSE_MAKEFILE=1') + if self.compilerFlags.debugging: + args.append('-DCMAKE_BUILD_TYPE=Debug') +@@ -1712,32 +1712,33 @@ + args.append('-DCMAKE_BUILD_TYPE=Release') + self.framework.pushLanguage('C') + args.append('-DCMAKE_C_COMPILER="'+self.framework.getCompiler()+'"') +- args.append('-DMPI_C_COMPILER="'+self.framework.getCompiler()+'"') ++ #args.append('-DMPI_C_COMPILER="'+self.framework.getCompiler()+'"') + args.append('-DCMAKE_AR='+self.setCompilers.AR) + ranlib = shlex.split(self.setCompilers.RANLIB)[0] + args.append('-DCMAKE_RANLIB='+ranlib) + cflags = self.updatePackageCFlags(self.setCompilers.getCompilerFlags()) + args.append('-DCMAKE_C_FLAGS:STRING="'+cflags+'"') +- args.append('-DCMAKE_C_FLAGS_DEBUG:STRING="'+cflags+'"') ++ #args.append('-DCMAKE_C_FLAGS_DEBUG:STRING="'+cflags+'"') + args.append('-DCMAKE_C_FLAGS_RELEASE:STRING="'+cflags+'"') + self.framework.popLanguage() +- if hasattr(self.compilers, 'CXX'): +- self.framework.pushLanguage('Cxx') +- args.append('-DCMAKE_CXX_COMPILER="'+self.framework.getCompiler()+'"') +- args.append('-DMPI_CXX_COMPILER="'+self.framework.getCompiler()+'"') +- args.append('-DCMAKE_CXX_FLAGS:STRING="'+self.updatePackageCxxFlags(self.framework.getCompilerFlags())+'"') +- args.append('-DCMAKE_CXX_FLAGS_DEBUG:STRING="'+self.updatePackageCxxFlags(self.framework.getCompilerFlags())+'"') +- args.append('-DCMAKE_CXX_FLAGS_RELEASE:STRING="'+self.updatePackageCxxFlags(self.framework.getCompilerFlags())+'"') +- self.framework.popLanguage() ++ ++ #if hasattr(self.compilers, 'CXX'): ++ #self.framework.pushLanguage('Cxx') ++ #args.append('-DCMAKE_CXX_COMPILER="'+self.framework.getCompiler()+'"') ++ #args.append('-DMPI_CXX_COMPILER="'+self.framework.getCompiler()+'"') ++ #args.append('-DCMAKE_CXX_FLAGS:STRING="'+self.updatePackageCxxFlags(self.framework.getCompilerFlags())+'"') ++ #args.append('-DCMAKE_CXX_FLAGS_DEBUG:STRING="'+self.updatePackageCxxFlags(self.framework.getCompilerFlags())+'"') ++ #args.append('-DCMAKE_CXX_FLAGS_RELEASE:STRING="'+self.updatePackageCxxFlags(self.framework.getCompilerFlags())+'"') ++ #self.framework.popLanguage() + +- if hasattr(self.compilers, 'FC'): +- self.framework.pushLanguage('FC') +- args.append('-DCMAKE_Fortran_COMPILER="'+self.framework.getCompiler()+'"') +- args.append('-DMPI_Fortran_COMPILER="'+self.framework.getCompiler()+'"') +- args.append('-DCMAKE_Fortran_FLAGS:STRING="'+self.updatePackageFFlags(self.framework.getCompilerFlags())+'"') +- args.append('-DCMAKE_Fortran_FLAGS_DEBUG:STRING="'+self.updatePackageFFlags(self.framework.getCompilerFlags())+'"') +- args.append('-DCMAKE_Fortran_FLAGS_RELEASE:STRING="'+self.updatePackageFFlags(self.framework.getCompilerFlags())+'"') +- self.framework.popLanguage() ++ #if hasattr(self.compilers, 'FC'): ++ #self.framework.pushLanguage('FC') ++ #args.append('-DCMAKE_Fortran_COMPILER="'+self.framework.getCompiler()+'"') ++ #args.append('-DMPI_Fortran_COMPILER="'+self.framework.getCompiler()+'"') ++ #args.append('-DCMAKE_Fortran_FLAGS:STRING="'+self.updatePackageFFlags(self.framework.getCompilerFlags())+'"') ++ #args.append('-DCMAKE_Fortran_FLAGS_DEBUG:STRING="'+self.updatePackageFFlags(self.framework.getCompilerFlags())+'"') ++ #args.append('-DCMAKE_Fortran_FLAGS_RELEASE:STRING="'+self.updatePackageFFlags(self.framework.getCompilerFlags())+'"') ++ #self.framework.popLanguage() + + if self.setCompilers.LDFLAGS: + args.append('-DCMAKE_EXE_LINKER_FLAGS:STRING="'+self.setCompilers.LDFLAGS+'"') diff --git a/products/petsc.pyconf b/products/petsc.pyconf index 778d7af..cd9a1f3 100644 --- a/products/petsc.pyconf +++ b/products/petsc.pyconf @@ -13,6 +13,7 @@ default : source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name install_dir : 'base' + patches : ["petsc-3.15-cmakeUnusedOptions.patch"] } version_3_15_0 : @@ -30,4 +31,5 @@ version_3_15_0 : source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name install_dir : 'base' + patches : ["petsc-3.15-cmakeUnusedOptions.patch"] } -- 2.39.2