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

Fix cmake warnings #641

Merged
merged 5 commits into from
Mar 23, 2024
Merged

Fix cmake warnings #641

merged 5 commits into from
Mar 23, 2024

Conversation

zzam
Copy link
Contributor

@zzam zzam commented Mar 23, 2024

Fixes:

  • Some warnings of cmake.
  • A dependency issue with the generated version-generated.h file: Dependent files have not been rebuilt at first call of ninja.

Fixes this warning:
  CMake Warning (dev) at CMakeLists.txt:52 (project):
    cmake_minimum_required() should be called prior to this top-level project()
    call.  Please see the cmake-commands(7) manual for usage documentation of
    both commands.
  This warning is for project developers.  Use -Wno-dev to suppress it.
cmake-3.5 was released in 2016
The change removes this warning from the build-process:
  CMake Deprecation Warning at CMakeLists.txt:52 (cmake_minimum_required):
    Compatibility with CMake < 3.5 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.
When building stratagus the header version-generated.h is written.
Without modification running ninja again to compile, some files
are rebuilt as they depend on version-generated.h.

This happens as cmake did not know that the file was re-generated.
This is already done by add_custom_target
@Jarod42 Jarod42 merged commit c536f3d into Wargus:master Mar 23, 2024
3 checks passed
@zzam zzam deleted the cmake-warnings branch March 23, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants