From d2fc7b9f7d3e738ee14001581d5f69d7897bf86a Mon Sep 17 00:00:00 2001 From: AMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com> Date: Thu, 12 May 2022 00:47:47 +0530 Subject: [PATCH] lammps: updating googletest version to 1.11 to avoid GTEST_DISALLOW_ASSIGN_Error (#30563) * updating googletest version to 1.11 to avoid GTEST_DISALLOW_ASSIGN_ error * limiting the version scope * modified the version limit Co-authored-by: mohan babu --- .../builtin/packages/lammps/gtest_fix.patch | 18 ++++++++++++++++++ .../repos/builtin/packages/lammps/package.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lammps/gtest_fix.patch diff --git a/var/spack/repos/builtin/packages/lammps/gtest_fix.patch b/var/spack/repos/builtin/packages/lammps/gtest_fix.patch new file mode 100644 index 0000000000..1f14fb4e6b --- /dev/null +++ b/var/spack/repos/builtin/packages/lammps/gtest_fix.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/Modules/GTest.cmake b/cmake/Modules/GTest1.cmake +index 0c62291..e42137b 100644 +--- a/cmake/Modules/GTest.cmake ++++ b/cmake/Modules/GTest1.cmake +@@ -7,11 +7,11 @@ else() + endif() + + include(ExternalProject) +-set(GTEST_URL "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" CACHE STRING "URL for GTest tarball") ++set(GTEST_URL "https://github.com/google/googletest/archive/release-1.11.0.tar.gz" CACHE STRING "URL for GTest tarball") + mark_as_advanced(GTEST_URL) + ExternalProject_Add(googletest + URL ${GTEST_URL} +- URL_MD5 ecd1fa65e7de707cd5c00bdac56022cd ++ URL_MD5 e8a8df240b6938bb6384155d4c37d937 + SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest-src" + BINARY_DIR "${CMAKE_BINARY_DIR}/gtest-build" + CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_GTEST_OPTS} diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index fabf745a44..adcd018eac 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -175,6 +175,7 @@ def url_for_version(self, version): patch("lib.patch", when="@20170901") patch("660.patch", when="@20170922") + patch("gtest_fix.patch", when="@:20210310 %aocc@3.2.0") patch("https://github.com/lammps/lammps/commit/562300996285fdec4ef74542383276898555af06.patch?full_index=1", sha256="e6f1b62bbfdc79d632f4cea98019202d0dd25aa4ae61a70df1164cb4f290df79", when="@20200721 +cuda")