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

Missing documentation how to build without RTTI #117

Open
rizsotto opened this issue Apr 17, 2020 · 3 comments
Open

Missing documentation how to build without RTTI #117

rizsotto opened this issue Apr 17, 2020 · 3 comments

Comments

@rizsotto
Copy link
Contributor

The wiki/FAQ mentions that it's possible to build the library without RTTI. But the wiki/Install page does not give clear guidance how to achieve that.

I've been trying to these flags without success:

  • -DFRUIT_ADDITIONAL_CXX_FLAGS:STRING="-fno-exceptions -fno-rtti" I saw this in the main CMakeList.txt, but looks like it's not used when the compiler is checked.
  • -DFRUIT_COMPILE_FLAGS:STRING="-fno-exceptions -fno-rtti" I've found this in configuration/CMakeLists.txt where it assigns to CMAKE_REQUIRED_FLAGS before runs the compiler checks.

What would be the right way to disable it?

@poletti-marco
Copy link
Contributor

poletti-marco commented Apr 17, 2020 via email

@rizsotto
Copy link
Contributor Author

Thanks, it made it. But I could do only the -lno-rtti passed. If I'm specifying multiple flags, it starts to separate it by semicolon. Do you know how to pass multiple flags?

-DCMAKE_CXX_FLAGS:STRING=-fno-exception -fno-rtti makes the compiler call as c++ -fno-exception; -fno-rtti ..... Keep it together in a quote (like -DCMAKE_CXX_FLAGS:STRING="-fno-exception -fno-rtti") is also failing with c++ ;-no-exception;-fno-rtti ....

I'm using ExternalProject_Add and the CMAKE_CACHE_ARGS is the section expects the variables tagged with STRING (or one of these types).

@poletti-marco
Copy link
Contributor

poletti-marco commented Apr 18, 2020 via email

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