mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-09 22:45:11 +00:00
Add toolchain.cmake.in and include_override/assert.h for the colcon
cross-build. Key differences from the old robertobucher port:
- Drop -DCLOCK_MONOTONIC=0: NuttX defines CLOCK_MONOTONIC=1 and
the override broke nanosleep() on newer kernels.
- CMAKE_SYSTEM_PROCESSOR is a placeholder substituted per-arch.
- include_override/assert.h works around the rosidl NDEBUG issue
(https://github.com/ros2/rosidl/pull/739).
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
41 lines
1.6 KiB
C
41 lines
1.6 KiB
C
/****************************************************************************
|
|
* apps/system/microros/micro_ros_lib/include_override/assert.h
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership. The
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance with the
|
|
* License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
* License for the specific language governing permissions and limitations
|
|
* under the License.
|
|
*
|
|
****************************************************************************/
|
|
|
|
#ifndef __MICROROS_INCLUDE_OVERRIDE_ASSERT_H
|
|
#define __MICROROS_INCLUDE_OVERRIDE_ASSERT_H
|
|
|
|
/****************************************************************************
|
|
* Included Files
|
|
****************************************************************************/
|
|
|
|
/* Pull the system assert.h, then redefine assert to a no-op when NDEBUG is
|
|
* set. Avoids an assert redefinition conflict in rosidl typesupport.
|
|
*/
|
|
|
|
#include_next <assert.h>
|
|
|
|
#ifdef NDEBUG
|
|
# undef assert
|
|
# define assert(x) ((void)(0))
|
|
#endif
|
|
|
|
#endif /* __MICROROS_INCLUDE_OVERRIDE_ASSERT_H */
|