mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
cmake: Cleanup of cmake messages.
* Removed unessesary spaces. * Changed INFO to STATUS since INFO is not a cmake message keyword. * Changed a few messages from status/info to warning. * Fixed trailing carriage return on yuidoc execute_process. * Removed my debug messages for CXX vs C. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
09b1bb9a60
commit
2b6dd5f3fd
@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.8.11)
|
||||
project (upm)
|
||||
|
||||
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
message("WARNING: building into sources dir can be risky, prefer other directory")
|
||||
message (WARNING "Building into sources dir can be risky, prefer other directory")
|
||||
endif ()
|
||||
|
||||
find_package (Threads REQUIRED)
|
||||
@ -11,7 +11,7 @@ find_package (PkgConfig REQUIRED)
|
||||
# Force a libmraa search and minimum required version every time a config is generated
|
||||
unset(MRAA_FOUND CACHE)
|
||||
pkg_check_modules (MRAA REQUIRED mraa>=1.1.1)
|
||||
message (INFO " found mraa version: ${MRAA_VERSION}")
|
||||
message (STATUS "found mraa version: ${MRAA_VERSION}")
|
||||
|
||||
# Appends the cmake/modules path to MAKE_MODULE_PATH variable.
|
||||
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
||||
@ -28,7 +28,7 @@ if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_-128-
|
||||
set (VERSION "v0.8.0-dirty")
|
||||
endif ()
|
||||
|
||||
message (INFO " - UPM Version ${VERSION}")
|
||||
message (STATUS "UPM Version ${VERSION}")
|
||||
|
||||
# Parse the version information into pieces.
|
||||
string (REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${VERSION}")
|
||||
@ -77,7 +77,7 @@ endif ()
|
||||
# Detect arch
|
||||
include (TargetArch)
|
||||
target_architecture (DETECTED_ARCH)
|
||||
message( INFO " - Target arch is ${DETECTED_ARCH}")
|
||||
message (STATUS "Target arch is ${DETECTED_ARCH}")
|
||||
|
||||
#-march=native for ARM when not defined/forced
|
||||
if (DETECTED_ARCH MATCHES "arm.*" AND NOT CMAKE_CXX_FLAGS MATCHES "-march")
|
||||
@ -182,7 +182,7 @@ if (IPK)
|
||||
set (TARGET_ARCH ${DETECTED_ARCH})
|
||||
endif ()
|
||||
endif ()
|
||||
message (INFO " - Package arch is ${TARGET_ARCH}")
|
||||
message (STATUS "Package arch is ${TARGET_ARCH}")
|
||||
|
||||
set(CPACK_GENERATOR "DEB")
|
||||
set(OPKG_ARCH ${TARGET_ARCH})
|
||||
@ -207,7 +207,7 @@ if (IPK)
|
||||
endif()
|
||||
|
||||
if (RPM)
|
||||
message (INFO " - RPM packaging enabled for ${DETECTED_ARCH}")
|
||||
message (STATUS "RPM packaging enabled for ${DETECTED_ARCH}")
|
||||
set(CPACK_PACKAGE_VERSION ${VERSION})
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
set(CPACK_PACKAGE_NAME "upm")
|
||||
|
@ -95,7 +95,7 @@ IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
|
||||
# $ dpkg --print-architecture
|
||||
FIND_PROGRAM(DPKG_CMD dpkg)
|
||||
IF(NOT DPKG_CMD)
|
||||
MESSAGE(STATUS "Can not find dpkg in your path, default to i386.")
|
||||
MESSAGE(WARNING "Can not find dpkg in your path, default to i386.")
|
||||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
|
||||
ENDIF(NOT DPKG_CMD)
|
||||
EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
|
||||
|
@ -89,8 +89,8 @@ if (NODEJS_EXECUTABLE)
|
||||
endif ()
|
||||
string (REGEX REPLACE "\n" "" NODE_VERSION_STRING ${NODE_VERSION_STRING})
|
||||
string (REGEX REPLACE "\n" "" V8_VERSION_STRING ${V8_VERSION_STRING})
|
||||
message ("INFO - Node version is " ${NODE_VERSION_STRING})
|
||||
message ("INFO - Node using v8 " ${V8_VERSION_STRING})
|
||||
message (STATUS "Node version is ${NODE_VERSION_STRING}")
|
||||
message (STATUS "Node using v8 ${V8_VERSION_STRING}")
|
||||
mark_as_advanced (NODEJS_EXECUTABLE)
|
||||
endif ()
|
||||
|
||||
|
@ -23,7 +23,7 @@ if (SPHINX_EXECUTABLE)
|
||||
OUTPUT_VARIABLE SPHINX_VERSION)
|
||||
if(SPHINX_VERSION)
|
||||
string(REGEX MATCH "([0-9]\\.[0-9]\\.[0-9])" SPHINX_VERSION_STR ${SPHINX_VERSION})
|
||||
message ("INFO - Sphinx version is " ${SPHINX_VERSION_STR})
|
||||
message (STATUS "Sphinx version is ${SPHINX_VERSION_STR}")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
|
@ -14,9 +14,11 @@ find_package_handle_standard_args (Yuidoc DEFAULT_MSG
|
||||
# Get Yuidoc version
|
||||
if (YUIDOC_EXECUTABLE)
|
||||
execute_process(COMMAND ${YUIDOC_EXECUTABLE} --version
|
||||
ERROR_VARIABLE YUIDOC_VERSION)
|
||||
ERROR_VARIABLE YUIDOC_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
if(YUIDOC_VERSION)
|
||||
message ("INFO - Yuidoc version is " ${YUIDOC_VERSION})
|
||||
message (STATUS "Yuidoc version is ${YUIDOC_VERSION}")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
|
@ -41,8 +41,8 @@ macro(add_custom_example example_bin example_src example_module_list)
|
||||
target_link_libraries (${example_bin} ${module})
|
||||
endforeach()
|
||||
else()
|
||||
MESSAGE(INFO " Ignored ${example_bin}")
|
||||
set (example_bin "")
|
||||
message (WARNING "Ignored ${example_bin}")
|
||||
set (example_bin "")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@ -66,7 +66,7 @@ macro(add_example example_name)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
MESSAGE(INFO " Ignored ${example_bin}")
|
||||
message (WARNING "Ignored ${example_bin}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
@ -41,8 +41,8 @@ macro(add_custom_example example_bin example_src example_module_list)
|
||||
target_link_libraries (${example_bin} ${module}-c)
|
||||
endforeach()
|
||||
else()
|
||||
MESSAGE(INFO " Ignored ${example_bin}")
|
||||
set (example_bin "")
|
||||
message (WARNING "Ignored ${example_bin}")
|
||||
set (example_bin "")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@ -66,7 +66,7 @@ macro(add_example example_name)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
MESSAGE(INFO " Ignored ${example_bin}")
|
||||
message (WARNING "Ignored ${example_bin}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
@ -84,7 +84,7 @@ macro(upm_swig_node)
|
||||
if (${V8_VERSION_MAJOR} GREATER 3)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
|
||||
message(FATAL_ERROR " **ERROR** GCC 4.7 or above is required to compile jsupm_${libname} ")
|
||||
message(FATAL_ERROR "FATAL_ERROR: GCC 4.7 or above is required to compile jsupm_${libname} ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -95,7 +95,7 @@ macro(upm_swig_node)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
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.")
|
||||
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 (UPM_CXX11_WORKAROUND_OPTION "-std=gnu++11")
|
||||
else ()
|
||||
@ -191,7 +191,7 @@ if (SWIG_FOUND)
|
||||
find_package(Node)
|
||||
endif()
|
||||
if(SWIG_VERSION VERSION_LESS 3.0.5 AND NODE_VERSION_STRING VERSION_GREATER 0.12)
|
||||
message("WARNING - SWIG 3.0.5+ required for building with nodejs 0.12. Current version is ${SWIG_VERSION}")
|
||||
message(WARNING "WARNING - SWIG 3.0.5+ required for building with nodejs 0.12. Current version is ${SWIG_VERSION}")
|
||||
endif()
|
||||
find_path (NODE_ROOT_DIR "include/node/node.h")
|
||||
set (NODE_INCLUDE_DIRS
|
||||
@ -257,9 +257,7 @@ function (UPM_MIXED_MODULE_INIT)
|
||||
if (BUILDFTI AND UPM_MIXED_MODULE_INIT_FTI_SRC)
|
||||
#set (module_src ${UPM_MIXED_MODULE_INIT_C_SRC} ${UPM_MIXED_MODULE_INIT_FTI_SRC})
|
||||
list (APPEND module_src ${UPM_MIXED_MODULE_INIT_FTI_SRC})
|
||||
message ( INFO " XXX BUILDING FTI ${UPM_MIXED_MODULE_INIT_FTI_SRC}")
|
||||
endif (BUILDFTI AND UPM_MIXED_MODULE_INIT_FTI_SRC)
|
||||
message ( INFO " XXX BUILDING C src ${module_src}")
|
||||
|
||||
# Add include directories for C
|
||||
include_directories (${UPM_COMMON_HEADER_DIRS}
|
||||
@ -288,7 +286,6 @@ function (UPM_MIXED_MODULE_INIT)
|
||||
# Reset the libname (upm_module_init can change it)
|
||||
set (libname ${UPM_MIXED_MODULE_INIT_NAME})
|
||||
unset (IS_C_LIBRARY)
|
||||
message ( INFO " XXX BUILDING C++ src ${module_src}")
|
||||
upm_module_init()
|
||||
|
||||
# If the C++ wraps the C target, add the C target as a dependency
|
||||
@ -368,7 +365,7 @@ if (BUILDDOC AND BUILDSWIGPYTHON AND SWIG_FOUND)
|
||||
# BUILDDOC not set but still building python modules, generate an empty
|
||||
# pyupm_doxy2swig.i file (overwriting if necessary)
|
||||
elseif (BUILDSWIGPYTHON AND SWIG_FOUND)
|
||||
message (INFO " Generating empty ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i")
|
||||
message (STATUS "Generating empty ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i")
|
||||
file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i "// Empty doxy2swig stub")
|
||||
endif (BUILDDOC AND BUILDSWIGPYTHON AND SWIG_FOUND)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user