ILAng with CMake
C++ project using CMake
To utilize ILAng in your C++ projects, you can look for the ilang::ilang
interface target in your CMake recipe. This target manages and populates the required usage information such as include directories, linked libraries, compile features, etc. ILAng features (excluding features-in-development) are defined in the header file ilang++.h
.
External
With ILAng installed (out-of-source), you can locate the target directly with find_package()
and use the imported target from the generated package configuration:
A template repo for starting a project using ILAng can be found in PrincetonUniversity/template-ila.
Embedded
ILAng also supports embedded (in-source) build. To embed the library into an existing CMake project, place the entire source tree in a sub-directory and call add_subdirectory()
in your CMake recipe:
Supporting both
To allow your project to support either an externally installed or an embedded library at config time, you can use the following pattern:
And put the ILAng source (or sub-modules) in the sub-directory externals/ilang
.
Last updated