aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2017-11-20 14:31:46 +0100
committerRonan Le Martret <ronan.lemartret@iot.bzh>2017-11-20 14:31:46 +0100
commit7a42848a00166bf5d4b79d341344d81439cc3b60 (patch)
tree291dce3ba388d9018a5f11974a05a0c1daca7f6b /src/CMakeLists.txt
parent425026b352cec3980d111bdc30e8dcc77c117ee0 (diff)
Fix build for native package
* 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>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 68f1505a..a7d1ff95 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,9 +16,11 @@
# 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)