From bf4d398d4e474dc4aba0e33094d45fb53406d593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 22 Dec 2017 12:24:40 +0100 Subject: Do not require OpenMP for non-tools builds (export templates) --- platform/osx/detect.py | 2 +- platform/windows/detect.py | 4 ++-- platform/x11/detect.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/osx/detect.py b/platform/osx/detect.py index e8a8319431..5b04ab8826 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -82,7 +82,7 @@ def configure(env): env['RANLIB'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ranlib" env['AS'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-as" env.Append(CCFLAGS=['-D__MACPORTS__']) #hack to fix libvpx MM256_BROADCASTSI128_SI256 define - if (env["openmp"]): + if env['tools'] and env['openmp']: env.Append(CPPFLAGS=['-fopenmp']) env.Append(LINKFLAGS=['-fopenmp']) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 564359d743..e216868bd8 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -191,7 +191,7 @@ def configure(env): if (env["use_lto"]): env.Append(CCFLAGS=['/GL']) env.Append(LINKFLAGS=['/LTCG']) - if (env["openmp"]): + if env['tools'] and env['openmp']: env.Append(CPPFLAGS=['/openmp']) env.Append(CCFLAGS=["/I" + p for p in os.getenv("INCLUDE").split(";")]) @@ -270,7 +270,7 @@ def configure(env): env.Append(CCFLAGS=['-flto']) env.Append(LINKFLAGS=['-flto=' + str(env.GetOption("num_jobs"))]) - if (env["openmp"]): + if env['tools'] and env['openmp']: env.Append(CPPFLAGS=['-fopenmp']) env.Append(LINKFLAGS=['-fopenmp']) diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 09bf57c5f1..98ae9a8658 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -265,7 +265,7 @@ def configure(env): env.Append(LINKFLAGS=['-m64', '-L/usr/lib/i686-linux-gnu']) - if env["openmp"]: + if env['tools'] and env['openmp']: env.Append(CPPFLAGS=['-fopenmp']) env.Append(LINKFLAGS=['-fopenmp']) -- cgit v1.2.3