configure
---これは任意の実行可能なトップレベルスクリプトであることができますが、やや面倒なトリックがあります。つまり、もしあなたがそれを持っていればautoconf
という恐れはありません。
したがってconfigure
は、シェルスクリプト、または#!/usr/bin/Rscript
で実行されるRスクリプトであっても、OSおよび/またはコンパイラをテストすることができます。星が整列している場合に限り、-mpopcnt
を追加してください。
あなたは互換性があります。あなたがしたいスイッチを
#!/bin/bash
## Travis can let us run R 3.4.0 (from CRAN and the PPAs) but this R version
## does not know about C++14. Even though we can select CXX_STD = C++14, R
## will fail as the version we use there was built in too old an environment,
## namely Ubuntu "trusty" 14.04.
##
## So we install g++-6 from another repo and rely on the fact that is
## defaults to C++14. Sadly, we need R to not fail and hence, just on
## Travis, remove the C++14 instruction
if [[ "${CI}" == "true" ]]; then
if [[ "${TRAVIS}" == "true" ]]; then
echo "** Overriding src/Makevars and removing C++14 on Travis only"
sed -i 's|CXX_STD = CXX14||' src/Makevars
fi
fi
あなたはにまったく同じロジックを使用することができます追加します。
は、私がかつてin this postにこの例を有しているC++ 14スイッチを削除し、その同じ考え方についてブログ追加します。