What's wrong with my cmake?

Jefuty258

Zhi Zheng
New Member
What version of the code are you using?
cesm2.2.2


Have you made any changes to files in the source tree?
As attached files including .xml, see machine 'zhiz'


Describe every step you took leading up to the problem:
./create_newcase --case heavyrain.FCSD.f09_f09_mg17 --compset FCSD --res f09_f09_mg17 , ./case.setup, ./case.build


Describe your problem or question:
When building, pio.bldlog.*date* shows some problem with my cmake. My cmake version is 4.0.0. More information see my attachment.
 

Attachments

mlevy

Michael Levy
CSEG and Liaisons
Staff member
CMake version 4 was recently released, and requires much higher versions for the cmake_minimum_required variable in CMake file lists. I think you have two options:

1. install an older version of CMake (I believe 3.31 is the last of the CMake 3 versions)
2. Tell the PIO build system it's okay to use CMake 4 (I haven't tested this, you might find actual incompatibilities between the CMake configuration for PIO and what version 4 expects). There are two ways I can think of to do this -- you probably want to update cime/scripts/Tools/Makefile to add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to CMAKE_OPTS (see line 731), or you can update cime/src/externals/pio1/pio/CMakeLists.txt to change CMAKE_MINIMUM_REQUIRED in line 8. The latter approach will likely lead to errors from other CMakeLists.txt while the former should be applied every time cmake is invoked via the CESM makefile. As I mentioned, it's entirely possible that we use CMake options that were deprecated late in the version 3 development cycle and removed from version 4... unfortunately I'm having trouble testing this because the machines I typically use all point to a pre-built version of PIO...
 
Vote Upvote 0 Downvote
Back
Top