Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To incorporate personalized C++ compiler flags into a conda-build flow, follow these steps:

  1. 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.

  2. 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.

  1. In your 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.

  1. Run the 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.