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

Cmake ignores the list of optimization options and chooses only the last item in the list #2548

Closed
med-ayssar opened this issue Nov 30, 2022 · 1 comment · Fixed by #2551
Closed

Comments

@med-ayssar
Copy link
Contributor

med-ayssar commented Nov 30, 2022

Describe the bug
Calling cmake with -Dwith-optimize="item1;item2;...;itemn", only selects the last item in the list, and the other items will be ignored.

@terhorstd
Copy link
Contributor

actually it works in master when using quotes and spaces -Dwith-optimize="-O1 -O2", only the documentation as given in CMakeLists.txt hints at a non-existing functionality concatenating options with ;.

set( with-optimize ON CACHE STRING "Enable user defined optimizations [default=ON (uses '-O2')]. When OFF, no '-O' flag is passed to the compiler. Explicit compiler flags can be given; separate multiple flags by ';'." )

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 a pull request may close this issue.

2 participants