From 61850844fb8213d316fa2d356219d47079cf7fe5 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 5 Jul 2017 18:36:17 +0200 Subject: Can't set compile FLAG using set using Yocto build If set, then these are the flags that are used by bitbake without append its own flags which provides toolchain variables environment mandatory to correctly build for another target. Change-Id: Id5ddfc11c3d7d2e1eee418989aabaa73a933a41a Signed-off-by: Romain Forlot --- conf.d/cmake/config.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'conf.d/cmake/config.cmake') diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index 7b335e3..05f8468 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -70,10 +70,8 @@ set (PKG_REQUIRED_LIST # ----------------------------- add_compile_options(-D_REENTRANT) add_compile_options(-DPB_FIELD_16BIT) - -# LANG Specific compile flags set for all build types -set(CMAKE_C_FLAGS "") -set(CMAKE_CXX_FLAGS "-std=c++11 -pthread") +add_compile_options($<$:-std=c++11>) +add_compile_options($<$:-pthread>) # Print a helper message when every thing is finished # ---------------------------------------------------- -- cgit 1.2.3-korg