fix README

This commit is contained in:
ado 2021-02-07 15:46:03 +01:00
parent 8684114ad1
commit cf3469361c

View File

@ -8,7 +8,7 @@ Function traits taken from [qt-creator](https://code.woboq.org/qt5/qt-creator/sr
# Example # Example
Lets say we have a csv file containing students in a given format (NAME,AGE,GRADE) and we want to parse and print all the valid values: Lets say we have a csv file containing students in a given format (NAME,AGE,GRADE) and we want to parse and print all the valid values:
``` ```shell
$ cat students.csv $ cat students.csv
James Bailey,65,2.5 James Bailey,65,2.5
Brian S. Wolfe,40,1.9 Brian S. Wolfe,40,1.9
@ -38,7 +38,7 @@ int main() {
} }
``` ```
And if we compile and execute the program we get the following output: And if we compile and execute the program we get the following output:
``` ```shell
$ ./a.out $ ./a.out
James Bailey 65 2.5 James Bailey 65 2.5
Brian S. Wolfe 40 1.9 Brian S. Wolfe 40 1.9
@ -61,13 +61,15 @@ Bill (Heath) Gates 65 3.3
# Installation # Installation
```shell
$ git clone https://github.com/red0124/ssp $ git clone https://github.com/red0124/ssp
$ cd ssp $ cd ssp
$ cmake --configure . $ cmake --configure .
$ sudo make install $ sudo make install
```
*Note, this will also install the fast_float library* *Note, this will also install the fast_float library*
The library supports [CMake](#Cmake) and [meson](#Meson) build systems The library supports [CMake](#Cmake) and [meson](#Meson) build systems
# Usage # Usage
@ -389,11 +391,11 @@ int num = c.convert<int>(s.c_str());
# CMake # CMake
If you have the repository cloned in your CMake project, simply add it: If you have the repository cloned in your CMake project, simply add it:
``` ```cmake
add_subdirectory(ssp) add_subdirectory(ssp)
``` ```
Othervise, you can fetch it from the repository: Othervise, you can fetch just it from the repository:
``` ```cmake
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
ssp ssp
@ -404,7 +406,7 @@ FetchContent_Declare(
FetchContent_MakeAvailable(ssp) FetchContent_MakeAvailable(ssp)
``` ```
Either way, after you prepare the target, you just have to invoke it in your project: Either way, after you prepare the target, you just have to invoke it in your project:
``` ```cmake
target_link_libraries(project PUBLIC ssp) target_link_libraries(project PUBLIC ssp)
``` ```
# Meson # Meson