aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-07-05 18:36:17 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-08-08 18:22:48 +0200
commit85099f34f7c15f041c84b541cb121be5ab7c61a2 (patch)
treea880b3eee0dd26ab15a375a71c2bbb2908cb9cee
parentcaff40b454188f19214411347e01f8bfb2775690 (diff)
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 <romain.forlot@iot.bzh>
-rw-r--r--conf.d/cmake/config.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index 338b9001..a1c9067a 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -78,10 +78,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($<$<COMPILE_LANGUAGE:CXX>:-std=c++11>)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-pthread>)
# Customize link option
# -----------------------------