fix cmake support for ROCKSDB_LITE
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev
### Expected behavior
When setting `ROCKSDB_LITE=On` in cmake, the compiler should be passed one `-O` flag (probably `-Os`?) regardless of the `CMAKE_BUILD_TYPE`.
### Actual behavior
Multiple `-O` flags may be passed, while only the last one takes effect. This results in unpredictable behavior.
### Steps to reproduce the behavior
```
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DROCKSDB_LITE=On && make -j48 VERBOSE=1 db_bench
...
[ 2%] Building CXX object CMakeFiles/rocksdb-shared.dir/cache/cache.cc.o
/bin/c++ ... -Os -O2 ...
...
```
Contributor guide
Assessment
This issue has not been assessed yet.