Skip to content

style(cmake): remove redundant conditions from endif/endfunction/endmacro/endforeach - #10707

Merged
mgallien merged 4 commits into
nextcloud:masterfrom
artyom-fedosov:improvement/remove-redundant-cmake-code
Sep 2, 2026
Merged

style(cmake): remove redundant conditions from endif/endfunction/endmacro/endforeach#10707
mgallien merged 4 commits into
nextcloud:masterfrom
artyom-fedosov:improvement/remove-redundant-cmake-code

Conversation

@artyom-fedosov

Copy link
Copy Markdown
Contributor
  • Removed conditions repeated in endif()/endforeach()/endmacro()/endfunction() calls
  • Removed the explicit cmake_policy(SET CMP0071 NEW) call
  • Changed the value of CMAKE_CXX_STANDARD_REQUIRED to 20 instead of ON
  • Removed a duplicated COMPONENTS keyword in find_package

@Rello

Rello commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Hello,

can you please leave a note on the why?
thank you

@Rello Rello added the needs info User feedback is required. Will be closed if not responded. label Sep 1, 2026
@artyom-fedosov

Copy link
Copy Markdown
Contributor Author

Hello,

can you please leave a note on the why?
thank you

Hello,

Explanations for each change are in the individual commit messages. At a high level: I removed legacy CMake constructs to improve readability and fixed a couple of small bugs.

@github-actions github-actions Bot removed the needs info User feedback is required. Will be closed if not responded. label Sep 2, 2026
@camilasan

Copy link
Copy Markdown
Member

@artyom-fedosov thanks for the contribution. Next time use the PR template, it is there for a reason. That is where you should give us an overview of why the changes.
There is also a check list in them that you need go through.

…acro/endforeach

Repeating the opening command's arguments in closing commands is a legacy CMake requirement dropped since CMake 3.13. Since the project requires CMake at least 3.16, the arguments are unnecessary.

Signed-off-by: artyom-fedosov <artjomsfedosovs2@gmail.com>
CMAKE_CXX_STANDARD_REQUIRED expects a boolean  not a standard version number

Signed-off-by: artyom-fedosov <artjomsfedosovs2@gmail.com>
cmake_minimum_required(VERSION 3.16) already implies NEW behavior for CMP0071

Signed-off-by: artyom-fedosov <artjomsfedosovs2@gmail.com>
Signed-off-by: artyom-fedosov <artjomsfedosovs2@gmail.com>
@mgallien
mgallien force-pushed the improvement/remove-redundant-cmake-code branch from e000f42 to 5ef182c Compare September 2, 2026 12:34
@mgallien
mgallien enabled auto-merge September 2, 2026 12:34
@mgallien
mgallien merged commit 5745792 into nextcloud:master Sep 2, 2026
18 of 19 checks passed
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10707.zip

Digest: sha256:be5441b3955daa2910748db1bf745ca36427396c353789301d09e4cd72ada7c7

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

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.

5 participants