Skip to content

cmake: BUILD_DEPS does not include a BUILD_SWIG option #4298

Open
@SYury

Description

@SYury

What language and solver does this apply to?
CMake build

Describe the problem you are trying to solve.
I'm building OR-Tools Python package from source on an Ubuntu machine:

cmake -S. -Bbuild -DBUILD_DEPS:BOOL=ON -DBUILD_PYTHON=ON -DCMAKE_BUILD_TYPE=Release

I don't have the rights to install packages from apt, so I build the dependencies from source.

Everything is ok when I build the C++ library without Python, but when I build the Python package it fails with Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR). Apparently, BUILD_DEPS does not include SWIG.

Describe the solution you'd like
Fetch and build SWIG from source when both BUILD_DEPS and BUILD_PYTHON are on.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions