From 969718d176d4a99ebf5e94dfcbdd29316e651795 Mon Sep 17 00:00:00 2001 From: Paul Kuberry Date: Tue, 19 Dec 2023 06:10:16 -0500 Subject: xyce: remove CMake test for all compilers (#41679) --- .../builtin/packages/xyce/454-cmake-xyce.patch | 21 +++++++++++++ .../builtin/packages/xyce/454-oneapi-xyce.patch | 34 ---------------------- var/spack/repos/builtin/packages/xyce/package.py | 15 +++++++--- 3 files changed, 32 insertions(+), 38 deletions(-) create mode 100644 var/spack/repos/builtin/packages/xyce/454-cmake-xyce.patch delete mode 100644 var/spack/repos/builtin/packages/xyce/454-oneapi-xyce.patch diff --git a/var/spack/repos/builtin/packages/xyce/454-cmake-xyce.patch b/var/spack/repos/builtin/packages/xyce/454-cmake-xyce.patch new file mode 100644 index 0000000000..66de579579 --- /dev/null +++ b/var/spack/repos/builtin/packages/xyce/454-cmake-xyce.patch @@ -0,0 +1,21 @@ +diff --git a/cmake/tps.cmake b/cmake/tps.cmake +index 3732758f6..b3f00bb7a 100644 +--- a/cmake/tps.cmake ++++ b/cmake/tps.cmake +@@ -211,16 +211,6 @@ endif() + if (MSVC) + set(CMAKE_REQUIRED_DEFINITIONS "${Trilinos_CXX_COMPILER_FLAGS}") + endif() +-get_target_property(CMAKE_REQUIRED_LIBRARIES Teuchos::all_libs INTERFACE_LINK_LIBRARIES) +- +-# Perform an initial check to see if we can compile against Trilinos at all. +-# This could reveal compiler setup problems and/or Trilinos setup problems. +-check_include_file_cxx(Teuchos_SerialDenseMatrix.hpp Trilinos_COMPILE_SUCCESS ${OpenMP_CXX_FLAGS}) +-if (NOT Trilinos_COMPILE_SUCCESS) +- message(FATAL_ERROR "Unable to compile against Trilinos. It is possible\ +- Trilinos was not properly configured, or the environment has changed since\ +- Trilinos was installed. See the CMake log files for more information.") +-endif() + + # After the release of Trilinos 12.12.1, the abstract solver interface in NOX + # was changed to include a new method that returns solver statistics. This diff --git a/var/spack/repos/builtin/packages/xyce/454-oneapi-xyce.patch b/var/spack/repos/builtin/packages/xyce/454-oneapi-xyce.patch deleted file mode 100644 index 19def5492c..0000000000 --- a/var/spack/repos/builtin/packages/xyce/454-oneapi-xyce.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/src/LinearAlgebraServicesPKG/ksparse/alloc.c b/src/LinearAlgebraServicesPKG/ksparse/alloc.c -index 320878d7817273269e8805acaa9f6f7a252443f1..af40b7e800e5e8b573a69608aae49c324f2a0253 100644 ---- a/src/LinearAlgebraServicesPKG/ksparse/alloc.c -+++ b/src/LinearAlgebraServicesPKG/ksparse/alloc.c -@@ -53,6 +53,7 @@ Copyright 1990 Regents of the University of California. All rights reserved. - */ - - void bye_bye(i) -+ int i; - { - printf ("inv = %d\n",1/i); - } - -diff --git a/cmake/tps.cmake b/cmake/tps.cmake -index 3732758f6..b3f00bb7a 100644 ---- a/cmake/tps.cmake -+++ b/cmake/tps.cmake -@@ -211,16 +211,6 @@ endif() - if (MSVC) - set(CMAKE_REQUIRED_DEFINITIONS "${Trilinos_CXX_COMPILER_FLAGS}") - endif() --get_target_property(CMAKE_REQUIRED_LIBRARIES Teuchos::all_libs INTERFACE_LINK_LIBRARIES) -- --# Perform an initial check to see if we can compile against Trilinos at all. --# This could reveal compiler setup problems and/or Trilinos setup problems. --check_include_file_cxx(Teuchos_SerialDenseMatrix.hpp Trilinos_COMPILE_SUCCESS ${OpenMP_CXX_FLAGS}) --if (NOT Trilinos_COMPILE_SUCCESS) -- message(FATAL_ERROR "Unable to compile against Trilinos. It is possible\ -- Trilinos was not properly configured, or the environment has changed since\ -- Trilinos was installed. See the CMake log files for more information.") --endif() - - # After the release of Trilinos 12.12.1, the abstract solver interface in NOX - # was changed to include a new method that returns solver statistics. This diff --git a/var/spack/repos/builtin/packages/xyce/package.py b/var/spack/repos/builtin/packages/xyce/package.py index 743bc87085..8729a19da0 100644 --- a/var/spack/repos/builtin/packages/xyce/package.py +++ b/var/spack/repos/builtin/packages/xyce/package.py @@ -143,11 +143,18 @@ class Xyce(CMakePackage): when="@7.4:7.6 +pymi", ) - # fix oneapi issue + # fix missing type patch( - "454-oneapi-xyce.patch", - sha256="76a3ff987e43d1657f24d55cfd864b487876a72a9a7c8a37c3151a9b586a21c1", - when="%oneapi", + "https://github.com/Xyce/Xyce/commit/47d9dd04ec55cd8722cb3704a88beb228dfcf363.patch?full_index=1", + sha256="62c3d0c17b3225be5f61b6ec3d9cf762cc08bb20a80e768d87a37e87c522bbf1", + when="@:7.7", + ) + + # fix cmake trilinos test issue + patch( + "454-cmake-xyce.patch", + sha256="4d47cd1f10607205e64910ac124c6dd329f1ecbf861416e9da24a1736f2149ff", + when="@7.6:", ) def cmake_args(self): -- cgit v1.2.3-60-g2f50