Skip to content
Snippets Groups Projects
Commit 9db9cc42 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Merge branch 'releases/1.6' into 'master'

Avoid dependency on C++ compiler when not needed

See merge request !71
parents 79dc82f4 62f06222
No related branches found
No related tags found
1 merge request!71Avoid dependency on C++ compiler when not needed
Pipeline #88401 passed
cmake_minimum_required(VERSION 3.15...3.26) cmake_minimum_required(VERSION 3.15...3.26)
project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX)
# Do not set language yet, but only when actually building extensions, to
# avoid the need for having a working compiler when it's not used.
project(${SKBUILD_PROJECT_NAME} LANGUAGES)
option(BUILD_EXTENSIONS "Build C++ extensions" OFF) option(BUILD_EXTENSIONS "Build C++ extensions" OFF)
if(BUILD_EXTENSIONS) if(BUILD_EXTENSIONS)
# Only now set the language, and trigger the search for a working compiler.
enable_language(CXX)
set(PYBIND11_NEWPYTHON ON) set(PYBIND11_NEWPYTHON ON)
find_package(pybind11 CONFIG REQUIRED) find_package(pybind11 CONFIG REQUIRED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment