GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — learning-python/cmake_example at master · feixiao/learning-python

Expand file tree

/

cmake_example

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

cmake_example

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
conda.recipe
conda.recipe
 
 
docs
docs
 
 
src
src
 
 
tests
tests
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
setup.py
setup.py
 
 

README.md

Outline

cmake_example for pybind11

Prerequisites

  • A compiler with C++11 support
  • Pip 10+ or CMake >= 3.4 (or 3.14+ on Windows, which was the first version to support VS 2019)
  • Ninja or Pip 10+

Installation

Just clone this repository and pip install. Note the --recursive option which is needed for the pybind11 submodule:

pip install ./cmake_example

With the setup.py file included in this example, the pip install command will invoke CMake and build the pybind11 module as specified in CMakeLists.txt.

build wsl file

pip install setuptools wheel

python setup.py bdist_wheel

Building the documentation

Documentation for the example project is generated using Sphinx. Sphinx has the ability to automatically inspect the signatures and documentation strings in the extension module to generate beautiful documentation in a variety formats. The following command generates HTML-based reference documentation; for other formats please refer to the Sphinx manual:

  • cd cmake_example/docs
  • make html

Test call

import cmake_example
cmake_example.add(1, 2)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.