mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Update SConstruct use pthread.
This commit is contained in:
parent
60a0ba4280
commit
c5c073b126
13
SConstruct
13
SConstruct
|
@ -68,17 +68,18 @@ if 'MSVS' in env_x86:
|
||||||
# /GL = enable whole program optimization
|
# /GL = enable whole program optimization
|
||||||
# /LTCG = link time code generation
|
# /LTCG = link time code generation
|
||||||
# /arch:SSE2 = use SSE2 (x86 only)
|
# /arch:SSE2 = use SSE2 (x86 only)
|
||||||
|
# win32-pthreads is assumed to be in same level as kvazaar in dir pthreads
|
||||||
env_x86.Append(
|
env_x86.Append(
|
||||||
CCFLAGS='/MD /Ox /GL /arch:SSE2',
|
CCFLAGS=r'/MD /Ox /GL /arch:SSE2 /I"..\..\pthreads\include"',
|
||||||
LINKFLAGS='/LTCG')
|
LINKFLAGS=r'/LTCG /LIBPATH:"..\..\pthreads\x86" "pthreadVC2.lib"')
|
||||||
env_x64.Append(
|
env_x64.Append(
|
||||||
CCFLAGS='/MD /Ox /GL /openmp',
|
CCFLAGS=r'/MD /Ox /GL /I"..\..\pthreads\include"',
|
||||||
LINKFLAGS='/LTCG')
|
LINKFLAGS=r'/LTCG /LIBPATH:"..\pthreads\x64" "pthreadVC2.lib"')
|
||||||
else:
|
else:
|
||||||
# GCC flags
|
# GCC flags
|
||||||
# -m for arch, -O2 for optimization, -lm for math lib
|
# -m for arch, -O2 for optimization, -lm for math lib
|
||||||
env_x86.MergeFlags('-m32 -O2 -lm -march=native -fopenmp')
|
env_x86.MergeFlags('-m32 -O2 -lm -march=native -pthread')
|
||||||
env_x64.MergeFlags('-m64 -O2 -lm -march=native -fopenmp')
|
env_x64.MergeFlags('-m64 -O2 -lm -march=native -pthread')
|
||||||
|
|
||||||
# VS2010 linker and mingw64 need TMP.
|
# VS2010 linker and mingw64 need TMP.
|
||||||
if 'TMP' in os.environ:
|
if 'TMP' in os.environ:
|
||||||
|
|
Loading…
Reference in a new issue