Fix native build for openSUSE_Tumbleweed 41/9941/2
authorRonan Le Martret <ronan.lemartret@iot.bzh>
Wed, 28 Jun 2017 22:35:21 +0000 (00:35 +0200)
committerRonan Le Martret <ronan.lemartret@iot.bzh>
Thu, 29 Jun 2017 09:41:37 +0000 (11:41 +0200)
 * add library specification "-pthread" to CXX_FLAGS.
  fix build error under gcc7 "undefined reference to `pthread_create'"

Change-Id: Ic952682086744f0e3f3e5f292495c7bc8b922316
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
conf.d/cmake/config.cmake

index e6a05b3..7b335e3 100644 (file)
@@ -73,7 +73,7 @@ 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")
+set(CMAKE_CXX_FLAGS "-std=c++11 -pthread")
 
 # Print a helper message when every thing is finished
 # ----------------------------------------------------
@@ -147,4 +147,4 @@ set(WIDGET_ENTRY_POINT lib/afb-low-can.so)
 # This include is mandatory and MUST happens at the end
 # of this file, else you expose you to unexpected behavior
 # -----------------------------------------------------------
-include(${PROJECT_APP_TEMPLATES_DIR}/cmake/common.cmake)
\ No newline at end of file
+include(${PROJECT_APP_TEMPLATES_DIR}/cmake/common.cmake)