Skip to content

Commit

Permalink
Remove unused compiler selection logic from cmake-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeLyon committed Oct 19, 2023
1 parent 75d4a33 commit 36939cd
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions .devcontainer/cmake-helper
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,11 @@ case "$1" in
echo "Error: $VSCODE_SETTINGS_FILE is not a valid JSON file."
exit 1
fi

# If specified, sets the CMAKE_{C,CXX}_COMPILER variables as specified in the CMake Tools kits file.
CMAKE_TOOLS_KITS_FILE=${CMAKE_TOOLS_KITS_FILE:-}
CMAKE_TOOLS_KITS_FILE_INDEX=${CMAKE_TOOLS_KITS_FILE_INDEX:-0}
if [[ -n "$CMAKE_TOOLS_KITS_FILE" ]]; then
if ! jq . < "$CMAKE_TOOLS_KITS_FILE" > /dev/null; then
echo "Error: $CMAKE_TOOLS_KITS_FILE is not a valid JSON file."
exit 1
fi
fi

echo "-DCMAKE_BUILD_TYPE=Debug"
sed 's@//.*@@' < "$VSCODE_SETTINGS_FILE" | \
sed "s@\${[A-Za-z]*orkspaceFolder}@$PROJECT_ROOT@" | \
jq -jr '"\"\(.["cmake.configureArgs"] | join("\" \""))\" -G \(.["cmake.generator"]) "'
if [[ -n "$CMAKE_TOOLS_KITS_FILE" ]]; then
jq -r ".[$CMAKE_TOOLS_KITS_FILE_INDEX].compilers | \"-DCMAKE_C_COMPILER=\(.C) -DCMAKE_CXX_COMPILER=\(.CXX)\"" < "$CMAKE_TOOLS_KITS_FILE"
fi
echo "$@"

;;
Expand Down

0 comments on commit 36939cd

Please sign in to comment.