Browse Source

exclude macro hack for tests target

sbg
Thomas Gubler 10 years ago
parent
commit
e855e4454c
  1. 2
      src/platforms/px4_defines.h
  2. 1
      unittests/CMakeLists.txt

2
src/platforms/px4_defines.h

@ -177,9 +177,11 @@ typedef param_t px4_param_t; @@ -177,9 +177,11 @@ typedef param_t px4_param_t;
#define PX4_PARAM_GET_BYNAME(_name, _destpt) param_get(param_find(_name), _destpt)
/* XXX this is a hack to resolve conflicts with NuttX headers */
#if !defined(__PX4_TESTS)
#define isspace(c) \
((c) == ' ' || (c) == '\t' || (c) == '\n' || \
(c) == '\r' || (c) == '\f' || c== '\v')
#endif
#endif

1
unittests/CMakeLists.txt

@ -11,6 +11,7 @@ include_directories(${CMAKE_SOURCE_DIR}/../src/modules) @@ -11,6 +11,7 @@ include_directories(${CMAKE_SOURCE_DIR}/../src/modules)
include_directories(${CMAKE_SOURCE_DIR}/../src/lib)
add_definitions(-D__EXPORT=)
add_definitions(-D__PX4_TESTS)
function(add_gtest)
foreach(test_name ${ARGN})

Loading…
Cancel
Save