From b38bea09ea49e62617617ed66966c0d760718eca Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Wed, 26 Jul 2023 12:07:42 +0200 Subject: [PATCH] [icx] ** COMPLETE ICX ** manually copy the latest makefiles with epoch1/epoch2 fixes to the other 13 processes for f in $(gitls */SubProcesses/cudacpp.mk); do \cp gg_tt.mad/SubProcesses/cudacpp.mk $f; done for f in $(gitls */test/cudacpp_test.mk); do \cp gg_tt.mad/test/cudacpp_test.mk $f; done --- .../ee_mumu.mad/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/ee_mumu.mad/test/cudacpp_test.mk | 24 ++++++------------- .../ee_mumu.sa/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/ee_mumu.sa/test/cudacpp_test.mk | 24 ++++++------------- .../cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk | 14 ++++++----- epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk | 24 ++++++------------- .../gg_tt01g.mad/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/gg_tt01g.mad/test/cudacpp_test.mk | 24 ++++++------------- .../gg_ttg.mad/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/gg_ttg.mad/test/cudacpp_test.mk | 24 ++++++------------- .../cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk | 14 ++++++----- epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk | 24 ++++++------------- .../gg_ttgg.mad/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/gg_ttgg.mad/test/cudacpp_test.mk | 24 ++++++------------- .../gg_ttgg.sa/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/gg_ttgg.sa/test/cudacpp_test.mk | 24 ++++++------------- .../gg_ttggg.mad/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/gg_ttggg.mad/test/cudacpp_test.mk | 24 ++++++------------- .../gg_ttggg.sa/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/gg_ttggg.sa/test/cudacpp_test.mk | 24 ++++++------------- .../gq_ttq.mad/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/gq_ttq.mad/test/cudacpp_test.mk | 24 ++++++------------- .../cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk | 14 ++++++----- epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk | 24 ++++++------------- .../heft_gg_h.sa/SubProcesses/cudacpp.mk | 14 ++++++----- .../cudacpp/heft_gg_h.sa/test/cudacpp_test.mk | 24 ++++++------------- 26 files changed, 195 insertions(+), 299 deletions(-) diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk b/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk b/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk b/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk b/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest - diff --git a/epochX/cudacpp/heft_gg_h.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/heft_gg_h.sa/SubProcesses/cudacpp.mk index 88db44c517..43cee0977e 100644 --- a/epochX/cudacpp/heft_gg_h.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/heft_gg_h.sa/SubProcesses/cudacpp.mk @@ -41,15 +41,17 @@ INCFLAGS += -I../../src # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) +override CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) +override CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) else -CXXNAME = unknown +override CXXNAME = unknown endif ###$(info CXXNAME=$(CXXNAME)) +override CXXNAMESUFFIX = _$(CXXNAME) +export CXXNAMESUFFIX # Dependency on test directory # Within the madgraph4gpu git repo: by default use a common gtest installation in /test (optionally use an external or local gtest) @@ -62,10 +64,10 @@ ifneq ($(wildcard $(GTEST_ROOT)),) TESTDIR = else ifneq ($(LOCALGTEST),) TESTDIR=$(TESTDIRLOCAL) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else ifneq ($(wildcard ../../../../../epochX/cudacpp/CODEGEN),) TESTDIR = $(TESTDIRCOMMON) -GTEST_ROOT = $(TESTDIR)/googletest/install_$(CXXNAME) +GTEST_ROOT = $(TESTDIR)/googletest/install$(CXXNAMESUFFIX) else TESTDIR = endif diff --git a/epochX/cudacpp/heft_gg_h.sa/test/cudacpp_test.mk b/epochX/cudacpp/heft_gg_h.sa/test/cudacpp_test.mk index 19b75f7d95..39ed957600 100644 --- a/epochX/cudacpp/heft_gg_h.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/heft_gg_h.sa/test/cudacpp_test.mk @@ -6,22 +6,13 @@ THISDIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Compiler-specific googletest build directory (#125 and #738) -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html -ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) -CXXNAME = icpx$(shell $(CXX) --version | head -1 | cut -d' ' -f5) -else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -CXXNAME = clang$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else ifneq ($(shell $(CXX) --version | grep '^g++ (GCC)'),) -CXXNAME = gcc$(shell $(CXX) --version | head -1 | cut -d' ' -f3) -else -CXXNAME = unknown -endif -$(info CXXNAME=$(CXXNAME)) -BUILDDIR = build_$(CXXNAME) -$(info BUILDDIR=$(BUILDDIR)) -INSTALLDIR = install_$(CXXNAME) -$(info INSTALLDIR=$(INSTALLDIR)) +# In epochX, CXXNAMESUFFIX=_$(CXXNAME) is exported from cudacpp.mk +# In epoch1/epoch2, CXXNAMESUFFIX is undefined +$(info CXXNAMESUFFIX=$(CXXNAMESUFFIX)) +BUILDDIR = build$(CXXNAMESUFFIX) +###$(info BUILDDIR=$(BUILDDIR)) +INSTALLDIR = install$(CXXNAMESUFFIX) +###$(info INSTALLDIR=$(INSTALLDIR)) CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 @@ -47,4 +38,3 @@ googletest/$(INSTALLDIR)/lib64/libgtest.a: googletest/$(BUILDDIR)/lib/libgtest.a clean: rm -rf googletest -