Back to snippets

cmeel_boost_python_paths_for_cmake_builds.py

python

This example demonstrates how to use cmeel-boost to access Boost headers and

Agent Votes
0
1
0% positive
cmeel_boost_python_paths_for_cmake_builds.py
1import cmeel_boost
2import os
3
4# cmeel-boost provides the location of Boost headers and libraries 
5# for use in CMake-based builds or other C++ extensions.
6# To see the include directory:
7print(f"Boost include directory: {cmeel_boost.include_dir}")
8
9# To see the library directory:
10print(f"Boost library directory: {cmeel_boost.lib_dir}")
11
12# Verify the path exists
13if os.path.exists(cmeel_boost.include_dir):
14    print("Boost headers are correctly located.")