Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhang95 committed Nov 29, 2024
2 parents 179e8e0 + 8125a53 commit b9b4209
Show file tree
Hide file tree
Showing 315 changed files with 48,726 additions and 70,537 deletions.
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ If you use Linux the setup would be much easier, simply run these commands:

```bash
sudo apt-get install -y git cmake make g++
sudo apt-get install -y qt5-default libqt5svg5-dev
sudo apt-get install -y qt5-default libqt5svg5-dev libcrypto++-dev
```

> NOTE: We highly recommend to use **Ubuntu 20.04 (or above)** whenever possible.
Expand Down
37 changes: 23 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ endif()
option(ZENO_BUILD_EDITOR "Build ZENO editor" ON)
option(ZENO_BUILD_DESIGNER "Build ZENO designer" OFF)
option(ZENO_BUILD_PLAYER "Build ZENO player" OFF)
option(ZENO_HIDE_UI "Hide Editor UI" OFF)
option(ZENO_MULTIPROCESS "Enable multiprocessing for ZENO" ON)
option(ZENO_IPC_USE_TCP "Use TCP for inter-process communication" ON)
option(ZENO_OUT_TO_BIN "Output all target files to build/bin" ON)
Expand Down Expand Up @@ -61,6 +62,14 @@ endif()
message(STATUS "Build directory: ${PROJECT_BINARY_DIR}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

cmake_path(GET CMAKE_CXX_COMPILER STEM LAST_ONLY ZENO_CXX_COMPILER_BINARY)
message(STATUS "Current C++ compiler is ${ZENO_CXX_COMPILER_BINARY} (${CMAKE_CXX_COMPILER})")

# intel sycl compiler
if(${ZENO_CXX_COMPILER_BINARY} STREQUAL "icx")
add_compile_options(-Wno-error=register -Wno-enum-constexpr-conversion -Wno-implicit-function-declaration)
endif()

if (WIN32)
# get rid of 'min', 'max' macros; get back 'M_PI', 'M_E'
add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES)
Expand Down Expand Up @@ -137,7 +146,7 @@ endif()

## --- begin cihou wxl cuda
if (ZENO_WITH_CUDA) # must move enable_language ahead to here
message(STATUS "CUDA_PATH: "$ENV{CUDA_PATH})
message(STATUS "CUDA_PATH: $ENV{CUDA_PATH}")
if (NOT DEFINED CUDAToolkit_ROOT AND NOT DEFINED ENV{CUDAToolkit_ROOT} AND DEFINED ENV{CUDA_PATH})
set(CUDAToolkit_ROOT $ENV{CUDA_PATH} CACHE FILEPATH "ZENOCIHOUCUDA" FORCE)
if (NOT DEFINED CUDAToolkit_NVCC_EXECUTABLE)
Expand All @@ -147,21 +156,21 @@ if (ZENO_WITH_CUDA) # must move enable_language ahead to here
set(CMAKE_CUDA_COMPILER ${CUDAToolkit_NVCC_EXECUTABLE} CACHE FILEPATH "ZENOCIHOUCUDA" FORCE)
endif()
endif()
message(STATUS "CUDAToolkit_ROOT: "${CUDAToolkit_ROOT})
message(STATUS "CUDAToolkit_ROOT_DIR: "${CUDAToolkit_ROOT_DIR})
message(STATUS "CUDAToolkit_NVCC_EXECUTABLE: "${CUDAToolkit_NVCC_EXECUTABLE})
message(STATUS "CUDAToolkit_BIN_DIR: "${CUDAToolkit_BIN_DIR})
message(STATUS "CUDAToolkit_ROOT: ${CUDAToolkit_ROOT}")
message(STATUS "CUDAToolkit_ROOT_DIR: ${CUDAToolkit_ROOT_DIR}")
message(STATUS "CUDAToolkit_NVCC_EXECUTABLE: ${CUDAToolkit_NVCC_EXECUTABLE}")
message(STATUS "CUDAToolkit_BIN_DIR: ${CUDAToolkit_BIN_DIR}")
message(STATUS "Now invoking FindCUDAToolkit.cmake")
find_package(CUDAToolkit REQUIRED COMPONENTS cufft REQUIRED)
message(STATUS "CUDAToolkit_ROOT: "${CUDAToolkit_ROOT})
message(STATUS "CUDAToolkit_ROOT_DIR: "${CUDAToolkit_ROOT_DIR})
message(STATUS "CUDAToolkit_NVCC_EXECUTABLE: "${CUDAToolkit_NVCC_EXECUTABLE})
message(STATUS "CUDAToolkit_BIN_DIR: "${CUDAToolkit_BIN_DIR})
message(STATUS "CUDAToolkit_INCLUDE_DIRS: "${CUDAToolkit_INCLUDE_DIRS})
message(STATUS "CUDAToolkit_LIBRARY_DIR: "${CUDAToolkit_LIBRARY_DIR})
message(STATUS "CUDAToolkit_VERSION: "${CUDAToolkit_VERSION})
message(STATUS "CMAKE_CUDA_COMPILER: "${CMAKE_CUDA_COMPILER})
message(STATUS "CMAKE_CUDA_COMPILER_VERSION: "${CMAKE_CUDA_COMPILER_VERSION})
message(STATUS "CUDAToolkit_ROOT: ${CUDAToolkit_ROOT}")
message(STATUS "CUDAToolkit_ROOT_DIR: ${CUDAToolkit_ROOT_DIR}")
message(STATUS "CUDAToolkit_NVCC_EXECUTABLE: ${CUDAToolkit_NVCC_EXECUTABLE}")
message(STATUS "CUDAToolkit_BIN_DIR: ${CUDAToolkit_BIN_DIR}")
message(STATUS "CUDAToolkit_INCLUDE_DIRS: ${CUDAToolkit_INCLUDE_DIRS}")
message(STATUS "CUDAToolkit_LIBRARY_DIR: ${CUDAToolkit_LIBRARY_DIR}")
message(STATUS "CUDAToolkit_VERSION: ${CUDAToolkit_VERSION}")
message(STATUS "CMAKE_CUDA_COMPILER: ${CMAKE_CUDA_COMPILER}")
message(STATUS "CMAKE_CUDA_COMPILER_VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
enable_language(CUDA) # otherwise projects/CUDA will fail to compile
endif()
## --- end cihou wxl cuda
Expand Down
2 changes: 2 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Write-Output "Making minimum build with Optix..."

cmake -G Ninja -B build -DCMAKE_BUILD_TYPE="${b}" `
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" `
-DDEACTIVATE_ZLIB=ON `
-DZENO_WITH_zenvdb:BOOL=ON `
-DZENO_SYSTEM_OPENVDB:BOOL=OFF `
-DZENO_WITH_ZenoFX:BOOL=ON `
Expand All @@ -86,6 +87,7 @@ Write-Output "Making full build..."

cmake -G Ninja -B build -DCMAKE_BUILD_TYPE="${b}" `
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" `
-DDEACTIVATE_ZLIB=ON `
-DZENO_WITH_CUDA:BOOL=ON `
-DZENO_WITH_ZenoFX:BOOL=ON `
-DZENO_ENABLE_OPTIX:BOOL=ON `
Expand Down
Loading

0 comments on commit b9b4209

Please sign in to comment.