On 08/13/2015 08:24 AM, Kars de Jong wrote:
>   GNU-DetermineCompiler.cmake: support very old versions of GCC

Applied, thanks:

 GNU-DetermineCompiler: Add support for very old versions of GCC
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6699834d

>   Add support for ARTOS platform

Thanks for working on this.  Here are some comments.

For reference, EUROS was recently added here:

 Add EUROS RTOS platform description file
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=606b29d4

and was also originally based on eCos.

> +# find ARTOS stdio library
> +find_library(ARTOS_SYSTEM_STDIO_LIBRARY stdio)
> +
> +if(NOT ARTOS_SYSTEM_STDIO_LIBRARY)
> +  message(FATAL_ERROR "Could not find ARTOS \"stdio.a\". Build ARTOS first 
> and set up CMAKE_FIND_ROOT_PATH correctly.")
> +endif()

Is the "stdio" library is a system library that is expected to
be provided by the toolchain?  In this case one should not have
to use find_library and can instead just pass "stdio" as a
link item, thus trusting the linker to find it.

> +add_definitions(-DARTOS -Xp -+)
> +set(CMAKE_REQUIRED_LIBRARIES ${ARTOS_SYSTEM_STDIO_LIBRARY})

A platform information file should be completely declarative.
eCos should not be using add_definitions but has been kept
for historical reasons.  A New ARTOS module should not follow
this pattern.

Instead there should be files like

 Modules/Platform/ARTOS-GNU-C.cmake
 Modules/Platform/ARTOS-GNU-CXX.cmake

that take care of updating the compiler rules for this platform.
See Modules/Platform/Windows-MSVC-{C,CXX}.cmake for an example.
They share code in Modules/Platform/Windows-MSVC.cmake which
sets up the compiler rules with the platform-specific flags.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to