Closed tsulej closed 6 years ago
I've tried to compile pbrt under Cygwin. There are three problems. All were introduced with this commit: https://github.com/mmp/pbrt-v3/commit/d42c4b08a8abeae203b201de8e7103d461014b67
setitimer detection in CMakeFile (https://github.com/mmp/pbrt-v3/issues/127 fixed previously with commit https://github.com/mmp/pbrt-v3/commit/957018c77c692a901f0881a536ea062c1addb675) is wrong. setitimer is available under Cygwin but is not implemented for ITIMER_PROF. That means that setitimer call returns -1 and this should be checked during the test.
setitimer
-1
PBRT_THREAD_LOCAL should be equal to __thread for Cygwin. There is a bug in gcc compiler under Cygwin (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697) when thread_local is used.
PBRT_THREAD_LOCAL
__thread
thread_local
In CMakeFile, noinline part, PBRT_NOINLINE=__declspec(noinline) - parentheses should be escaped: PBRT_NOINLINE=__declspec\\(noinline\\).
PBRT_NOINLINE=__declspec(noinline)
PBRT_NOINLINE=__declspec\\(noinline\\)
I believe that the change I pushed will fix all three of these but can't easily test it; please let me know if it does.
Testing. It still has some errors. I'll prepare PR.
I've tried to compile pbrt under Cygwin. There are three problems. All were introduced with this commit: https://github.com/mmp/pbrt-v3/commit/d42c4b08a8abeae203b201de8e7103d461014b67
setitimer
detection in CMakeFile (https://github.com/mmp/pbrt-v3/issues/127 fixed previously with commit https://github.com/mmp/pbrt-v3/commit/957018c77c692a901f0881a536ea062c1addb675) is wrong.setitimer
is available under Cygwin but is not implemented for ITIMER_PROF. That means thatsetitimer
call returns-1
and this should be checked during the test.PBRT_THREAD_LOCAL
should be equal to__thread
for Cygwin. There is a bug in gcc compiler under Cygwin (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697) whenthread_local
is used.In CMakeFile, noinline part,
PBRT_NOINLINE=__declspec(noinline)
- parentheses should be escaped:PBRT_NOINLINE=__declspec\\(noinline\\)
.