Skip to content

Commit

Permalink
Try building from within the build dir itself. Any difference?
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Dec 30, 2023
1 parent 559da59 commit df5bbd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/build-scripts/ci-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
set -ex

OIIO_CMAKE_FLAGS="$MY_CMAKE_FLAGS $OIIO_CMAKE_FLAGS"
export OIIO_SRC_DIR=${OIIO_SRC_DIR:-$PWD}
export OIIO_BUILD_DIR=${OIIO_BUILD_DIR:-$OIIO_SRC_DIR/build}
export OIIO_INSTALL_DIR=${OIIO_INSTALL_DIR:-$OIIO_SRC_DIR/dist}

if [[ "$USE_SIMD" != "" ]] ; then
OIIO_CMAKE_FLAGS="$OIIO_CMAKE_FLAGS -DUSE_SIMD=$USE_SIMD"
Expand All @@ -27,7 +30,8 @@ if [[ ${GITHUB_ACTIONS} == true ]] ; then
OIIO_CMAKE_FLAGS+=" -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:=ON} -DCMAKE_UNITY_BUILD_MODE=${CMAKE_UNITY_BUILD_MODE:=BATCH}"
fi

cmake -S . -B build -G "$CMAKE_GENERATOR" \
pushd $OIIO_BUILD_DIR
cmake -S $OIIO_SRC_DIR -B $OIIO_BUILD_DIR -G "$CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
-DCMAKE_INSTALL_PREFIX="$OpenImageIO_ROOT" \
Expand All @@ -48,8 +52,9 @@ if [[ "$BUILDTARGET" != "none" ]] ; then
if [[ ${OIIO_CMAKE_BUILD_WRAPPER} != "" ]] ; then
echo "Using build wrapper '${OIIO_CMAKE_BUILD_WRAPPER}'"
fi
time ${OIIO_CMAKE_BUILD_WRAPPER} cmake --build build --target ${BUILDTARGET} --config ${CMAKE_BUILD_TYPE}
time ${OIIO_CMAKE_BUILD_WRAPPER} cmake --build ${OIIO_BUILD_DIR} --target ${BUILDTARGET} --config ${CMAKE_BUILD_TYPE}
fi
popd

if [[ "${DEBUG_CI:=0}" != "0" ]] ; then
echo "PATH=$PATH"
Expand Down
5 changes: 3 additions & 2 deletions src/build-scripts/ci-coverage.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ done
echo "Coverage dir now contains:"
ls -lh | tee wc
echo "Include files are:"
ls -l "*#root#usr#include*" | tee wc
rm -f "*#root#usr#include*"
ls -l "*opt*include*" | tee wc
rm -f "*opt*include*"
rm -f "*usr*local*"

popd

0 comments on commit df5bbd4

Please sign in to comment.