Skip to content

Commit fd63fee

Browse files
committed
apple.8
Signed-off-by: Cary Phillips <cary@ilm.com>
1 parent b4c29d2 commit fd63fee

2 files changed

Lines changed: 20 additions & 27 deletions

File tree

.github/workflows/ci_steps.yml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -510,32 +510,6 @@ jobs:
510510
fi
511511
shell: bash
512512

513-
- name: Test ImathTest Standalone (iOS)
514-
if: inputs.msystem == '' && inputs.IMATH_BUILD_APPLE_FRAMEWORK == 'ON'
515-
# Use the ImathTest program as an example of an application
516-
# using the Imath library, to validate that we can build
517-
# against the just-installed Imath library
518-
run: |
519-
set -x
520-
521-
IMATHTEST_BUILD_DIR=$WORKSPACE/_build.imathTest.iOS
522-
cmake_args=("-B" "$IMATHTEST_BUILD_DIR" "-S" "$WORKSPACE/src/ImathTest")
523-
#cmake_args+=("-DImath_DIR=$INSTALL_DIR/lib/Imath.framework/Resources")
524-
cmake_args+=("-DCMAKE_PREFIX_PATH=$INSTALL_DIR/Imath.framework")
525-
cmake_args+=("-DCMAKE_BUILD_TYPE=${{ inputs.build-type }}")
526-
cmake_args+=("-DCMAKE_CXX_STANDARD=${{ inputs.cxx-standard }}")
527-
cmake_args+=("-DCMAKE_CXX_FLAGS=${{ inputs.cxx-flags }}")
528-
cmake_args+=("-DCMAKE_VERBOSE_MAKEFILE=ON")
529-
cmake_args+=("-DCMAKE_SYSTEM_NAME=iOS")
530-
cmake_args+=("-DCMAKE_OSX_SYSROOT=iphoneos")
531-
cmake_args+=("-DCMAKE_OSX_ARCHITECTURES=arm64")
532-
quoted_args=$(printf '%q ' "${cmake_args[@]}")
533-
$CMAKE $quoted_args
534-
$CMAKE --build $IMATHTEST_BUILD_DIR \
535-
--config ${{ inputs.build-type }}
536-
otool -L $IMATHTEST_BUILD_DIR/bin/ImathTest.app/ImathTest
537-
shell: bash
538-
539513
- name: Test PyImathTest Standalone
540514
if: inputs.msystem == '' && inputs.PYTHON == 'ON' && inputs.IMATH_TEST_PYTHON == 'ON' && inputs.IMATH_BUILD_APPLE_FRAMEWORK != 'ON'
541515
# Use the PyImathTestC program as an example of an application
@@ -634,4 +608,19 @@ jobs:
634608
$EXAMPLES_BUILD_DIR/bin/imath-examples.exe
635609
shell: msys2 {0}
636610

637-
611+
- name: Examples (iOS)
612+
if: inputs.namespace == '' && inputs.msystem == '' && inputs.IMATH_BUILD_APPLE_FRAMEWORK == 'ON'
613+
# Confirm the website examples compile on iOS
614+
run: |
615+
EXAMPLES_BUILD_DIR=$WORKSPACE/_build.examples.iOS
616+
cmake_args=("-B" "$EXAMPLES_BUILD_DIR" "-S" "$WORKSPACE/website/examples")
617+
cmake_args+=("-DCMAKE_PREFIX_PATH=$INSTALL_DIR")
618+
cmake_args+=("-DCMAKE_BUILD_TYPE=${{ inputs.build-type }}")
619+
cmake_args+=("-DCMAKE_CXX_STANDARD=${{ inputs.cxx-standard }}")
620+
cmake_args+=("-DCMAKE_SYSTEM_NAME=iOS")
621+
cmake_args+=("-DCMAKE_OSX_SYSROOT=iphoneos")
622+
cmake_args+=("-DCMAKE_OSX_ARCHITECTURES=arm64")
623+
quoted_args=$(printf '%q ' "${cmake_args[@]}")
624+
$CMAKE $quoted_args
625+
$CMAKE --build $EXAMPLES_BUILD_DIR --config ${{ inputs.build-type }}
626+
shell: bash

src/ImathTest/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
if("${CMAKE_PROJECT_NAME}" STREQUAL "")
55

6+
message(STATUS "Configuring Imath as a standalone: CMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME}")
7+
68
# If the project name is set, this is being configured as a part of
79
# Imath. If there is no project name, it's being configured as a
810
# standalone program linking against an already-installed Imath
@@ -12,6 +14,8 @@ if("${CMAKE_PROJECT_NAME}" STREQUAL "")
1214
project(ImathTest)
1315
find_package(Imath)
1416

17+
else()
18+
message(STATUS "Configuring Imath as a test: CMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME}")
1519
endif()
1620

1721
#

0 commit comments

Comments
 (0)