Fix usage of USE_RTTI flag in CMakeLists. (#9760)
Summary: By default, rocksdb release compiles with `-fno-rtti`. This causes issues when linking with other code that requires RTTI. Documentation indicate that setting the environment variable `USE_RTTI=1` when compiling rocksdb can override this behavior so that `-fno-rtti` is not used (http://rocksdb.org/blog/2017/09/28/rocksdb-5-8-released.html). However, this environment flag had no effect due to a bug in how `CMakeLists.txt` refers to `USE_RTTI`. This PR fixes this issue. Now, running `USE_RTTI=1 cmake <......>` is correctly recognized by cmake, and causes `ROCKSDB_USE_RTTI `to be defined and `-fno-rtti` not to be issued for release builds. Behavior when USE_RTTI=0 or USE_RTTI is not provided is unchanged. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9760 Reviewed By: jay-zhuang Differential Revision: D35334552 Pulled By: mrambacher fbshipit-source-id: e405fcac4e14b246642e52bc7e73b04bf143e5b6main
parent
0b81efed1d
commit
1eee99fc8c
Loading…
Reference in new issue