cmake: Fix message handling
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -32,7 +32,7 @@ set (mraa_LIB_X86_SRCS_NOAUTO
|
||||
${PROJECT_SOURCE_DIR}/src/x86/up.c
|
||||
)
|
||||
|
||||
message (STATUS " - Adding support for platform ${MRAAPLATFORMFORCE}")
|
||||
message (STATUS "INFO - Adding support for platform ${MRAAPLATFORMFORCE}")
|
||||
|
||||
#keywords in if statements are case sensitive
|
||||
if (NOT ${MRAAPLATFORMFORCE} STREQUAL "ALL")
|
||||
@@ -56,10 +56,10 @@ if (NOT ${MRAAPLATFORMFORCE} STREQUAL "ALL")
|
||||
elseif (${MRAAPLATFORMFORCE} STREQUAL "MRAA_UP")
|
||||
set (mraa_LIB_X86_SRCS_NOAUTO ${PROJECT_SOURCE_DIR}/src/x86/x86.c ${PROJECT_SOURCE_DIR}/src/x86/up.c)
|
||||
else ()
|
||||
message (FATAL_ERROR " - Unknown x86 platform enabled!")
|
||||
message (FATAL_ERROR "Unknown x86 platform enabled!")
|
||||
endif ()
|
||||
else ()
|
||||
message (STATUS " - Adding support for all platforms")
|
||||
message (STATUS "INFO - Adding support for all platforms")
|
||||
endif ()
|
||||
|
||||
set (mraa_LIB_ARM_SRCS_NOAUTO
|
||||
@@ -83,7 +83,7 @@ if (ARMPLAT)
|
||||
endif()
|
||||
|
||||
if (USBPLAT)
|
||||
message (STATUS " - Adding USB platforms")
|
||||
message (STATUS "INFO - Adding USB platforms")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSBPLAT=1")
|
||||
if (FTDID2xx)
|
||||
find_package (Ftd2xx)
|
||||
@@ -91,7 +91,7 @@ if (USBPLAT)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFTDID2XX=1")
|
||||
set (mraa_LIBS ${mraa_LIBS} ${LIBFTD2XX_LIBRARIES})
|
||||
else ()
|
||||
message (SEND_ERROR " - Enabled FTDID2xx support but library not found")
|
||||
message (SEND_ERROR "Enabled FTDID2xx support but library not found")
|
||||
endif ()
|
||||
endif ()
|
||||
if (FTDI4222)
|
||||
@@ -100,7 +100,7 @@ if (USBPLAT)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFTDI4222=1")
|
||||
set (mraa_LIBS ${mraa_LIBS} dl)
|
||||
else ()
|
||||
message (SEND_ERROR " - Enabled FTDI4222 support but library not found")
|
||||
message (SEND_ERROR "Enabled FTDI4222 support but library not found")
|
||||
endif ()
|
||||
endif ()
|
||||
add_subdirectory(usb)
|
||||
@@ -181,7 +181,7 @@ if (BUILDSWIG)
|
||||
if (SWIG_VERSION VERSION_GREATER 3.0.4)
|
||||
add_subdirectory (javascript)
|
||||
else ()
|
||||
message (SEND_ERROR " - SWIG is ${SWIG_VERSION}. Please upgrade to 3.0.5+ to build nodejs addon")
|
||||
message (SEND_ERROR "SWIG is ${SWIG_VERSION}. Please upgrade to 3.0.5+ to build nodejs addon")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -14,7 +14,7 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DJAVACALLBACK")
|
||||
|
||||
if (NOT DEFINED ENV{JAVA_HOME_NATIVE})
|
||||
if (NOT DEFINED ENV{JAVA_HOME})
|
||||
message (FATAL_ERROR " - Neither JAVA_HOME nor JAVA_HOME_NATIVE are set")
|
||||
message (FATAL_ERROR "Neither JAVA_HOME nor JAVA_HOME_NATIVE are set")
|
||||
endif()
|
||||
set (JAVA_HOME_NATIVE $ENV{JAVA_HOME})
|
||||
set (JAVAC $ENV{JAVA_HOME}/bin/javac)
|
||||
|
||||
@@ -13,7 +13,7 @@ set (V8_VERSION_HEX 0x0${V8_VERSION_MAJOR}${V8_VERSION_MINOR}${V8_VERSION_PATCH}
|
||||
string (LENGTH "${V8_VERSION_HEX}" V8_VERSION_HEX_length)
|
||||
while (V8_VERSION_HEX_length LESS 8)
|
||||
set (V8_VERSION_HEX "${V8_VERSION_HEX}0")
|
||||
message (STATUS " - Padded V8 version to match SWIG format")
|
||||
message (STATUS "INFO - Padded V8 version to match SWIG format")
|
||||
string (LENGTH "${V8_VERSION_HEX}" V8_VERSION_HEX_length)
|
||||
endwhile ()
|
||||
|
||||
@@ -31,21 +31,20 @@ set_target_properties (mraajs PROPERTIES
|
||||
SUFFIX ".node"
|
||||
)
|
||||
|
||||
message (STATUS " - swig Version ${SWIG_VERSION}")
|
||||
message (STATUS " - CXX compiler Version ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
message (STATUS "INFO - swig Version ${SWIG_VERSION}")
|
||||
message (STATUS "INFO - CXX compiler Version ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
||||
if (${V8_VERSION_MAJOR} GREATER 3)
|
||||
message (STATUS " - Using V8 version > 3 so requiring C++11 compiler")
|
||||
message (STATUS "INFO - Using V8 version > 3 so requiring C++11 compiler")
|
||||
# Node 0.12.x V8 engine major version is '3'.
|
||||
# Node 2.1.0 V8 engine major version is '4'.
|
||||
set_property (TARGET mraajs PROPERTY CXX_STANDARD 11)
|
||||
set_property (TARGET mraajs PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
message (SEND_ERROR " - Need to use CMAKE version 3.1+, but it is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
|
||||
message (STATUS " - So a workaround will be used.")
|
||||
message (SEND_ERROR "Need to use CMAKE version 3.1+, but it is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}, using a workaround.")
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
|
||||
message (FATAL_ERROR " - GNU gcc compiler is also too old (need 4.7+, but ${CMAKE_CXX_COMPILER_VERSION}) and does not support C++11 standard.")
|
||||
message (FATAL_ERROR "GNU gcc compiler is also too old (need 4.7+, but ${CMAKE_CXX_COMPILER_VERSION}) and does not support C++11 standard.")
|
||||
endif ()
|
||||
set (MRAA_CXX11_WORKAROUND_OPTION "-std=gnu++11")
|
||||
else ()
|
||||
@@ -106,7 +105,7 @@ if (BUILDDOC)
|
||||
COMMENT "Generating API documentation with Yuidoc" VERBATIM
|
||||
)
|
||||
else ()
|
||||
message (STATUS " - Failed to find Yuidoc. node.js API doc will not be generated")
|
||||
message (STATUS "INFO - Failed to find Yuidoc. node.js API doc will not be generated")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user