feat: add switch for build script to disable documentation build.

- add a new switch to disable documentation build which cost much time and disk space during building.
- add corresponding codumentation for this feature.
This commit is contained in:
yyc12345 2024-08-05 14:46:59 +08:00
parent e6c24b8b61
commit 33cb284eb7
3 changed files with 16 additions and 7 deletions

View File

@ -106,6 +106,8 @@ See following section for more details.
For creating CMake distribution, please execute script <TT>script/win_build.bat</TT>. For creating CMake distribution, please execute script <TT>script/win_build.bat</TT>.
After script done, you will find CMake distribution in directory <TT>bin/install</TT> with following structure. After script done, you will find CMake distribution in directory <TT>bin/install</TT> with following structure.
In default, building process will build documentation automatically.
If you don't want built documentation, please execute with extra argument \c NODOC, i.e. <TT>script/win_build.bat NODOC</TT>.
\verbatim \verbatim
YYCC YYCC
@ -137,6 +139,8 @@ because MSVC distribution depend on CMake distribution.
After creating CMake distribution, you can simply create MSVC distribution by executing <TT>script/win_msvc_build.bat</TT>. After creating CMake distribution, you can simply create MSVC distribution by executing <TT>script/win_msvc_build.bat</TT>.
Then you will find your MSVC distribution in directory <TT>bin/msvc_install</TT> with following structure. Then you will find your MSVC distribution in directory <TT>bin/msvc_install</TT> with following structure.
Same as CMake distribution, if you don't want built documentation,
please execute <TT>script/win_msvc_build.bat NODOC</TT>.
\verbatim \verbatim
YYCC YYCC

View File

@ -1,4 +1,5 @@
@ECHO OFF @ECHO OFF
:: Check environment
SET README_PATH=%CD%\README.md SET README_PATH=%CD%\README.md
IF EXIST %README_PATH% ( IF EXIST %README_PATH% (
REM DO NOTHING REM DO NOTHING
@ -42,12 +43,14 @@ cmake --install . --prefix=../install/x64_Release --config Release
CD .. CD ..
:: Build for documentation :: Build for documentation
IF NOT "%1"=="NODOC" (
CD documentation CD documentation
cmake -G "Visual Studio 16 2019" -A x64 -DYYCC_BUILD_DOC=ON ../.. cmake -G "Visual Studio 16 2019" -A x64 -DYYCC_BUILD_DOC=ON ../..
cmake --build . --config Release cmake --build . --config Release
cmake --build . --target YYCCDocumentation cmake --build . --target YYCCDocumentation
cmake --install . --prefix=../install/x64_Release --config Release cmake --install . --prefix=../install/x64_Release --config Release
CD .. CD ..
)
:: Exit to original path :: Exit to original path
CD .. CD ..

View File

@ -35,7 +35,9 @@ CD ..
:: Copy include from x64_Release build :: Copy include from x64_Release build
XCOPY install\x64_Release\include msvc_install\include\ /E /Y XCOPY install\x64_Release\include msvc_install\include\ /E /Y
:: Copy document from x64_Release build :: Copy document from x64_Release build
IF NOT "%1"=="NODOC" (
XCOPY install\x64_Release\share msvc_install\share\ /E /Y XCOPY install\x64_Release\share msvc_install\share\ /E /Y
)
:: Copy binary testbench :: Copy binary testbench
COPY install\Win32_Release\bin\YYCCTestbench.exe msvc_install\bin\Win32\YYCCTestbench.exe /Y COPY install\Win32_Release\bin\YYCCTestbench.exe msvc_install\bin\Win32\YYCCTestbench.exe /Y
COPY install\x64_Release\bin\YYCCTestbench.exe msvc_install\bin\x64\YYCCTestbench.exe /Y COPY install\x64_Release\bin\YYCCTestbench.exe msvc_install\bin\x64\YYCCTestbench.exe /Y