From 21867e1bd15ab07ebc527fbaf0d70bfcfc7b95d5 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 30 Jul 2018 13:44:09 +0900 Subject: [PATCH] lottie: Enable compiler Optimization on library. Change-Id: I4edee092788670e5438139ea60a8daa9998c6575 --- CMakeLists.txt | 2 +- meson.build | 2 +- packaging/lottie-player.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index daf3d6b..8e8f161 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ target_compile_options(lottie-player PUBLIC -std=c++14 PRIVATE - -Wall -fvisibility=hidden) + -Wall -fvisibility=hidden -O2) #declare dependancy set( CMAKE_THREAD_PREFER_PTHREAD TRUE ) diff --git a/meson.build b/meson.build index 8abff81..9552d9b 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ lottie_player_lib_version = '0.0.1' add_global_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_source_dir()), language : 'cpp') -compiler_flags = ['-Wall','-std=c++14', '-fvisibility=hidden'] +compiler_flags = ['-Wall', '-O2', '-std=c++14', '-fvisibility=hidden'] if (build_machine.system() == 'linux') compiler_flags += ['-pthread'] diff --git a/packaging/lottie-player.spec b/packaging/lottie-player.spec index cc4e78a..6e343fa 100644 --- a/packaging/lottie-player.spec +++ b/packaging/lottie-player.spec @@ -29,7 +29,7 @@ lottie player library (devel) %build -export CFLAGS+=" -fvisibility=hidden -fPIC -Wall" +export CFLAGS+=" -fvisibility=hidden -fPIC -Wall -O2" export LDFLAGS+=" " -- 2.7.4