Optimize builds in CMakeLists.txt and run.bat
This commit is contained in:
@@ -90,7 +90,7 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_options(gitree PRIVATE /W4 /permissive-)
|
target_compile_options(gitree PRIVATE /W4 /permissive- /MP)
|
||||||
else()
|
else()
|
||||||
target_compile_options(gitree PRIVATE -Wall -Wextra -Wpedantic)
|
target_compile_options(gitree PRIVATE -Wall -Wextra -Wpedantic)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
2
run.bat
2
run.bat
@@ -17,7 +17,7 @@ if %errorlevel%==0 (
|
|||||||
if not exist build\CMakeCache.txt (
|
if not exist build\CMakeCache.txt (
|
||||||
cmake -S . -B build %GENERATOR% -DCMAKE_BUILD_TYPE=Release || exit /b 1
|
cmake -S . -B build %GENERATOR% -DCMAKE_BUILD_TYPE=Release || exit /b 1
|
||||||
)
|
)
|
||||||
cmake --build build --config Release --parallel || exit /b 1
|
cmake --build build --config Release --parallel %NUMBER_OF_PROCESSORS% || exit /b 1
|
||||||
|
|
||||||
if exist build\bin\gitree.exe (
|
if exist build\bin\gitree.exe (
|
||||||
start "" build\bin\gitree.exe %*
|
start "" build\bin\gitree.exe %*
|
||||||
|
|||||||
Reference in New Issue
Block a user