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

BUILD_HEADLESS option with "ON" or "TRUE" value has no effect #24

Closed
JosiahWI opened this issue Jan 12, 2023 · 0 comments
Closed

BUILD_HEADLESS option with "ON" or "TRUE" value has no effect #24

JosiahWI opened this issue Jan 12, 2023 · 0 comments

Comments

@JosiahWI
Copy link

Summary

The source code checks for headless mode with #if BUILD_HEADLESS. This define is set by CMake to be equal to the value of the BUILD_HEADLESS CMake option, but this is incorrect. CMake options accept "ON" or "TRUE" as truthy values, but the C++ preprocessor does not. CMake should define the symbol, and it should be checked in the C++ source with #ifdef BUILD_HEADLESS.

Steps to reproduce
cmake -S . -B build_issue_24_repro -DBUILD_HEADLESS=ON -DENABLE_SOUND=FALSE
./hacking_testing/compile_proto.sh
cmake --build build_issue_24_repro
./hacking_testing/test_loop.py

When the preceding steps are executed, you should see that the window is still there with all the normal graphics, indicating that the option had no effect.

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

1 participant