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

Specify CMake generator in build scripts #40

Open
kkartaltepe opened this issue May 15, 2023 · 3 comments
Open

Specify CMake generator in build scripts #40

kkartaltepe opened this issue May 15, 2023 · 3 comments

Comments

@kkartaltepe
Copy link

Currently update_external_sources.sh::build_glslang in the decoder project does not specify a generator and assumes the user has not configured an alternative default (a relatively new feature in CMake).

It would help to avoid issues to specify the generator explicitly with -G "Unix Makefiles" (similar to build_shaderrc) when you do not use the generator aware cmake build wrapper functions.

@zlatinski
Copy link
Contributor

Hi kkartaltepe, currently shaderrc is built using the Ninja generator. Would you like for us to change this to GnuMake, as well?

@kkartaltepe
Copy link
Author

kkartaltepe commented Mar 29, 2024

This bug is not about the chosen build generator, only making your own choices work on other people's machines.

If you hardcode the generator into your script, you should also hard code the generator into your cmake calls. This way your script works when the default on my machine is not the default on your machine.

@kkartaltepe
Copy link
Author

For example,

https://github.com/nvpro-samples/vk_video_samples/blob/main/vk_video_decoder/update_external_sources.sh#L87

Correctly specifies -G Ninja and then hardcodes calls to ninja.

https://github.com/nvpro-samples/vk_video_samples/blob/main/vk_video_decoder/update_external_sources.sh#L58

Incorrectly creates using the default generator, and then hardcodes calls to make. This is often found in legacy cmake code prior to the introduction of configuration default generators and the generator aware cmake --build command line.

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

No branches or pull requests

2 participants