Files
speckle-cpp-connectors/SpeckleLib
Ralph Wessel bacdbc4d61 Added ConnectorProject as a container for ModelCardDatabase
Moved ownership of ModelCardDatabase from Addon to ConnectorProject
Tools requiring access to the model card database now need to check for an open project first and then obtain the database from it (prevents attempts to access model cards when no project is open)
2024-11-05 16:34:49 +00:00
..
2024-10-28 17:27:46 +00:00
2024-11-01 23:25:49 +00:00

SpeckleLib

Foundational, platform-independent C++ classes to support Speckle development

Contents

  1. Scope
  2. Installation
  3. Modules

Scope

This library is designed to be cross-platform, supporting Linux, iOS, macOS and Windows (including C++/CLR contexts). The base standard is currenty C++20 to allow broad compiler support.

Installation

Requirements

Compiler must support C++20

Dependencies

This package is dependent on the following SDKs/libraries - these should be named as follows in the same directory as speckle-cpp-connectors (SpeckleLib/../../):

Building

The library can be built using a variety of tools. Unit tests build and run in each context:

Cmake Built against DocTest
Visual Studio Run in Test Explorer
Xcode Run with XCTest

Cmake

The following command-line instructions will build the library and tests:

cmake -B ./build
cmake --build ./build --config Release

Note: Directing the output to a build directory is simply a practical suggestion, not a requirement. The build output can be directed anywhere.

For Visual Studio builds, it's prudent to specify a compiler and toolset, e.g.:

cmake -B ./build/v143 -G "Visual Studio 17" -A x64 -DCMAKE_GENERATOR_TOOLSET=v143
cmake --build ./build/v143 --config Release

Unit tests are built into a single executable called specklelibtests and can be executed from the command-line, e.g.:

./specklelibtests

Visual Studio

  • Open SpeckleLib.sln in Visual Studio 2022
  • Pick the target Release17
  • Click the menu Build > Build Solution
  • Run unit tests by clicking Test > Run All Tests

Xcode

  • Open SpeckleLib.xcworkspace in Xcode
  • Pick the scheme SpeckleLib-Release
  • Click the menu Product > Build
  • Run unit tests by clicking Product > Test

Documentation

The source contains Doxygen-style quotes for building a documentation set, which can be viewed here.

Alternatively, the documentation can be built using the configuration file ./Documentation/Doxyfile, either through the GUI application or from the command line: doxygen ./Documentation/Doxyfile

The latter will build the documentation into ./Documentation/html/