Skip to content

Commit fcd2cf2

Browse files
authored
Merge pull request #33 from lemire/dlemire/betterdocsforvs
Better documentation for visual studio
2 parents e4c7ee5 + be09da3 commit fcd2cf2

File tree

3 files changed

+56
-8
lines changed

3 files changed

+56
-8
lines changed

.github/workflows/visualstudio.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: VisualStudio
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
GeneralTest:
7+
runs-on: windows-latest
8+
9+
steps:
10+
11+
- uses: actions/checkout@v2
12+
13+
- name: Enable Developer Command Prompt
14+
uses: ilammy/[email protected]
15+
16+
- name: Invoking makefile
17+
run: nmake -f .\makefile.vc
18+
19+
- name: Run Test Program
20+
run: .\unit.exe
21+
22+
- name: Run Example Program
23+
run: .\example.exe

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,29 @@ Simple demo
3939

4040
Check out example.cpp
4141

42-
You can run it like so:
43-
44-
```
45-
make example
46-
./example
47-
```
42+
You can run it like so (e.g., under Linux or macOS):
4843

4944

50-
Usage
45+
Usage (Linux, macOS and similar systems)
5146
------------------------
5247

5348
```
5449
make
5550
./unit
5651
```
5752

53+
A static library file is built as `libSIMDCompressionAndIntersection.a` which you can use in your
54+
own projects along with our header files located in the `include` subdirectory.
55+
56+
You may also build and run our example:
57+
58+
59+
```
60+
make example
61+
./example
62+
```
63+
64+
5865
To run tests, you can do
5966
```
6067
./testcodecs
@@ -63,6 +70,24 @@ To run tests, you can do
6370
(follow the instructions)
6471

6572

73+
74+
Usage (Windows users)
75+
------------------------
76+
77+
Windows users wishing to build using Visual Studio should go into a Developer Powershell, which is
78+
accessible through the menus in the Visual Studio interface, and run the following from the
79+
directory of the project:
80+
81+
```
82+
nmake -f .\makefile.vc
83+
.\example.exe
84+
.\unit.exe
85+
```
86+
87+
Under Windows, the static library is built as the file `simdcomp_a.lib` which you can use in your
88+
own projects, along with our header files located in the `include` subdirectory.
89+
90+
6691
For a simple C library
6792
----------------------
6893

makefile.vc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LDFLAGS = /nologo /LTCG /DYNAMICBASE /incremental:no /debug /opt:ref,icf
3030
LIB_OBJS = codecfactory.obj bitpacking.obj integratedbitpacking.obj simdbitpacking.obj usimdbitpacking.obj simdintegratedbitpacking.obj intersection.obj varintdecode.obj streamvbyte.obj simdpackedsearch.obj simdpackedselect.obj frameofreference.obj for.obj
3131

3232

33-
all: lib unit
33+
all: lib unit example
3434

3535
$(LIB_OBJS):
3636
$(CC) $(INC) $(CFLAGS) /c src/codecfactory.cpp src/bitpacking.cpp src/integratedbitpacking.cpp src/simdbitpacking.cpp src/usimdbitpacking.cpp src/simdintegratedbitpacking.cpp src/intersection.cpp src/varintdecode.c src/streamvbyte.c src/simdpackedsearch.c src/simdpackedselect.c src/frameofreference.cpp src/for.c

0 commit comments

Comments
 (0)