2023-03-16 04:09:20 +03:00
|
|
|
|
distributable:
|
|
|
|
|
url: https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v{{version}}.tar.gz
|
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
|
|
# if there’s a github then we can parse the versions
|
|
|
|
|
versions:
|
2023-10-02 03:41:57 +03:00
|
|
|
|
github: AcademySoftwareFoundation/Imath/tags # reads github tags from github
|
2023-03-16 04:09:20 +03:00
|
|
|
|
strip: /^v/
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
dependencies:
|
|
|
|
|
cmake.org: '*'
|
|
|
|
|
script: |
|
|
|
|
|
cmake -S . -B build $ARGS
|
|
|
|
|
cmake --build build
|
|
|
|
|
cmake --install build
|
2023-10-02 03:41:57 +03:00
|
|
|
|
|
2023-03-16 04:09:20 +03:00
|
|
|
|
mv {{ prefix}}/include/Imath/* {{prefix}}/include
|
|
|
|
|
rmdir {{ prefix}}/include/Imath
|
|
|
|
|
ln -s . {{ prefix }}/include/Imath
|
|
|
|
|
env:
|
|
|
|
|
# add any environment variables here
|
|
|
|
|
ARGS:
|
|
|
|
|
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
|
|
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
fixture: |
|
|
|
|
|
#include <ImathRoots.h>
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
{
|
|
|
|
|
double x[2] = {0.0, 0.0};
|
|
|
|
|
int n = IMATH_NAMESPACE::solveQuadratic(1.0, 3.0, 2.0, x);
|
|
|
|
|
if (x[0] > x[1])
|
|
|
|
|
std::swap(x[0], x[1]);
|
|
|
|
|
std::cout << n << ", " << x[0] << ", " << x[1] << "\n";
|
|
|
|
|
}
|
|
|
|
|
script: |
|
|
|
|
|
mv $FIXTURE foo.cc
|
|
|
|
|
g++ -std=c++11 -lImath foo.cc
|
2023-10-02 03:41:57 +03:00
|
|
|
|
./a.out
|