diff options
Diffstat (limited to 'Modules/UseEcos.cmake')
-rw-r--r-- | Modules/UseEcos.cmake | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake index 0c4fee4e1..942bc38bb 100644 --- a/Modules/UseEcos.cmake +++ b/Modules/UseEcos.cmake @@ -1,33 +1,32 @@ -# - This module defines variables and macros required to build eCos application. +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#.rst: +# UseEcos +# ------- +# +# This module defines variables and macros required to build eCos application. +# # This file contains the following macros: # ECOS_ADD_INCLUDE_DIRECTORIES() - add the eCos include dirs -# ECOS_ADD_EXECUTABLE(name source1 ... sourceN ) - create an eCos executable -# ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN ) - adjusts the path of the source files and puts the result into VAR +# ECOS_ADD_EXECUTABLE(name source1 ... sourceN ) - create an eCos +# executable ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN ) - adjusts +# the path of the source files and puts the result into VAR # -# Macros for selecting the toolchain: -# ECOS_USE_ARM_ELF_TOOLS() - enable the ARM ELF toolchain for the directory where it is called -# ECOS_USE_I386_ELF_TOOLS() - enable the i386 ELF toolchain for the directory where it is called -# ECOS_USE_PPC_EABI_TOOLS() - enable the PowerPC toolchain for the directory where it is called +# Macros for selecting the toolchain: ECOS_USE_ARM_ELF_TOOLS() - enable +# the ARM ELF toolchain for the directory where it is called +# ECOS_USE_I386_ELF_TOOLS() - enable the i386 ELF toolchain for the +# directory where it is called ECOS_USE_PPC_EABI_TOOLS() - enable the +# PowerPC toolchain for the directory where it is called # -# It contains the following variables: -# ECOS_DEFINITIONS -# ECOSCONFIG_EXECUTABLE -# ECOS_CONFIG_FILE - defaults to ecos.ecc, if your eCos configuration file has a different name, adjust this variable -# for internal use only: -# ECOS_ADD_TARGET_LIB - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. +# It contains the following variables: ECOS_DEFINITIONS +# ECOSCONFIG_EXECUTABLE ECOS_CONFIG_FILE - defaults to ecos.ecc, if your +# eCos configuration file has a different name, adjust this variable for +# internal use only: # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. +# :: # -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) +# ECOS_ADD_TARGET_LIB # first check that ecosconfig is available find_program(ECOSCONFIG_EXECUTABLE NAMES ecosconfig) @@ -185,8 +184,8 @@ macro(ECOS_ADD_EXECUTABLE _exe_NAME ) # when using nmake makefiles, the custom buildtype supresses the default cl.exe flags # and the rules for creating objects are adjusted for gcc set(CMAKE_BUILD_TYPE CUSTOM_ECOS_BUILD) - set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <FLAGS> -o <OBJECT> -c <SOURCE>") - set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <FLAGS> -o <OBJECT> -c <SOURCE>") + set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") + set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") # special link commands for ecos-executables set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}") set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}") |