Comments (2)
So my problem was the ${CMAKE_SOURCE_DIR}
used in the pbrt-v4 cmake. As this did not represent the path where I had put the project.
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pbrt_soa.h
COMMAND soac ${CMAKE_SOURCE_DIR}/src/pbrt/pbrt.soa > ${CMAKE_CURRENT_BINARY_DIR}/pbrt_soa.h
DEPENDS soac ${CMAKE_SOURCE_DIR}/src/pbrt/pbrt.soa)
set (PBRT_SOA_GENERATED ${CMAKE_CURRENT_BINARY_DIR}/pbrt_soa.h)
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wavefront_workitems_soa.h
COMMAND soac ${CMAKE_SOURCE_DIR}/src/pbrt/wavefront/workitems.soa > ${CMAKE_CURRENT_BINARY_DIR}/wavefront_workitems_soa.h
DEPENDS soac ${CMAKE_SOURCE_DIR}/src/pbrt/wavefront/workitems.soa)
set (PBRT_SOA_GENERATED ${PBRT_SOA_GENERATED} ${CMAKE_CURRENT_BINARY_DIR}/wavefront_workitems_soa.h)
So I used edited the cmake to use PROJECT_SOURCE_CODE
https://cmake.org/cmake/help/v2.8.12/cmake.html#variable%3aPROJECT_SOURCE_DIR
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pbrt_soa.h
COMMAND soac ${PBRT_SOURCE_DIR}/src/pbrt/pbrt.soa > ${CMAKE_CURRENT_BINARY_DIR}/pbrt_soa.h
DEPENDS soac ${PBRT_SOURCE_DIR}/src/pbrt/pbrt.soa)
set(PBRT_SOA_GENERATED ${CMAKE_CURRENT_BINARY_DIR}/pbrt_soa.h)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wavefront_workitems_soa.h
COMMAND soac ${PBRT_SOURCE_DIR}/src/pbrt/wavefront/workitems.soa > ${CMAKE_CURRENT_BINARY_DIR}/wavefront_workitems_soa.h
DEPENDS soac ${PBRT_SOURCE_DIR}/src/pbrt/wavefront/workitems.soa)
set(PBRT_SOA_GENERATED ${PBRT_SOA_GENERATED} ${CMAKE_CURRENT_BINARY_DIR}/wavefront_workitems_soa.h)
And as such I got further.
So my case it was set(PBRT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/pbrt-v4)
I think that you should use the PROJECT_SOURCE_CODE
and if it is not set, default to CMAKE_SOURCE_DIR
from pbrt-v4.
@Togtja, this is a good solution. I would argue that CMAKE_CURRENT_SOURCE_DIR is a little more appropriate here since it works independent of project().
Also, thanks for fixing the other places where CMAKE_SOURCE_DIR was used. The other build failure was related to FindSanitizers.cmake.
from pbrt-v4.
Related Issues (20)
- build pbrt in Windows with CUDA errors HOT 3
- Denoiser not being initialized for OptiX 8.0.0
- GPU compiling error with -DPBRT_FLOAT_AS_DOUBLE HOT 1
- Periodic Radiance Values for Spectral Render
- spectrum.h not defined in the pbrt/base
- gpu runs failing: Invalid PTX input HOT 1
- Build issue vs 2022 cuda 12.5 optix 7.7 win 11 HOT 3
- Final image is black when using GPU HOT 2
- GPU rendering not working with MSCV Version 14.40 and newer HOT 1
- A question about CUDA constant memory initialization. HOT 1
- Trouble replicating Radiance results with diffusive materials HOT 2
- Compiling Error aggregate.cpp with optix7 and NVCC 12.5 and GCC 11.4 in Ubuntu 22.04 HOT 2
- simple scattering scene for simplevolpath HOT 2
- Equivalent of Kt and Kr in dielectric material? HOT 3
- Build errors using Linux (both with gcc 13.2.1 and clang 17.0.6) HOT 2
- Default parameters with sample Crown scene is noisy HOT 1
- `pbrt/gpu` and `pbrt/wavefront` compilation fails HOT 1
- Docker file in Ubuntu
- pbrt_exe (Release) crashing HOT 12
- Incorrect Motion Blur with SPPM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pbrt-v4.