Skip to content

Commit

Permalink
define default cmake args as envvars (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt authored Jul 18, 2023
1 parent 20bd2c0 commit 2dad4ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
8 changes: 7 additions & 1 deletion features/src/rapids-build-utils/.bashrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export CONDA_ALWAYS_YES=true;
export CONDA_ALWAYS_YES="true";
export CC="${CC:-"$(which gcc)"}";
export CXX="${CXX:-"$(which g++)"}";
export CUDAARCHS="${CUDAARCHS:-native}";
export CUDAHOSTCXX="${CUDAHOSTCXX:-"${CXX}"}";
export CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}";
export CMAKE_EXPORT_COMPILE_COMMANDS="${CMAKE_EXPORT_COMPILE_COMMANDS:-ON}";

if [[ "${PYTHON_PACKAGE_MANAGER:-}" == "pip" ]]; then
if [ -n "${DEFAULT_VIRTUAL_ENV:-}" ] \
Expand Down
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NVIDIA RAPIDS devcontainer build utilities",
"id": "rapids-build-utils",
"version": "23.8.3",
"version": "23.8.4",
"description": "A feature to install the RAPIDS devcontainer build utilities",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@ parse_cmake_args() {
set -euo pipefail;

local ARG="";
local args=(${CMAKE_ARGS:-});
args+=(-GNinja);
args+=(-DCMAKE_BUILD_TYPE=Release);
args+=(-DCMAKE_EXPORT_COMPILE_COMMANDS=ON);
args+=(-DCMAKE_CUDA_ARCHITECTURES=${CUDAARCHS:-native});
args+=(-DCMAKE_C_COMPILER="$(realpath -m "$(which gcc)")");
args+=(-DCMAKE_CXX_COMPILER="$(realpath -m "$(which g++)")");
args+=(-DCMAKE_CUDA_COMPILER="$(realpath -m "$(which nvcc)")");
args+=(-DCMAKE_CUDA_HOST_COMPILER="$(realpath -m "$(which gcc)")");
local args=(-GNinja);
args+=(${CMAKE_ARGS:-});

while test -n "${1:-}"; do
ARG="${1:-}";
Expand Down

0 comments on commit 2dad4ca

Please sign in to comment.