-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change development environment from VSCode to neovim + neovide + clangd.
Yeah, and add some powershell scripts so that I can compile and build this project manually. And fix some header file path problems.
- Loading branch information
1 parent
c3b07e6
commit 43eb004
Showing
8 changed files
with
168 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
BasedOnStyle: Google | ||
IndentWidth: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# generate and compile exe files | ||
|
||
$currentDirectory = Get-Location | ||
$cmakeListsPath = Join-Path -Path $currentDirectory -ChildPath "CMakeLists.txt" | ||
|
||
if (-not (Test-Path $cmakeListsPath)) | ||
{ | ||
Write-Host("No CMakeLists.txt in current directory, please check.") | ||
return | ||
} | ||
|
||
Write-Host "Start generating and compiling..." | ||
|
||
$buildFolderPath = ".\build" | ||
|
||
if (-not (Test-Path $buildFolderPath)) | ||
{ | ||
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null | ||
Write-Host "build folder created." | ||
} | ||
|
||
cmake -G "Visual Studio 17 2022" -A x64 -S . -B ./build/ | ||
|
||
if ($LASTEXITCODE -eq 0) | ||
{ | ||
cmake --build ./build/ --config DEBUG | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# generate, compile and run exe files | ||
|
||
$currentDirectory = Get-Location | ||
$cmakeListsPath = Join-Path -Path $currentDirectory -ChildPath "CMakeLists.txt" | ||
|
||
if (-not (Test-Path $cmakeListsPath)) | ||
{ | ||
Write-Host("No CMakeLists.txt in current directory, please check.") | ||
return | ||
} | ||
|
||
Write-Host "Start generating and compiling..." | ||
|
||
$buildFolderPath = ".\build" | ||
|
||
if (-not (Test-Path $buildFolderPath)) | ||
{ | ||
New-Item -ItemType Directory -Path $buildFolderPath | Out-Null | ||
Write-Host "build folder created." | ||
} | ||
|
||
cmake -G "Visual Studio 17 2022" -A x64 -S . -B ./build/ | ||
|
||
if ($LASTEXITCODE -eq 0) | ||
{ | ||
cmake --build ./build/ --config DEBUG | ||
if ($LASTEXITCODE -eq 0) | ||
{ | ||
$content = Get-Content -Path "./CMakeLists.txt" | ||
foreach($line in $content) | ||
{ | ||
if ($line.StartsWith("add_executable")) | ||
{ | ||
$pattern = "\((.*?)\)" | ||
if ($line -match $pattern) | ||
{ | ||
$contentInParentheses = $Matches[1] | ||
$result = -split $contentInParentheses | ||
$exePath = "./build/DEBUG/" + $result[0] + ".exe" | ||
Invoke-Expression $exePath | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters