From a53e75f1d8fee37473a255e17ed66ec3285775a1 Mon Sep 17 00:00:00 2001 From: Pramod Kumbhar Date: Mon, 8 Mar 2021 09:53:28 +0100 Subject: [PATCH] Fix the build issues and tests on Apple M1 (#1053) * Fix the build issues and tests on Apple M1 * catch submodule updated to latest release to support apple m1 build * FindMPI.cmake breaks compatibility with latest cmake version. See #1052. Fixes #1052 Fixes #1033 --- external/catch2 | 2 +- test/external/CMakeLists.txt | 12 ++++++++++++ test/external/ringtest/CMakeLists.txt | 3 --- test/external/testcorenrn/CMakeLists.txt | 2 -- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/external/catch2 b/external/catch2 index 930f49a641..de6fe184a9 160000 --- a/external/catch2 +++ b/external/catch2 @@ -1 +1 @@ -Subproject commit 930f49a641aa6a495d264d7b5e7c007734da0b0c +Subproject commit de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad diff --git a/test/external/CMakeLists.txt b/test/external/CMakeLists.txt index 244f0e84a0..f9ff98432d 100644 --- a/test/external/CMakeLists.txt +++ b/test/external/CMakeLists.txt @@ -1,5 +1,17 @@ # # Add tests based on external repositories # + +# FindMPI broke backward compatibility with v3.19 +if(${CMAKE_VERSION} VERSION_LESS "3.10") + get_filename_component(MPIEXEC_NAME ${MPIEXEC} NAME) +else() + get_filename_component(MPIEXEC_NAME ${MPIEXEC_EXECUTABLE} NAME) +endif() + +# To work around CI failures that seem related to #894 we should run `mpiexec` not +# `/path/to/mpiexec` +set(MPIEXEC_NAME ${MPIEXEC_NAME}) + add_subdirectory(ringtest) add_subdirectory(testcorenrn) diff --git a/test/external/ringtest/CMakeLists.txt b/test/external/ringtest/CMakeLists.txt index 529cad3536..5d75e9f33e 100644 --- a/test/external/ringtest/CMakeLists.txt +++ b/test/external/ringtest/CMakeLists.txt @@ -20,9 +20,6 @@ nrn_add_test( COMMAND special -python ringtest.py -tstop 100 OUTPUT asciispikes::spk1.std) -# To work around CI failures that seem related to #894 we should run `mpiexec` not -# `/path/to/mpiexec` -get_filename_component(MPIEXEC_NAME ${MPIEXEC} NAME) nrn_add_test( GROUP external_ringtest NAME neuron_mpi diff --git a/test/external/testcorenrn/CMakeLists.txt b/test/external/testcorenrn/CMakeLists.txt index d6b10c1d0b..831217d6fb 100644 --- a/test/external/testcorenrn/CMakeLists.txt +++ b/test/external/testcorenrn/CMakeLists.txt @@ -31,8 +31,6 @@ set(test_vecplay_neuron_requirements mod_compatibility) set(test_gf_coreneuron_cpu_conflicts gpu) # CoreNEURON-on-CPU test conflicts with GPU being enabled # in the build -get_filename_component(MPIEXEC_NAME ${MPIEXEC} NAME) - if(${CORENRN_ENABLE_GPU}) set(gpu_args_online -c arg_coreneuron_gpu=1) set(gpu_args_offline --gpu)