Skip to content

Instantly share code, notes, and snippets.

@jiahuif
Created August 18, 2021 01:23
Show Gist options
  • Save jiahuif/57976160949202a622d4b1224ecb4542 to your computer and use it in GitHub Desktop.
Save jiahuif/57976160949202a622d4b1224ecb4542 to your computer and use it in GitHub Desktop.
cmake wrapper to workaround preload issue.
#!/bin/sh
OLD_LD_PRELOAD="$LD_PRELOAD"
LD_PRELOAD=""
if [ "$1" == "--build" ]; then
LD_PRELOAD="$OLD_LD_PRELOAD";
fi
if [ "$1" == "--install" ]; then
LD_PRELOAD="$OLD_LD_PRELOAD";
fi
export LD_PRELOAD
/usr/bin/cmake "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment