Skip to content

cmake: put generated files into CMAKE_BINARY_DIR#1707

Merged
BareosBot merged 15 commits intomasterfrom
dev/arogge/master/generate-to-bindir
Mar 12, 2024
Merged

cmake: put generated files into CMAKE_BINARY_DIR#1707
BareosBot merged 15 commits intomasterfrom
dev/arogge/master/generate-to-bindir

Conversation

@arogge
Copy link
Member

@arogge arogge commented Feb 6, 2024

This PR strives to move as much of the files generated by cmake into the CMAKE_BINARY_DIR instead of putting them into the source tree.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
  • PR 67 in the CD repository is merged
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@arogge arogge force-pushed the dev/arogge/master/generate-to-bindir branch from e71a697 to 4d59085 Compare February 6, 2024 15:31
@arogge arogge marked this pull request as ready for review February 7, 2024 14:19
@bruno-at-bareos
Copy link
Contributor

bruno-at-bareos commented Feb 8, 2024

Don't we want to also move the generated part of the webui ?
In .gitignore

# webui
webui/config/autoload/global.php
webui/install/configuration.ini
webui/install/directors.ini
webui/module/Application/view/layout/layout.phtml
webui/module/Application/view/layout/login.phtml
webui/tests/regress/webui-bsock-connection-test
webui/tests/regress/webui-bsock-connection-test-tls
webui/tests/regress/webui-bsock-connection-test-tls.php
webui/version.php

@pstorz pstorz self-requested a review February 13, 2024 11:01
@pstorz pstorz self-assigned this Feb 13, 2024
@pstorz pstorz changed the title Put cmake generated files into CMAKE_BINARY_DIR cmake: put generated files into CMAKE_BINARY_DIR Feb 27, 2024
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please resolve conflict.

@sebsura sebsura force-pushed the dev/arogge/master/generate-to-bindir branch from 4d59085 to f3f33be Compare March 11, 2024 09:59
@sebsura
Copy link
Contributor

sebsura commented Mar 11, 2024

I fixed the conflict.

@sebsura sebsura force-pushed the dev/arogge/master/generate-to-bindir branch from f3f33be to 7288f34 Compare March 11, 2024 10:41
@pstorz pstorz self-requested a review March 11, 2024 13:06
arogge and others added 15 commits March 12, 2024 07:38
instead of just configuring a lot of files this now allows to configure
specific files or globbed files either into the source tree or (by
default) into the binary directory.
Instead of configuring all .in files, the CMakeLists now configure only
the files they need and put those in the output directory
Instead of configuring all .in files, the CMakeLists now configure only
the files they need and put those in the output directory
those files should be ignored with a per-user and not a per-project
gitignore (i.e. in ~/.config/git/ignore).
we now configure the core/src/tests/configs directory into the binary
tree to not pollute the source tree.
This required some changes to the tests, as the configuration is now
loaded using a relative path.
Previously all to-be-installed configuration files were taken from the
source tree. As some of them need to be configured we stage all
configuration files in the binary dir during configuration first and
install from there.
Instead of just generating all the files for the debian build into the
debian directory, we now generate them into CMAKE_BINARY_DIR and only
copy them when the generate-debian-control target is built (that already
regenerates the main control file).
@BareosBot BareosBot force-pushed the dev/arogge/master/generate-to-bindir branch from 658ca41 to 6f202e7 Compare March 12, 2024 07:38
@BareosBot BareosBot merged commit c42bd31 into master Mar 12, 2024
@BareosBot BareosBot deleted the dev/arogge/master/generate-to-bindir branch March 12, 2024 07:38
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