DanielaE / AndreyG.ifc-reader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IFC Reader (!!! WIP, very early stage !!!)

This is C++ library for reading ifc-files. Actually there are 2 separate libraries: ifc-core and ifc-msvc.

The reason for this is the following: ifc could contain references to other modules. For example, the following module interface

export module hello;

import <string_view>;

export namespace hello {
  void say_hello(std::string_view name);
}

depends on type std::string_view defined in outer header unit <string_view>. Conseqeuntly for reading and understanding of some ifc-file it's needed to be able to find and read other ifc-files. How to do it is not specified in IFC specification itself and depends on a compiler/build system. To solve this problem library ifc-core uses interface Environment and library ifc-msvc provides its implementation MSVCEnvironment.

Dependecies

ifc-core depends on Boost::iostreams for crossplatform implementation of file mapping.

ifc-msvc depends on nlohmann::json for reading .d.json configs produced by MSVC.

Build

Nothing special, just plain CMake, something like this should be enough (after installing Boost::iostreams and nlohmann::json mentioned above):

mkdir build
cd build
cmake ..

Windows

Vcpkg could be used for fetching required dependencies. If it's not installed yet, you could run the following commands for pulling package manager itself:

git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat

And then install required dependencies:

vcpkg.exe install boost-iostreams:x64-windows
vcpkg.exe install nlohmann-json:x64-windows

After that you could generate normal Visual Studio solution:

mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake ..

or work with CMake directly in Visual Studio.

Visual Studio

From Visual Studio, open CMakeLists.txt

After cmake wizard pops up, open the CMake Settings Editor

In CMake toolchain file - browse and select vcpkg\scripts\buildsystems\vcpkg.cmake

Delete cache, generate cache.

Build solution normally.

About

License:MIT License


Languages

Language:C++ 98.3%Language:CMake 1.7%