1 | initial version |
To incorporate personalized C++ compiler flags into a conda-build flow, follow these steps:
Add the personalized C++ compiler flags to the CXXFLAGS
environment variable. You can do this by setting it in your shell configuration file such as .bashrc
.
In your meta.yaml
file, include the following sections:
build:
script: |
#!/bin/bash
export CXXFLAGS="${CXXFLAGS} ${MY_CXXFLAGS}"
$PYTHON setup.py install
This script includes the personalized C++ flags by adding the MY_CXXFLAGS
variable to the CXXFLAGS
environment variable.
conda_build_config.yaml
file, include the following:variables:
MY_CXXFLAGS: "-march=native -O3 -funroll-loops"
This sets the MY_CXXFLAGS
variable to the personalized C++ compiler flags you want to use.
conda build
command to build your package with the personalized C++ compiler flags.With these steps, you can incorporate personalized C++ compiler flags into your conda-build flow.