aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-06-14 11:16:39 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-06-14 12:04:00 +0200
commitf65761cff834757e97165fb2de5cffa332c9a1e5 (patch)
tree7c5dfeb526dc305ad6ae07152b09b0fff45d34bc /cmake
parent3965d37f1c51cd2e0f86b160f4145d235f88e55e (diff)
02-variables.cmake: Avoid checking CXX version if not required
Change-Id: Id5a8987d3222df9cfaa258cdce8353dad6ca9a4a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/cmake.d/02-variables.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/cmake.d/02-variables.cmake b/cmake/cmake.d/02-variables.cmake
index dc1c313..693991a 100644
--- a/cmake/cmake.d/02-variables.cmake
+++ b/cmake/cmake.d/02-variables.cmake
@@ -103,7 +103,7 @@ set(AFB_REMPORT "1234" CACHE PATH "Default AFB_TOKEN")
if (gcc_minimal_version)
message (STATUS "${Cyan}-- Check gcc_minimal_version (found gcc version ${CMAKE_C_COMPILER_VERSION}) \
(found g++ version ${CMAKE_CXX_COMPILER_VERSION})${ColourReset}")
-if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version} OR CMAKE_C_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version})
+if (("${PROJECT_LANGUAGES}" MATCHES "CXX" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version}) OR CMAKE_C_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version})
message(FATAL_ERROR "${Red}**** FATAL: Require at least gcc-${gcc_minimal_version} please set CMAKE_C[XX]_COMPILER")
endif()
endif(gcc_minimal_version)