windows: single-config/single-output directory#2211
Merged
Conversation
by enabling DEBUG_TARGET_DEPENDENCIES cmake will iterate all targets defined within core/ and write their dependency list (including transitives) and a summary of imported targets' properties into to core/debug-deps within the binary directory.
as we do not yet use this, it will only add unnecessary steps to the build that we can avoid.
Add a switch to emit all binary artifacts (i.e. programs, libraries and plugins) into a common set of directories. This simplifies testing on Windows as it works around the non-availability of rpath. This will require a few changes on the tests to work correctly, too.
As it might be helpful to be able to output binaries to a single directory (for Windows at least), the tests should be able to handle the situation when the artifacts don't land in BINARY_DIR. This patch makes use of RUNTIME_OUTPUT_DIRECTORY and LIBRARY_OUTPUT_DIRECTORY so tests work when these are different from BINARY_DIR.
previously builds for windows used a multi-configuration build. As this is a lot more complex than what we do on other platforms, we allow to do single-configuration builds, too. This will probably break multi-configuration builds (now or later), but we don't need those right now and can always fix them later.
as this fails occasionally when building parallel and we can achieve the same thing a lot more reliably by using vcpkg's dll magic, we remove this.
tune warnings flags for MSVC to be a bit more in line with what we use on GCC/Clang. Especially, ignoring conversion warnings. This should leave us with a set of warnings that we shoud actually work on.
c8e677d to
c1247b1
Compare
this is now called COMMON_OUTPUT_DIRECTORIES, which is hopefully easier to understand.
this adds an extra page that will check if the Microsoft Visual C++ Redistributable is installed and will stop the installation otherwise.
c1247b1 to
854048b
Compare
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the windows native build to instead of using a multi-configuration build just use a single-configuration build.
It also outputs all the binaries, libraries and plugins into a common directory structure, so maintaining DLL paths is easier (and can be handled by vcpkg itself).
As a result, the custom DLL copy mechanism, that failed ocassionally, can be removed and parallel build will not fail randomly anymore.
This also adds a check for MSVC Runtime in the installer.
Please check
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-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests