add ability to use the library as cmake subdirectory #9

This commit is contained in:
2019-05-06 22:47:29 +07:00
parent 82e67e7300
commit be0e43857d
10 changed files with 81 additions and 14406 deletions

View File

@@ -25,7 +25,25 @@
## Installation
[flat.hpp][flat] is a header only library. All you need to do is copy the header files (`flat_set.hpp` and `flat_map.hpp`) into your project and include them.
[flat.hpp][flat] is a header-only library. All you need to do is copy the headers files from `headers` directory into your project and include them:
```cpp
#include "flat_hpp/flat_set.hpp"
using namespace flat_hpp;
int main() {
flat_set<int> s;
s.insert(42);
return 0;
}
```
Also, you can add the root repository directory to your [cmake](https://cmake.org) project:
```cmake
add_subdirectory(external/flat.hpp)
target_link_libraries(your_project_target flat.hpp)
```
## API
- [Flat Set](#flat-set)