@@ -44,9 +44,13 @@ before_install:
44
44
- MYMCREPO=https://repo.continuum.io/miniconda
45
45
- case ${TRAVIS_OS_NAME} in
46
46
linux)
47
- MYMCBUNDLE=Miniconda3-latest-Linux-x86_64.sh ;;
47
+ MYMCBUNDLE=Miniconda3-latest-Linux-x86_64.sh;
48
+ MYCXXCOMPILER=gxx_linux-64
49
+ ;;
48
50
osx)
49
- MYMCBUNDLE=Miniconda3-latest-MacOSX-x86_64.sh ;;
51
+ MYMCBUNDLE=Miniconda3-latest-MacOSX-x86_64.sh;
52
+ MYCXXCOMPILER=clangxx_osx-64
53
+ ;;
50
54
*)
51
55
echo "Unsupported operating system." >&2;
52
56
exit 2 ;;
@@ -61,7 +65,7 @@ before_install:
61
65
- $NOMC || source ~/mc/bin/activate root
62
66
- $NOMC || conda update --yes conda
63
67
- $NOMC || conda install --yes conda-build jinja2
64
- - $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION}
68
+ - $NOMC || conda create --name=testenv --yes $MYCXXCOMPILER
65
69
- $NOMC || conda config --add channels diffpy
66
70
67
71
- $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $?
@@ -107,17 +111,16 @@ install:
107
111
exit 1;
108
112
fi
109
113
110
- - $NOMC || export LIBRARY_PATH="${MYLIB}"
111
- - $NOMC || export CPATH="${MYINCLUDE}"
112
- - $NOMC || MYLINKFLAGS="-Wl,-rpath,${MYLIB}"
114
+ - $NOMC || MYCXXFLAGS="-I${MYINCLUDE} ${CXXFLAGS}"
115
+ - $NOMC || MYLINKFLAGS="-L${MYLIB} ${LDFLAGS} -Wl,-rpath,${MYLIB}"
113
116
114
117
115
118
before_script :
116
119
- cd "${TRAVIS_BUILD_DIR}/examples"
117
120
118
121
119
122
script :
120
- - $CXX -o testlib testlib.cpp -lObjCryst $MYLINKFLAGS
123
+ - $CXX -o testlib $MYCXXFLAGS testlib.cpp -lObjCryst $MYLINKFLAGS
121
124
- ./testlib
122
125
123
126
0 commit comments