Skip to content

Commit

Permalink
Rename define
Browse files Browse the repository at this point in the history
  • Loading branch information
chusitoo committed Jan 8, 2022
1 parent af5da58 commit a602620
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SET(CMAKE_CXX_STANDARD 11)
PROJECT(Flatbush VERSION 1.0.0 LANGUAGES CXX)

if(CMAKE_CXX_STANDARD LESS 20)
ADD_DEFINITIONS(-DMINIMAL_SPAN)
ADD_DEFINITIONS(-DFLATBUSH_SPAN)
endif()

SET(UNIT_TESTS unit_test)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ auto other = FlatbushBuilder<double>::from(&buffer[0]);
## Compiling
This is a single header library with the aim to support C++11 and up.

If the target compiler does not have support for C++20 features, namely the ```<span>``` header, a minimalistic implementation is available if **MINIMAL_SPAN** flag is defined.
If the target compiler does not have support for C++20 features, namely the ```<span>``` header, a minimalistic implementation is available if **FLATBUSH_SPAN** flag is defined.

### Unit tests

Expand All @@ -96,15 +96,15 @@ ctest -C Release

#### Standalone
```shell
gcc test.cpp -lstdc++ -Wall -O2 -DMINIMAL_SPAN -o test && ./test
gcc test.cpp -lstdc++ -Wall -O2 -DFLATBUSH_SPAN -o test && ./test
```

```shell
clang++ -Wall -O2 -DMINIMAL_SPAN -o test test.cpp && ./test
clang++ -Wall -O2 -DFLATBUSH_SPAN -o test test.cpp && ./test
```

```shell
cl /EHsc /O2 /DMINIMAL_SPAN test.cpp && .\test.exe
cl /EHsc /O2 /DFLATBUSH_SPAN test.cpp && .\test.exe
```

## Performance
Expand Down
4 changes: 2 additions & 2 deletions flatbush.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SOFTWARE.
#include <type_traits>
#include <vector>

#ifndef MINIMAL_SPAN
#ifndef FLATBUSH_SPAN
#include <span>
namespace flatbush {
using std::span;
Expand Down Expand Up @@ -91,7 +91,7 @@ namespace flatbush {
};

}
#endif // MINIMAL_SPAN
#endif // FLATBUSH_SPAN

namespace flatbush {

Expand Down

0 comments on commit a602620

Please sign in to comment.