Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JonnyPtn
Copy link
Contributor

Overriding the global CMAKE_RUNTIME_OUTPUT_DIRECTORY variable so that every binary goes into the same folder is intrusive, unintuitive, and can cause a variety of unnecessary complications

My understanding is this was only done so that windows dlls can be loaded for the examples/tests, but it's simple enough to do that in a target and platform specific way that leaves the standard output structure untouched.

Had to modify the mesa3d stuff to accommodate this, which also removed the functionality to remove the mesa3d dlls when disabling the option, but given it's just a workaround for CI jobs (where this behaviour would never be used) I think the impact of this is negligible - I could make it work with some more hacks but in my opinion it's not worth it for something that maintaners/developers may only do once in a blue moon (you can just do a clean build instead when disabling the option)

A big motivation for this is mobile/console ports, where the output is often more than just a simple binary, and involves specific folder structures that are difficult (or impossible) to manage when every target is trying to work with the same output folder

@JonnyPtn
Copy link
Contributor Author

Test failure is a good example of the issues sharing an output directory can cause - As the tests still share an output directory (by virtue of being in the same CMakeLists) there's a race condition as each target tries to update files in the output folder when building in parallel

Seems like they should just use separate cmakelists as we do in the rest of the project (and is generally good practice) - Have made that change in #3573

@JonnyPtn
Copy link
Contributor Author

#2745 is another issue caused by this setting, and would be superseded by this change

@eXpl0it3r
Copy link
Member

SFMLBuildMaster: Build this please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants