Miscellaneous compilation fixes for Linux (#36)

* Remove a lingering prctl call
Fixes #34

* Fix COLLADA DOM library name

* Merge calls in Linux and MacOS
metadata
L. E. Segovia 2017-10-08 20:34:29 -03:00 committed by Wenzel Jakob
parent 9110048040
commit 463e09207b
3 changed files with 6 additions and 9 deletions

View File

@ -4,7 +4,7 @@ BUILDDIR = '#build/debug'
DISTDIR = '#dist' DISTDIR = '#dist'
CXX = 'g++' CXX = 'g++'
CC = 'gcc' CC = 'gcc'
CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2'] CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2', '-std=c++11', '-fPIC']
LINKFLAGS = [] LINKFLAGS = []
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++'] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++']
BASEINCLUDE = ['#include'] BASEINCLUDE = ['#include']
@ -19,8 +19,8 @@ XERCESLIB = ['xerces-c']
GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11'] GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11']
GLFLAGS = ['-DGLEW_MX'] GLFLAGS = ['-DGLEW_MX']
BOOSTLIB = ['boost_system', 'boost_filesystem', 'boost_thread'] BOOSTLIB = ['boost_system', 'boost_filesystem', 'boost_thread']
COLLADAINCLUDE = ['/usr/include/collada-dom', '/usr/include/collada-dom/1.4'] COLLADAINCLUDE = ['/usr/include/collada-dom2.4', '/usr/include/collada-dom2.4/1.4']
COLLADALIB = ['collada14dom', 'xml2'] COLLADALIB = ['collada-dom2.4-dp']
FFTWLIB = ['fftw3_threads', 'fftw3'] FFTWLIB = ['fftw3_threads', 'fftw3']
# The following runs a helper script to search for installed Python # The following runs a helper script to search for installed Python

View File

@ -19,8 +19,8 @@ XERCESLIB = ['xerces-c']
GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11'] GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11']
GLFLAGS = ['-DGLEW_MX'] GLFLAGS = ['-DGLEW_MX']
BOOSTLIB = ['boost_system', 'boost_filesystem', 'boost_thread'] BOOSTLIB = ['boost_system', 'boost_filesystem', 'boost_thread']
COLLADAINCLUDE = ['/usr/include/collada-dom', '/usr/include/collada-dom/1.4'] COLLADAINCLUDE = ['/usr/include/collada-dom2.4', '/usr/include/collada-dom2.4/1.4']
COLLADALIB = ['collada14dom', 'xml2'] COLLADALIB = ['collada-dom2.4-dp']
FFTWLIB = ['fftw3_threads', 'fftw3'] FFTWLIB = ['fftw3_threads', 'fftw3']
# The following runs a helper script to search for installed Python # The following runs a helper script to search for installed Python
@ -33,4 +33,3 @@ import sys, os
sys.path.append(os.path.abspath('../data/scons')) sys.path.append(os.path.abspath('../data/scons'))
from detect_python import detect_python from detect_python import detect_python
locals().update(detect_python()) locals().update(detect_python())

View File

@ -633,9 +633,7 @@ void Thread::initializeOpenMP(size_t threadCount) {
} }
const std::string threadName = "Mitsuba: " + thread->getName(); const std::string threadName = "Mitsuba: " + thread->getName();
#if defined(__LINUX__) #if defined(__LINUX__) || defined(__OSX__)
prctl(PR_SET_NAME, threadName.c_str());
#elif defined(__OSX__)
pthread_setname_np(threadName.c_str()); pthread_setname_np(threadName.c_str());
#elif defined(__WINDOWS__) #elif defined(__WINDOWS__)
SetThreadName(threadName.c_str()); SetThreadName(threadName.c_str());