Skip to content

Commit

Permalink
Merge branch 'master' into zeno-727
Browse files Browse the repository at this point in the history
  • Loading branch information
legobadman committed Sep 25, 2023
2 parents f299db6 + 1444d0b commit 8a26007
Show file tree
Hide file tree
Showing 77 changed files with 36,427 additions and 5,129 deletions.
37 changes: 25 additions & 12 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
param( [string]$a )
Write-Host $a
param( [string]$p, [string]$b)

if (Get-Command "cmake" -errorAction SilentlyContinue)
{
Expand Down Expand Up @@ -41,45 +40,56 @@ if ($null -eq $env:VS_PATH) {
Write-Output '$Env:VS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Community"'

$env:VS_PATH = Read-Host 'VS_PATH'
return;
# return;
}
}

Import-Module ("$env:VS_PATH\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll");
Enter-VsDevShell -VsInstallPath "${env:VS_PATH}" -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64"

$shell_name = (Get-Process -Id $PID).name
echo $shell_name
Write-Host $shell_name

# if ("pwsh" -eq $shell_name) {
# cmd /K '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && pwsh.exe'
# } else {
# cmd /K '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && powershell.exe'
# }

if ($a.ToLower() -ne "full") {
if ($b.ToLower() -ne "debug") {
$b = "Release"
} else {
$b = "Debug"
}

Write-Host $p
Write-Host $b

if ($p.ToLower() -ne "full") {

Write-Output "Making minimum build with Optix..."

cmake -G Ninja -B ninja -DCMAKE_BUILD_TYPE=Release `
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE="${b}" `
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" `
-DZENO_WITH_zenvdb:BOOL=ON `
-DZENO_SYSTEM_OPENVDB=OFF `
-DZENO_SYSTEM_OPENVDB:BOOL=OFF `
-DZENO_WITH_ZenoFX:BOOL=ON `
-DZENO_ENABLE_OPTIX:BOOL=ON `
-DZENO_WITH_FBX:BOOL=ON `
-DZENO_WITH_Alembic:BOOL=ON `
-DZENO_WITH_MeshSubdiv:BOOL=ON `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON

} else {

Write-Output "Making full build..."

cmake -G Ninja -B ninja -DCMAKE_BUILD_TYPE=Release `
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE="${b}" `
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" `
-DZENO_WITH_CUDA:BOOL=ON `
-DZENO_WITH_ZenoFX:BOOL=ON `
-DZENO_ENABLE_OPTIX:BOOL=ON `
-DZENO_SYSTEM_OPENVDB=OFF `
-DZENO_SYSTEM_OPENVDB:BOOL=OFF `
-DZENOFX_ENABLE_OPENVDB:BOOL=ON `
-DZENOFX_ENABLE_LBVH:BOOL=ON `
-DZENO_WITH_zenvdb:BOOL=ON `
Expand All @@ -104,9 +114,12 @@ cmake -G Ninja -B ninja -DCMAKE_BUILD_TYPE=Release `
-DZENO_WITH_PBD:BOOL=ON `
-DZENO_WITH_GUI:BOOL=ON `
-DZENO_WITH_ImgCV:BOOL=ON `
-DZENO_WITH_TOOL_FLIPtools:BOOL=ON `
-DZENO_WITH_TOOL_cgmeshTools:BOOL=ON `
-DZENO_WITH_TOOL_BulletTools:BOOL=ON `
-DZENO_WITH_TOOL_HerculesTools:BOOL=ON `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
}

cmake --build ninja --config Release

cp ./ninja/compile_commands.json ./
cmake --build build --config Release
cp ./build/compile_commands.json ./
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cmake -B build -DCMAKE_BUILD_TYPE=$flag \
-DZENO_WITH_ZenoFX:BOOL=ON \
-DZENO_ENABLE_OPTIX:BOOL=ON \
-DZENO_WITH_FBX:BOOL=ON \
-DZENO_WITH_Alembic:BOOL=ON \
-DZENO_WITH_MeshSubdiv:BOOL=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \

Expand Down Expand Up @@ -44,4 +45,6 @@ cmake -B build -DCMAKE_BUILD_TYPE=$flag \
cmake --build build --parallel $(nproc) \

# ln -s ./build/compile_commands.json ./
cp ./build/compile_commands.json ./
cp ./build/compile_commands.json ./

rm -rf /var/tmp/OptixCache_$USER/
Loading

0 comments on commit 8a26007

Please sign in to comment.