changeset 3620:649489b9bfdb

fix compatibility between LSB and cmake >= 3.6
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 23 Jan 2020 18:00:08 +0100
parents b6a569e6e85b
children 7d1790d4fd74 8afc14fab01f
files Resources/LinuxStandardBaseToolchain.cmake
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/LinuxStandardBaseToolchain.cmake	Thu Jan 23 12:58:08 2020 +0100
+++ b/Resources/LinuxStandardBaseToolchain.cmake	Thu Jan 23 18:00:08 2020 +0100
@@ -31,7 +31,12 @@
 
 # which compilers to use for C and C++
 SET(CMAKE_C_COMPILER ${LSB_PATH}/bin/lsbcc)
-CMAKE_FORCE_CXX_COMPILER(${LSB_PATH}/bin/lsbc++ GNU)
+
+if (${CMAKE_VERSION} VERSION_LESS "3.6.0") 
+  CMAKE_FORCE_CXX_COMPILER(${LSB_PATH}/bin/lsbc++ GNU)
+else()
+  SET(CMAKE_CXX_COMPILER ${LSB_PATH}/bin/lsbc++)
+endif()
 
 # here is the target environment located
 SET(CMAKE_FIND_ROOT_PATH ${LSB_PATH})