Vendored
+2
-2
@@ -21,7 +21,7 @@
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"name": "X256_PS (MSVC2022 x64)",
|
||||
"compileCommands": "${workspaceFolder}/build/X256_PS/compile_commands.json"
|
||||
"compileCommands": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/compile_commands.json"
|
||||
},
|
||||
{
|
||||
"compilerPath": "D:\\APP\\VisualStudio2022\\VC\\Tools\\MSVC\\14.44.35207\\bin\\Hostx64\\x64\\cl.exe",
|
||||
@@ -43,7 +43,7 @@
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"name": "X256_MS (MSVC2022 x64)",
|
||||
"compileCommands": "${workspaceFolder}/build/X256_MS/compile_commands.json"
|
||||
"compileCommands": "${workspaceFolder}/build/X256_MS/Debug/REC_ON/compile_commands.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+23
-4
@@ -10,15 +10,34 @@ buildType:
|
||||
long: Debug (MSVC2022 x64, C++17)
|
||||
buildType: Debug
|
||||
|
||||
scanMode:
|
||||
default: ps
|
||||
recordMode:
|
||||
default: REC_OFF
|
||||
choices:
|
||||
ps:
|
||||
REC_AUTO:
|
||||
short: REC_AUTO
|
||||
long: REC_AUTO - RDP_DATA_RECORD=AUTO (Debug 启用 / Release 关闭)
|
||||
settings:
|
||||
RDP_DATA_RECORD: AUTO
|
||||
REC_OFF:
|
||||
short: REC_OFF
|
||||
long: REC_OFF - RDP_DATA_RECORD=OFF (不编译记录模块)
|
||||
settings:
|
||||
RDP_DATA_RECORD: OFF
|
||||
REC_ON:
|
||||
short: REC_ON
|
||||
long: REC_ON - RDP_DATA_RECORD=ON (强制启用记录模块)
|
||||
settings:
|
||||
RDP_DATA_RECORD: ON
|
||||
|
||||
scanMode:
|
||||
default: X256_PS
|
||||
choices:
|
||||
X256_PS:
|
||||
short: X256_PS
|
||||
long: X256_PS - PHASE_SCANNING
|
||||
settings:
|
||||
RADAR_SCAN_MODE: PHASE_SCANNING
|
||||
ms:
|
||||
X256_MS:
|
||||
short: X256_MS
|
||||
long: X256_MS - MECHANICAL_SCANNING
|
||||
settings:
|
||||
|
||||
Vendored
+4
-4
@@ -5,14 +5,14 @@
|
||||
"name": "调试 DLL",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/X256_PS/bin/rdp_playback.exe",
|
||||
"args": ["-d", "E:/Demo/QT/simianzhen256-v1.5.5-ms-vscode/build/X256_PS/bin/2026-07-18/15-34-32", "-i", "E:/Demo/QT/simianzhen256-v1.5.5-ms-vscode/build/X256_PS/bin/RadarConfigParam.ini", "-c", "E:/Demo/QT/simianzhen256-v1.5.5-ms-vscode/build/X256_PS/bin/2026-07-18/15-34-32/track.csv"],
|
||||
"program": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/rdp_playback.exe",
|
||||
"args": ["-d", "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/2026-07-18/15-34-32", "-i", "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/RadarConfigParam.ini", "-c", "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin/2026-07-18/15-34-32/track.csv"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "CMake: 配置并构建 X256_PS (Debug)",
|
||||
"symbolSearchPath": "${workspaceFolder}/build/X256_PS/bin"
|
||||
"preLaunchTask": "配置并构建全部(Debug/REC_ON)",
|
||||
"symbolSearchPath": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/bin"
|
||||
},
|
||||
{
|
||||
"name": "附加到宿主进程(调试 DLL)",
|
||||
|
||||
Vendored
+31
-9
@@ -2,21 +2,43 @@
|
||||
rem ===========================================================================
|
||||
rem CMake build script (MSVC 2022 / v143, C++17, x64)
|
||||
rem
|
||||
rem Usage: build.bat <build-dir>
|
||||
rem e.g. build.bat build\X256_PS
|
||||
rem Usage:
|
||||
rem build.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Examples:
|
||||
rem build.bat PHASE_SCANNING Release OFF
|
||||
rem build.bat MECHANICAL_SCANNING Debug ON
|
||||
rem
|
||||
rem The build tree must have been configured by configure.bat first (same
|
||||
rem configuration tuple):
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal
|
||||
set "BUILD_DIR=%~1"
|
||||
if "%BUILD_DIR%"=="" (
|
||||
echo Usage: build.bat ^<build-dir^>
|
||||
exit /b 1
|
||||
)
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
call "%~dp0config_paths.bat" "%~1" "%~2" "%~3"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
rem Load the MSVC 2022 environment (vcvarsall.bat + cl.exe existence check).
|
||||
call "%~dp0msvc_env.bat"
|
||||
if errorlevel 1 exit /b %errorlevel%
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
pushd "%~dp0..\.."
|
||||
if not exist "%BUILD_DIR%\CMakeCache.txt" (
|
||||
echo [ERROR] "%BUILD_DIR%" is not configured - run configure.bat first
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [build] %BUILD_DIR%
|
||||
cmake --build "%BUILD_DIR%"
|
||||
exit /b %errorlevel%
|
||||
set "CMAKE_EXIT=%errorlevel%"
|
||||
popd
|
||||
exit /b %CMAKE_EXIT%
|
||||
|
||||
:usage
|
||||
echo Usage: build.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem Configure and build both scan modes for one build type / record mode.
|
||||
rem
|
||||
rem Usage:
|
||||
rem build_all.bat ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Examples:
|
||||
rem build_all.bat Release OFF
|
||||
rem build_all.bat Debug ON
|
||||
rem build_all.bat Release AUTO
|
||||
rem
|
||||
rem Runs configure.bat + build.bat for both scan modes:
|
||||
rem PHASE_SCANNING -^> build\X256_PS\<Debug^|Release^>\<REC_*>
|
||||
rem MECHANICAL_SCANNING -^> build\X256_MS\<Debug^|Release^>\<REC_*>
|
||||
rem The run stops at the first failing configuration and returns non-zero.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal EnableExtensions
|
||||
set "BUILD_TYPE=%~1"
|
||||
set "RECORD_MODE=%~2"
|
||||
if not defined BUILD_TYPE goto :usage
|
||||
if not defined RECORD_MODE set "RECORD_MODE=AUTO"
|
||||
|
||||
rem Validate + normalize the tuple once (also resolves the X256_* aliases).
|
||||
call "%~dp0config_paths.bat" PHASE_SCANNING "%BUILD_TYPE%" "%RECORD_MODE%"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
for %%S in (PHASE_SCANNING MECHANICAL_SCANNING) do (
|
||||
echo.
|
||||
echo [build_all] ==================== %%S / %BUILD_TYPE% / %RECORD_MODE% ====================
|
||||
call "%~dp0configure.bat" %%S "%BUILD_TYPE%" "%RECORD_MODE%"
|
||||
if errorlevel 1 goto :failed
|
||||
call "%~dp0build.bat" %%S "%BUILD_TYPE%" "%RECORD_MODE%"
|
||||
if errorlevel 1 goto :failed
|
||||
)
|
||||
echo.
|
||||
echo [build_all] all done: %BUILD_TYPE% / %RECORD_MODE%
|
||||
exit /b 0
|
||||
|
||||
:failed
|
||||
echo.
|
||||
echo [build_all] FAILED - stopped at the first failing configuration, see the log above
|
||||
exit /b 1
|
||||
|
||||
:usage
|
||||
echo Usage: build_all.bat ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
Vendored
+34
-12
@@ -1,22 +1,44 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem CMake clean script (MSVC 2022 / v143, C++17, x64)
|
||||
rem CMake clean script - remove the build output of one configuration.
|
||||
rem
|
||||
rem Usage: clean.bat <build-dir>
|
||||
rem e.g. clean.bat build\X256_PS
|
||||
rem Usage:
|
||||
rem clean.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Examples:
|
||||
rem clean.bat PHASE_SCANNING Release OFF
|
||||
rem clean.bat MECHANICAL_SCANNING Debug ON
|
||||
rem
|
||||
rem The directory removed is the same one configure.bat/build.bat use:
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem Use clean_all.bat to clean every configuration at once.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal
|
||||
set "BUILD_DIR=%~1"
|
||||
if "%BUILD_DIR%"=="" (
|
||||
echo Usage: clean.bat ^<build-dir^>
|
||||
exit /b 1
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
call "%~dp0config_paths.bat" "%~1" "%~2" "%~3"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
pushd "%~dp0..\.."
|
||||
if not exist "%BUILD_DIR%" (
|
||||
echo [clean] "%BUILD_DIR%" does not exist - nothing to do
|
||||
popd
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
rem Load the MSVC 2022 environment (vcvarsall.bat + cl.exe existence check).
|
||||
call "%~dp0msvc_env.bat"
|
||||
if errorlevel 1 exit /b %errorlevel%
|
||||
echo [clean] remove "%BUILD_DIR%"
|
||||
rmdir /s /q "%BUILD_DIR%"
|
||||
if exist "%BUILD_DIR%" (
|
||||
echo [ERROR] cannot remove "%BUILD_DIR%", close open files and retry.
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
cmake --build "%BUILD_DIR%" --target clean
|
||||
exit /b %errorlevel%
|
||||
:usage
|
||||
echo Usage: clean.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem Remove the build output of every build configuration.
|
||||
rem
|
||||
rem Usage:
|
||||
rem clean_all.bat
|
||||
rem
|
||||
rem Build layout (see config_paths.bat):
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem
|
||||
rem A legacy single-configuration build tree (build\X256_PS or build\X256_MS
|
||||
rem containing CMakeCache.txt directly) is removed as a whole as well.
|
||||
rem build\output (archived package export) is never touched.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal EnableExtensions
|
||||
pushd "%~dp0..\.."
|
||||
set "FAILED="
|
||||
for %%S in (X256_PS X256_MS) do (
|
||||
if exist "build\%%S\CMakeCache.txt" (
|
||||
call :remove "build\%%S"
|
||||
) else (
|
||||
for %%T in (Debug Release) do (
|
||||
for %%R in (REC_AUTO REC_OFF REC_ON) do (
|
||||
call :remove "build\%%S\%%T\%%R"
|
||||
)
|
||||
)
|
||||
rem drop the directory root when every configuration is gone
|
||||
rmdir "build\%%S" 2>nul
|
||||
)
|
||||
)
|
||||
echo.
|
||||
echo [clean_all] archived package export "build\output" left untouched
|
||||
if defined FAILED (
|
||||
echo [clean_all] FAILED - some directories could not be removed, close open files and retry
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
echo [clean_all] all build configurations removed
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
:remove
|
||||
if not exist "%~1" exit /b 0
|
||||
echo [clean_all] remove "%~1"
|
||||
rmdir /s /q "%~1"
|
||||
if exist "%~1" (
|
||||
echo [ERROR] cannot remove "%~1"
|
||||
set "FAILED=1"
|
||||
)
|
||||
exit /b 0
|
||||
Vendored
+72
@@ -0,0 +1,72 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem Derive the build directory of one build configuration.
|
||||
rem
|
||||
rem Internal helper, called by configure.bat / build.bat / clean.bat /
|
||||
rem build_all.bat as:
|
||||
rem call config_paths.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem Accepted aliases: X256_PS = PHASE_SCANNING, X256_MS = MECHANICAL_SCANNING.
|
||||
rem
|
||||
rem On success the following variables are exported into the caller scope:
|
||||
rem SCAN_MODE PHASE_SCANNING / MECHANICAL_SCANNING
|
||||
rem SCAN_TAG X256_PS / X256_MS
|
||||
rem BUILD_TYPE Debug / Release
|
||||
rem RECORD_MODE AUTO / ON / OFF
|
||||
rem REC_TAG REC_AUTO / REC_OFF / REC_ON
|
||||
rem BUILD_DIR build\<SCAN_TAG>\<BUILD_TYPE>\<REC_TAG>
|
||||
rem
|
||||
rem Exit code: 0 = ok, 1 = invalid configuration.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
set "SCAN_MODE="
|
||||
set "SCAN_TAG="
|
||||
set "BUILD_TYPE="
|
||||
set "RECORD_MODE="
|
||||
set "REC_TAG="
|
||||
set "BUILD_DIR="
|
||||
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
if /i "%~1"=="PHASE_SCANNING" set "SCAN_MODE=PHASE_SCANNING"
|
||||
if /i "%~1"=="X256_PS" set "SCAN_MODE=PHASE_SCANNING"
|
||||
if /i "%~1"=="MECHANICAL_SCANNING" set "SCAN_MODE=MECHANICAL_SCANNING"
|
||||
if /i "%~1"=="X256_MS" set "SCAN_MODE=MECHANICAL_SCANNING"
|
||||
if not defined SCAN_MODE (
|
||||
echo [ERROR] invalid scan mode: "%~1"
|
||||
echo expected PHASE_SCANNING / X256_PS or MECHANICAL_SCANNING / X256_MS
|
||||
exit /b 1
|
||||
)
|
||||
if "%SCAN_MODE%"=="PHASE_SCANNING" set "SCAN_TAG=X256_PS"
|
||||
if "%SCAN_MODE%"=="MECHANICAL_SCANNING" set "SCAN_TAG=X256_MS"
|
||||
|
||||
if /i "%~2"=="Debug" set "BUILD_TYPE=Debug"
|
||||
if /i "%~2"=="Release" set "BUILD_TYPE=Release"
|
||||
if not defined BUILD_TYPE (
|
||||
echo [ERROR] invalid build type: "%~2"
|
||||
echo expected Debug or Release
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not "%~3"=="" set "RECORD_MODE=%~3"
|
||||
if not defined RECORD_MODE set "RECORD_MODE=AUTO"
|
||||
if /i "%RECORD_MODE%"=="AUTO" set "RECORD_MODE=AUTO"
|
||||
if /i "%RECORD_MODE%"=="ON" set "RECORD_MODE=ON"
|
||||
if /i "%RECORD_MODE%"=="OFF" set "RECORD_MODE=OFF"
|
||||
if "%RECORD_MODE%"=="AUTO" set "REC_TAG=REC_AUTO"
|
||||
if "%RECORD_MODE%"=="ON" set "REC_TAG=REC_ON"
|
||||
if "%RECORD_MODE%"=="OFF" set "REC_TAG=REC_OFF"
|
||||
if not defined REC_TAG (
|
||||
echo [ERROR] invalid record mode: "%~3"
|
||||
echo expected AUTO or ON or OFF
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "BUILD_DIR=build\%SCAN_TAG%\%BUILD_TYPE%\%REC_TAG%"
|
||||
exit /b 0
|
||||
|
||||
:usage
|
||||
echo Usage: config_paths.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
Vendored
+42
-40
@@ -1,73 +1,75 @@
|
||||
@echo off
|
||||
rem ===========================================================================
|
||||
rem CMake configure script (MSVC 2022 / v143, C++17, x64)
|
||||
rem CMake configure script (MSVC 2022 / v143, C++17, x64, NMake Makefiles)
|
||||
rem
|
||||
rem Usage: configure.bat <build-dir> <PHASE_SCANNING^|MECHANICAL_SCANNING> [Debug^|Release] [AUTO^|ON^|OFF]
|
||||
rem e.g. configure.bat build\X256_PS PHASE_SCANNING Release
|
||||
rem configure.bat build\X256_PS Debug ON (Debug + data recording enabled)
|
||||
rem Usage:
|
||||
rem configure.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
||||
rem
|
||||
rem The 4th argument selects the optional data-recording debug feature
|
||||
rem Examples:
|
||||
rem configure.bat PHASE_SCANNING Release OFF
|
||||
rem configure.bat MECHANICAL_SCANNING Debug ON
|
||||
rem
|
||||
rem The build directory is derived from the configuration tuple (see
|
||||
rem config_paths.bat), so every configuration has its own build tree:
|
||||
rem build\<X256_PS^|X256_MS^>\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
|
||||
rem
|
||||
rem The 3rd argument selects the optional data-recording debug feature
|
||||
rem (CMake cache variable RDP_DATA_RECORD). When it is omitted, CMake's AUTO
|
||||
rem default applies: Debug = enabled, Release = disabled. See
|
||||
rem docs/data_record_debug.md.
|
||||
rem default applies: Debug = enabled, Release = disabled.
|
||||
rem See docs/data_record_debug.md.
|
||||
rem
|
||||
rem The generator stays "NMake Makefiles" (the choice made during the VS Code
|
||||
rem migration); cl.exe is pinned to the MSVC 2022 x64 toolset.
|
||||
rem
|
||||
rem A build directory that was configured by an older compiler (for example the
|
||||
rem MSVC 2013 cache) is removed first: neither its CMake cache nor its object
|
||||
rem files can be reused across a compiler upgrade.
|
||||
rem A build directory that was configured by an older compiler (for example
|
||||
rem the MSVC 2013 cache) is removed first: neither its CMake cache nor its
|
||||
rem object files can be reused across a compiler upgrade.
|
||||
rem
|
||||
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
||||
rem ===========================================================================
|
||||
setlocal
|
||||
set "BUILD_DIR=%~1"
|
||||
set "SCAN_MODE=%~2"
|
||||
set "BUILD_TYPE=%~3"
|
||||
set "RECORD_MODE=%~4"
|
||||
if "%BUILD_DIR%"=="" (
|
||||
echo Usage: configure.bat ^<build-dir^> ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> [Debug^|Release] [AUTO^|ON^|OFF]
|
||||
exit /b 1
|
||||
)
|
||||
if "%SCAN_MODE%"=="" (
|
||||
echo Usage: configure.bat ^<build-dir^> ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> [Debug^|Release] [AUTO^|ON^|OFF]
|
||||
exit /b 1
|
||||
)
|
||||
if "%BUILD_TYPE%"=="" set "BUILD_TYPE=Release"
|
||||
if "%RECORD_MODE%"=="" set "RECORD_MODE=AUTO"
|
||||
if "%~1"=="" goto :usage
|
||||
if "%~2"=="" goto :usage
|
||||
|
||||
call "%~dp0config_paths.bat" "%~1" "%~2" "%~3"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
echo [configure] build dir : %BUILD_DIR%
|
||||
echo [configure] settings : %SCAN_MODE% / %BUILD_TYPE% / RDP_DATA_RECORD=%RECORD_MODE%
|
||||
|
||||
rem Load the MSVC 2022 environment (vcvarsall.bat + cl.exe existence check).
|
||||
call "%~dp0msvc_env.bat"
|
||||
if errorlevel 1 exit /b %errorlevel%
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
rem Drop a build tree left behind by another toolset.
|
||||
if not exist "%BUILD_DIR%\CMakeCache.txt" goto :configure
|
||||
pushd "%~dp0..\.."
|
||||
|
||||
if not exist "%BUILD_DIR%\CMakeCache.txt" goto :do_configure
|
||||
set "OLD_TOOLSET="
|
||||
if exist "%BUILD_DIR%\.msvc_toolset" set /p OLD_TOOLSET=<"%BUILD_DIR%\.msvc_toolset"
|
||||
if /i "%OLD_TOOLSET%"=="%MSVC_TOOLSET_VERSION%" goto :configure
|
||||
if /i "%OLD_TOOLSET%"=="%MSVC_TOOLSET_VERSION%" goto :do_configure
|
||||
echo [configure] "%BUILD_DIR%" was configured with MSVC toolset "%OLD_TOOLSET%" - rebuilding from scratch
|
||||
rmdir /s /q "%BUILD_DIR%"
|
||||
if exist "%BUILD_DIR%" (
|
||||
echo [ERROR] cannot remove "%BUILD_DIR%", please delete it manually and retry.
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:configure
|
||||
echo [configure] compiler : %MSVC_CXX_COMPILER%
|
||||
echo [configure] build dir: %BUILD_DIR%
|
||||
echo [configure] mode : %SCAN_MODE% / %BUILD_TYPE%
|
||||
echo [configure] record : %RECORD_MODE% (RDP_DATA_RECORD: AUTO/ON/OFF)
|
||||
|
||||
pushd "%~dp0..\.."
|
||||
:do_configure
|
||||
echo [configure] compiler : %MSVC_CXX_COMPILER%
|
||||
cmake -S . -B "%BUILD_DIR%" -G "NMake Makefiles" ^
|
||||
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
|
||||
-DRADAR_SCAN_MODE=%SCAN_MODE% ^
|
||||
-DRDP_DATA_RECORD=%RECORD_MODE% ^
|
||||
-DCMAKE_CXX_COMPILER="%MSVC_CXX_COMPILER%"
|
||||
set "CMAKE_EXIT=%errorlevel%"
|
||||
popd
|
||||
if not "%CMAKE_EXIT%"=="0" exit /b %CMAKE_EXIT%
|
||||
if not "%CMAKE_EXIT%"=="0" (
|
||||
popd
|
||||
exit /b %CMAKE_EXIT%
|
||||
)
|
||||
|
||||
rem Remember which toolset produced this build tree (checked on the next run).
|
||||
> "%BUILD_DIR%\.msvc_toolset" echo %MSVC_TOOLSET_VERSION%
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
:usage
|
||||
echo Usage: configure.bat ^<PHASE_SCANNING^|MECHANICAL_SCANNING^> ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
||||
exit /b 1
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"cmake.configureOnOpen": false,
|
||||
"cmake.generator": "NMake Makefiles",
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/X256_PS",
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/${variant:scanMode}/${buildType}/${variant:recordMode}",
|
||||
"cmake.configureArgs": [
|
||||
"-DCMAKE_CXX_COMPILER=D:/APP/VisualStudio2022/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe"
|
||||
],
|
||||
@@ -12,5 +12,5 @@
|
||||
},
|
||||
"C_Cpp.default.cppStandard": "c++17",
|
||||
"C_Cpp.default.intelliSenseMode": "windows-msvc-x64",
|
||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/X256_PS/compile_commands.json"
|
||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/X256_PS/Debug/REC_ON/compile_commands.json"
|
||||
}
|
||||
|
||||
Vendored
+62
-137
@@ -5,166 +5,91 @@
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"label": "CMake: 配置 X256_PS (Release, MSVC2022 x64)",
|
||||
"label": "清理全部",
|
||||
"detail": "删除 build/<X256_PS|X256_MS>/<Debug|Release>/<REC_*> 下所有配置的构建输出(build/output 打包留档不动)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS",
|
||||
"PHASE_SCANNING",
|
||||
"Release"
|
||||
],
|
||||
"problemMatcher": []
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\clean_all.bat",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared",
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置 X256_PS (Debug, MSVC2022 x64)",
|
||||
"label": "配置并构建全部(Release/REC_OFF)",
|
||||
"detail": "Release + RDP_DATA_RECORD=OFF:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS",
|
||||
"PHASE_SCANNING",
|
||||
"Debug"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_PS (Release)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_PS (Debug)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 清理 X256_PS",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\clean.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_PS"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置 X256_MS (Release, MSVC2022 x64)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS",
|
||||
"MECHANICAL_SCANNING",
|
||||
"Release"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置 X256_MS (Debug, MSVC2022 x64)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\configure.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS",
|
||||
"MECHANICAL_SCANNING",
|
||||
"Debug"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_MS (Release)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 构建 X256_MS (Debug)",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "CMake: 清理 X256_MS",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\clean.bat",
|
||||
"args": [
|
||||
"${workspaceFolder}/build/X256_MS"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_PS (Release)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_PS (Release, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_PS (Release)"
|
||||
"Release",
|
||||
"OFF"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_PS (Debug)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_PS (Debug, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_PS (Debug)"
|
||||
"label": "配置并构建全部(Release/REC_ON)",
|
||||
"detail": "Release + RDP_DATA_RECORD=ON:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"Release",
|
||||
"ON"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": []
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_MS (Release)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_MS (Release, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_MS (Release)"
|
||||
"label": "配置并构建全部(Debug/REC_OFF)",
|
||||
"detail": "Debug + RDP_DATA_RECORD=OFF:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"Debug",
|
||||
"OFF"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": []
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建 X256_MS (Debug)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置 X256_MS (Debug, MSVC2022 x64)",
|
||||
"CMake: 构建 X256_MS (Debug)"
|
||||
"label": "配置并构建全部(Debug/REC_ON)",
|
||||
"detail": "Debug + RDP_DATA_RECORD=ON:X256_PS 与 X256_MS 分别配置并构建",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\.vscode\\scripts\\build_all.bat",
|
||||
"args": [
|
||||
"Debug",
|
||||
"ON"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CMake: 配置并构建全部 (X256_PS + X256_MS, Release)",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"CMake: 配置并构建 X256_PS (Release)",
|
||||
"CMake: 配置并构建 X256_MS (Release)"
|
||||
"problemMatcher": [
|
||||
"$msCompile"
|
||||
],
|
||||
"problemMatcher": []
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "shared"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user