Fix build for native package 51/12051/1
authorRonan Le Martret <ronan.lemartret@iot.bzh>
Mon, 20 Nov 2017 13:31:46 +0000 (14:31 +0100)
committerRonan Le Martret <ronan.lemartret@iot.bzh>
Mon, 20 Nov 2017 13:31:46 +0000 (14:31 +0100)
 * If the package is natively compile, the gcc used is the
   host gcc, and host gcc version must be >4.9. This is unneeded
   for the mode ALLOW_NO_BINDER (like in native).

Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
src/CMakeLists.txt

index 68f1505..a7d1ff9 100644 (file)
 # limitations under the License.
 ###########################################################################
 
-if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
-    message(FATAL_ERROR "Require at least gcc-4.9")
-endif(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
+if (NOT DEFINED ALLOW_NO_BINDER)
+    if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
+        message(FATAL_ERROR "Require at least gcc-4.9")
+    endif(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
+endif(ALLOW_NO_BINDER)
 
 INCLUDE(FindPkgConfig)