cmake: Use correct message modes
INFO is not a valid cmake message mode, this commit cleans up a few messages to use the correct cmake modes 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 (INFO " - Adding support for platform ${MRAAPLATFORMFORCE}")
|
||||
message (STATUS " - 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 (ERROR " - Unknown x86 platform enabled!")
|
||||
message (FATAL_ERROR " - Unknown x86 platform enabled!")
|
||||
endif ()
|
||||
else ()
|
||||
message (INFO " - Adding support for all platforms")
|
||||
message (STATUS " - Adding support for all platforms")
|
||||
endif ()
|
||||
|
||||
set (mraa_LIB_ARM_SRCS_NOAUTO
|
||||
@@ -83,7 +83,7 @@ if (ARMPLAT)
|
||||
endif()
|
||||
|
||||
if (USBPLAT)
|
||||
message (INFO " - Adding USB platforms")
|
||||
message (STATUS " - 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 (WARNING " - 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 (WARNING " - 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 ("WARN - 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 ()
|
||||
|
||||
@@ -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 (DEBUG " - Padded V8 version to match SWIG format")
|
||||
message (STATUS " - Padded V8 version to match SWIG format")
|
||||
string (LENGTH "${V8_VERSION_HEX}" V8_VERSION_HEX_length)
|
||||
endwhile ()
|
||||
|
||||
@@ -31,28 +31,28 @@ set_target_properties (mraajs PROPERTIES
|
||||
SUFFIX ".node"
|
||||
)
|
||||
|
||||
message (INFO " - swig Version ${SWIG_VERSION}")
|
||||
message (INFO " - CXX compiler Version ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
message (STATUS " - swig Version ${SWIG_VERSION}")
|
||||
message (STATUS " - CXX compiler Version ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
||||
if (${V8_VERSION_MAJOR} GREATER 3)
|
||||
message (INFO " - Using V8 version > 3 so requiring C++11 compiler")
|
||||
message (STATUS " - 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(INFO " - **WARNING** Need to use CMAKE version 3.1+, but it is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
|
||||
message(INFO " - So a workaround will be used.")
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
|
||||
message(FATAL_ERROR " 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()
|
||||
set(MRAA_CXX11_WORKAROUND_OPTION "-std=c++11")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MRAA_CXX11_WORKAROUND_OPTION} ")
|
||||
endif()
|
||||
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.")
|
||||
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.")
|
||||
endif ()
|
||||
set (MRAA_CXX11_WORKAROUND_OPTION "-std=gnu++11")
|
||||
else ()
|
||||
set (MRAA_CXX11_WORKAROUND_OPTION "-std=c++11")
|
||||
endif ()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MRAA_CXX11_WORKAROUND_OPTION} ")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
macro (mraa_CREATE_INSTALL_PACKAGE_JSON generated_file install_location)
|
||||
@@ -106,7 +106,7 @@ if (BUILDDOC)
|
||||
COMMENT "Generating API documentation with Yuidoc" VERBATIM
|
||||
)
|
||||
else ()
|
||||
message (INFO " - Failed to find Yuidoc. node.js API doc will not be generated")
|
||||
message (STATUS " - Failed to find Yuidoc. node.js API doc will not be generated")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user