Skip to content

Commit

Permalink
Doc and config update to accommodate clang-cl in Conan build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Musil committed Aug 28, 2022
1 parent 1b6ca91 commit fb994e6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64" ],
"environments": [
{
"CC": "${env.LLVM_ROOT}/bin/clang-cl.exe",
"CXX": "${env.LLVM_ROOT}/bin/clang-cl.exe"
}
],
"variables": [
{
"name": "CMAKE_C_COMPILER",
Expand All @@ -77,6 +83,12 @@
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64" ],
"environments": [
{
"CC": "${env.LLVM_ROOT}/bin/clang-cl.exe",
"CXX": "${env.LLVM_ROOT}/bin/clang-cl.exe"
}
],
"variables": [
{
"name": "CMAKE_C_COMPILER",
Expand Down
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# HMDQ Tools Change Log
## 2.1.2 - August 28, 2022
Maintenance release:
* Updated OpenVR API JSON to OpenVR SDK 1.23.7
* Updated the build process to use conan packages
* Updated external lib references to their current versions
* Updated linked LibOVR to v32.0

## 2.1.1 - October 12, 2020
* Added a workaround for invalid FOV data (Quest 2).
* Some code clean up.
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ for parsing the command line arguments.
* [`QuantStack/xtensor`](https://github.com/QuantStack/xtensor) for all 2D, 3D vectors and matrices operations.
* [`QuantStack/xtl`](https://github.com/QuantStack/xtl) required by `QuantStack/xtensor`.
* [`nlohmann/json`](https://github.com/nlohmann/json) for all JSON parsing and creating.
* [`nlohmann/fifo_map`](https://github.com/nlohmann/fifo_map) for ordered map support.
* [`ValveSoftware/openvr`](https://github.com/ValveSoftware/openvr) for obvious reasons.
* [`randombit/botan`](https://github.com/randombit/botan) for secure hash implementation.
* [`fmtlib/fmt`](https://github.com/fmtlib/fmt) for comfortable printing and formatting of the console output.
Expand All @@ -275,8 +274,13 @@ On top of that you will also need `cmake` version 3.15 or higher.
* [`Catch2`](https://github.com/catchorg/Catch2) to build unit tests.

### Building
The project is developed as a "CMake project" in Visual Studio 2019, while using `ninja` as a build driver. The binary can be successfully built by native MSVC compiler `cl` or by LLVM `clang-cl` (Clang drop in replacement for MSVC compiler).

Building with `clang-cl` may provide some additional challenges which however should not surprise anyone who is using this compiler and as such is already accustomed to some roughing.
#### Building with CMake
The project is developed as a "CMake project" in Visual Studio 2019/2022, while using `ninja` as a build driver. The binary can be successfully built by native MSVC compiler `cl` or by LLVM `clang-cl` (Clang drop in replacement for MSVC compiler).

To have the automatic versioning working correctly, CMake scripts expect the build to happen in a locally cloned `git` repository.

#### Building with Conan
The batch file in `conan` subfolder creates all Conan generated files for the Visual Studio CMake integration (using `CMakeSettings.json`) to work correctly.

The advantage is that all external dependencies (all except `LibOVR` which does not have a public Conan package) can be setup by Conan. This would also ensure that the local build corresponds to the released binary.

0 comments on commit fb994e6

Please sign in to comment.