AcademySoftwareFoundation / AcademySoftwareFoundation/OpenShadingLanguage

testsuites that build subprojects ignore the options top level cmake was invoked with

Open
#1,632 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
414
Avg merge
3d 1h
Merged PRs (30d)
10

Description

### Problem

Testsuites that build subprojects ignore the options top level cmake was invoked with.

**Actual behavior:**

Example:
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/testsuite/example-deformer/run.py
currently ignores any cmake options this build was invoked with, ie:
MYCC=... \
MYCXX=... \
LLVM_DIRECTORY=... \
ILMBASE_ROOT=... \
OPENEXR_ROOT=... \
BOOST_ROOT=... \
OpenImageIO_ROOT=...\
pugixml_ROOT=... \
pybind11_ROOT=... \
partio_ROOT=.. \

This can cause build failures from cmake not configuring because it can't find dependency or worse if the wrong version of the dependency is found. Failed builds from API/ABI incompatibilities or undefined behavior could ensue.

**Expected behavior:**
Any CMAKE options that apply to testsuite subprojects would be propagated through to their cmake invocations

### Steps to Reproduce

1. Remove OIIO from your path or have it point to an older version.
2. Build using OpenImageIO_ROOT cmake option
3. build TEST target and see example-deformer fail to build.

### Versions

* OSL branch/version: All
* OS: Linux
* C++ compiler: All
* LLVM version: All
* OIIO version: All

Contributor guide

Open the contributing guide

Research direction

Start with testsuite/example-deformer/run.py and trace how the TEST target invokes its subproject CMake configuration. Reproduce by configuring with OpenImageIO_ROOT while OIIO is absent or older, then verify that applicable top-level CMake options reach the subproject invocation and the example-deformer build succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.