Improve README steps for building and testing glslang.
This commit is contained in:
parent
f5e33b0bac
commit
d7b552a907
36
README.md
36
README.md
@ -58,26 +58,35 @@ Building
|
|||||||
git clone https://github.com/google/googletest.git External/googletest
|
git clone https://github.com/google/googletest.git External/googletest
|
||||||
```
|
```
|
||||||
|
|
||||||
2) Configure and build. Assume the source directory is `$SOURCE_DIR` and
|
2) Configure. Assume the source directory is `$SOURCE_DIR` and
|
||||||
the build directory is `$BUILD_DIR`:
|
the build directory is `$BUILD_DIR`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# for building on Linux (assuming using the Ninja generator):
|
|
||||||
cd $BUILD_DIR
|
cd $BUILD_DIR
|
||||||
|
|
||||||
|
# for building on Linux (assuming using the Ninja generator):
|
||||||
cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} \
|
cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} \
|
||||||
-DCMAKE_INSTALL_PREFIX=`pwd`/install $SOURCE_DIR
|
-DCMAKE_INSTALL_PREFIX=`pwd`/install $SOURCE_DIR
|
||||||
ninja
|
|
||||||
|
|
||||||
# for building on Windows:
|
# for building on Windows:
|
||||||
cd $BUILD_DIR
|
|
||||||
cmake $SOURCE_DIR -DCMAKE_INSTALL_PREFIX=`pwd`/install
|
cmake $SOURCE_DIR -DCMAKE_INSTALL_PREFIX=`pwd`/install
|
||||||
cmake --build . --config {Release|Debug|MinSizeRel|RelWithDebInfo}
|
|
||||||
|
|
||||||
# The CMAKE_INSTALL_PREFIX part is for testing (explained latter).
|
# The CMAKE_INSTALL_PREFIX part is for testing (explained later).
|
||||||
```
|
```
|
||||||
|
|
||||||
In MSVC, after running CMake, you may need to use the Configuration Manager to
|
3) Build and install.
|
||||||
check the INSTALL project.
|
|
||||||
|
```bash
|
||||||
|
# for Linux:
|
||||||
|
ninja install
|
||||||
|
|
||||||
|
# for Windows:
|
||||||
|
cmake --build . --config {Release|Debug|MinSizeRel|RelWithDebInfo} \
|
||||||
|
--target install
|
||||||
|
```
|
||||||
|
|
||||||
|
If using MSVC, after running CMake to configure, you may need to use the
|
||||||
|
Configuration Manager to check the `INSTALL` project.
|
||||||
|
|
||||||
### If you need to change the GLSL grammar
|
### If you need to change the GLSL grammar
|
||||||
|
|
||||||
@ -116,8 +125,14 @@ otherwise, you may want to modify the path in the `runtests` script.
|
|||||||
Running Google Test-backed tests:
|
Running Google Test-backed tests:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# assuming we are in the build directory:
|
cd $BUILD_DIR
|
||||||
|
|
||||||
|
# for Linux:
|
||||||
ctest
|
ctest
|
||||||
|
|
||||||
|
# for Windows:
|
||||||
|
ctest -C {Debug|Release|RelWithDebInfo|MinSizeRel}
|
||||||
|
|
||||||
# or, run the test binary directly
|
# or, run the test binary directly
|
||||||
# (which gives more fine-grained control like filtering):
|
# (which gives more fine-grained control like filtering):
|
||||||
<dir-to-glslangtests-in-build-dir>/glslangtests
|
<dir-to-glslangtests-in-build-dir>/glslangtests
|
||||||
@ -126,8 +141,7 @@ ctest
|
|||||||
Running `runtests` script-backed tests:
|
Running `runtests` script-backed tests:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# assuming we are in the source directory:
|
cd $SOURCE_DIR/Test && ./runtests
|
||||||
cd Test && ./runtests
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Contributing tests
|
### Contributing tests
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user