Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cmake mimimum required to something more recent (or remove) #1263

Closed
jphickey opened this issue Jun 28, 2022 · 1 comment · Fixed by #1264, #1267 or #1268
Closed

Update cmake mimimum required to something more recent (or remove) #1263

jphickey opened this issue Jun 28, 2022 · 1 comment · Fixed by #1264, #1267 or #1268

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The cmake_minimum_required command currently lists a very old version. In fact some of the CFE/CFS build scripts assume at least version 3.5 to support things like target-specific includes and flags.

Notably, when using a recent version of cmake (e.g. 3.20) this generates a warning that says:

CMake Deprecation Warning at /home/jphickey/code/cfecfs/dtn/osal/src/unit-test-coverage/CMakeLists.txt:18 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

Describe the solution you'd like
Update the cmake_minimum_version to 3.5 (this would match CFE)

Additional context
In this case the OSAL main project currently lists 2.8.12 so it does not generate a warning here (unlike some other modules which specified 2.6.4) but the "unit-test-coverage" submodule is where the problem lies.

However, in this case, as this is just added as a subdirectory from the main build - it probably does not need a separate minimum_version at all. Suggestion would be to remove this line, it will inherit the minimum version from the top level project.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

jphickey added a commit to jphickey/osal that referenced this issue Jun 28, 2022
Remove the extra/unneded cmake_minimum_required that was triggering
a deprecation warning.  This will just inherit the minimum version
of the parent.
@skliper
Copy link
Contributor

skliper commented Jul 5, 2022

Note the base osal CMakeLists.txt won't trigger the warning yet, but it should probably be 3.5:

cmake_minimum_required(VERSION 2.8.12)

skliper added a commit to skliper/osal that referenced this issue Jul 5, 2022
dzbaker added a commit that referenced this issue Jul 6, 2022
dzbaker added a commit that referenced this issue Jul 6, 2022
Fix #1263, Update minimum required cmake version
@skliper skliper added this to the Draco milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment