Skip to content

Commit 7b72bbd

Browse files
committed
fix(toolchain): 移除合并冲突标记并改进配置验证
重构配置验证逻辑以更精确检查cmake依赖 当使用系统cmake时增加额外检查
1 parent 6f50df5 commit 7b72bbd

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

toolchain/scripts/lib/config_validator.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,27 @@ validate_compiler_consistency() {
138138
# Check system requirements
139139
# Usage: validate_system_requirements
140140
validate_system_requirements() {
141-
# Check for required system tools
142-
local required_tools=("make" "cmake" "git" "wget" "tar" "gzip")
141+
# ABACUS itself and some dependencies require cmake.
142+
# Check cmake requirement based on configuration (mirrors original L768-772)
143+
if [[ "${CONFIG_CACHE[with_cmake]}" == "__DONTUSE__" ]]; then
144+
add_validation_error "CMake is required for ABACUS and some dependencies. Please enable it."
145+
add_validation_error ""
146+
add_validation_error "SOLUTION: Use '--with-cmake=install' to automatically install CMake:"
147+
add_validation_error " ./install_abacus_toolchain_new.sh --with-cmake=install [other options]"
148+
return
149+
fi
150+
151+
# Check for required system tools (excluding cmake which is handled above)
152+
local required_tools=("make" "git" "wget" "tar" "gzip")
143153
local missing_tools=()
144154

155+
# Only check for system cmake if using system cmake
156+
if [[ "${CONFIG_CACHE[with_cmake]}" == "__SYSTEM__" ]]; then
157+
if ! command -v "cmake" &> /dev/null; then
158+
missing_tools+=("cmake")
159+
fi
160+
fi
161+
145162
for tool in "${required_tools[@]}"; do
146163
if ! command -v "$tool" &> /dev/null; then
147164
missing_tools+=("$tool")

toolchain/toolchain_aocc-aocl.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# Users can easily modify these parameters to customize the build
99
# Before running this script, ensure you have loaded your system packages
1010

11-
<<<<<<< HEAD
1211
# Compiler Configuration
1312
TOOLCHAIN_COMPILER="aocc-aocl"
1413
WITH_AMD="system"

toolchain/toolchain_gcc-aocl.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ WITH_GCC="system"
1414
WITH_AMD="no"
1515
WITH_INTEL="no"
1616

17-
<<<<<<< HEAD
1817
# Math Libraries (AMD AOCL recommended)
1918
MATH_MODE="aocl"
2019
WITH_AOCL="system"

0 commit comments

Comments
 (0)