Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(FTXUI_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)

FetchContent_MakeAvailable(tomlplusplus ftxui)

option(ENABLE_CLANG_TIDY "Enable clang-tidy" ON)
option(ENABLE_CLANG_TIDY "Enable clang-tidy" OFF)

if(ENABLE_CLANG_TIDY)
find_program(CLANG_TIDY clang-tidy)
Expand Down
9 changes: 9 additions & 0 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ info() { echo -e "\033[1;34m==>\033[0m $1"; }
success() { echo -e "\033[1;32m==>\033[0m $1"; }
error() { echo -e "\033[1;31m==>\033[0m $1" >&2; }

check_deps() {
if ! command -v cmake &> /dev/null; then
error "Missing required dependency: cmake"
echo "Install with: sudo apt install cmake"
exit 1
fi
}
Comment on lines +13 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Find CMakeLists.txt and install.sh files
find . -name "CMakeLists.txt" -o -name "install.sh" | head -20

Repository: BANANASJIM/flydigi-vader5

Length of output: 126


🏁 Script executed:

# Look at the install/install.sh file to see the context
head -30 install/install.sh

Repository: BANANASJIM/flydigi-vader5

Length of output: 934


🏁 Script executed:

# Check if CMakeLists.txt exists and examine its first few lines
if [ -f "CMakeLists.txt" ]; then
  echo "=== CMakeLists.txt ===" && head -20 CMakeLists.txt
fi

Repository: BANANASJIM/flydigi-vader5

Length of output: 554


🏁 Script executed:

# Search for README, BUILD, or documentation files
find . -type f \( -name "README*" -o -name "BUILD*" -o -name "CONTRIBUTING*" -o -name "*.md" \) | head -20

Repository: BANANASJIM/flydigi-vader5

Length of output: 1150


🏁 Script executed:

# Check driver/install.sh to see if there's similar logic
cat driver/install.sh | head -40

Repository: BANANASJIM/flydigi-vader5

Length of output: 379


🏁 Script executed:

# Check README for build requirements and toolchain info
cat README.md | head -100

Repository: BANANASJIM/flydigi-vader5

Length of output: 3144


🏁 Script executed:

# Also check CONTRIBUTING.md for build setup instructions
cat CONTRIBUTING.md | head -80

Repository: BANANASJIM/flydigi-vader5

Length of output: 1538


Add C++ compiler check to preflight validation.

The current check_deps() function only verifies cmake, but CMakeLists.txt (line 2) declares LANGUAGES CXX and (line 4) requires CMAKE_CXX_STANDARD 23 with CMAKE_CXX_STANDARD_REQUIRED ON. A machine with cmake but no C++ compiler will still fail during the configure step instead of receiving an early, actionable error. Add a compiler probe to check for any usable C++ compiler (e.g., c++, g++, or clang++).

Suggested fix
 check_deps() {
     if ! command -v cmake &> /dev/null; then
         error "Missing required dependency: cmake"
         echo "Install with: sudo apt install cmake"
         exit 1
     fi
+    if ! command -v c++ &> /dev/null && ! command -v g++ &> /dev/null && ! command -v clang++ &> /dev/null; then
+        error "Missing required dependency: C++ compiler"
+        echo "Please install a C++23-capable compiler and rerun this script."
+        exit 1
+    fi
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
check_deps() {
if ! command -v cmake &> /dev/null; then
error "Missing required dependency: cmake"
echo "Install with: sudo apt install cmake"
exit 1
fi
}
check_deps() {
if ! command -v cmake &> /dev/null; then
error "Missing required dependency: cmake"
echo "Install with: sudo apt install cmake"
exit 1
fi
if ! command -v c++ &> /dev/null && ! command -v g++ &> /dev/null && ! command -v clang++ &> /dev/null; then
error "Missing required dependency: C++ compiler"
echo "Please install a C++23-capable compiler and rerun this script."
exit 1
fi
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@install/install.sh` around lines 13 - 19, The check_deps() function currently
only verifies cmake but must also verify a usable C++ compiler because
CMakeLists.txt declares LANGUAGES CXX and requires CMAKE_CXX_STANDARD 23; update
check_deps() to probe for common C++ compilers (e.g., c++, g++, clang++) by
checking command -v for each or attempting a simple compiler --version
invocation, and if none are found emit an error like "Missing required
dependency: C++ compiler" with an actionable install hint (e.g., install
build-essential or g++) and exit 1 so the configure step fails early.


build() {
check_deps
info "Building..."
cmake -B "$BUILD_DIR" -S "$PROJECT_DIR" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR" -j"$(nproc)"
Expand Down
Loading