ADIOS2
ADIOS2 copied to clipboard
Install.Setup in MacOS to be compatible with CMake 3.24
Cmake 3.24 deprecated some features that are used in our install tests. When CMake 3.24 is used we get the following error in the MacOS builds:
nstalling: /Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/testing/install/install/lib/cmake/adios2/adios2-config-version.cmake
-- Installing: /Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/testing/install/install/lib/cmake/adios2/adios2-config-common.cmake
-- Installing: /Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/testing/install/install/lib/cmake/adios2/adios2-targets.cmake
-- Installing: /Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/testing/install/install/lib/cmake/adios2/adios2-targets-debug.cmake
-- Installing: /Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/testing/install/install/lib/cmake/adios2/adios2-config.cmake
/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp.36ZY9sps ~/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/Testing/install
Configuring adios2-config dummy CMake project
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode_13.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode_13.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found adios2: /Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/testing/install/install/lib/cmake/adios2/adios2-config.cmake (found version "2.8.3") found components: C CXX
CMake Error at CMakeLists.txt:9 (find_package):
Found package configuration file:
/Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/testing/install/install/lib/cmake/adios2/adios2-config.cmake
but it set adios2_FOUND to FALSE so package "adios2" is considered to be
NOT FOUND. Reason given by package:
The following imported targets are referenced, but are missing: ffs::ffs
-- Configuring incomplete, errors occurred!
See also "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp.36ZY9sps/CMakeFiles/CMakeOutput.log".
See also "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp.36ZY9sps/CMakeFiles/CMakeError.log".
Failed
CMake Error at /Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/cmake/install/post/cmake_install.cmake:44 (message):
generate-adios2-config.sh returned 1, should be 0
Call Stack (most recent call first):
/Users/runner/work/ADIOS2/ADIOS2/macos11-xcode13_0-serial/cmake_install.cmake:54 (include)
CMake Error at /Users/runner/work/ADIOS2/ADIOS2/source/testing/install/run_install.cmake:15 (message):
Result of installation was 1, should be 0
We need to resolve this to keep maintaining future CMake releases.
We have temporary fixed this in https://github.com/ornladios/ADIOS2/pull/3308 by fixing the CMake used version in MacOS build to 3.23.3.
Lovely...
Lovely...
Thanks! If I do not write issues I will end up forgetting this in the future haha
@vicentebolea Thanks for creating the issue. Our CI for a downstream library using ADIOS2 appears to have hit the same problem on an Ubuntu system.
While a fix is in the works, would the following change in the ADIOS2 top level CMakeLists.txt
make sense?
$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97e68fb77..a25e3ac00 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.12...3.23)
# Fail immediately if not using an out-of-source build
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
It may not prevent the downstream issue we saw as setting the 'max' version only changes the policy behavior (https://discourse.cmake.org/t/help-with-cmake-maximum-version/2797).
@cwsmith TBF your idea is better if that was a policy issue. I am testing this in #3310.