mirror of
https://github.com/gosticks/RIOT.git
synced 2026-10-04 14:57:14 +00:00
tests: add test for cpp files exclude
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
MODULE = module_exclude
|
||||
|
||||
SRCXXEXCLUDE := module_excluded.cpp
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
@@ -0,0 +1 @@
|
||||
FEATURES_REQUIRED += cpp
|
||||
@@ -0,0 +1,3 @@
|
||||
# Use an immediate variable to evaluate `MAKEFILE_LIST` now
|
||||
USEMODULE_INCLUDES_module_exclude := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_module_exclude)
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Inria
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup tests
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Sample module C++ class
|
||||
*
|
||||
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "module.hpp"
|
||||
|
||||
module_class::module_class() {}
|
||||
|
||||
module_class::~module_class() {}
|
||||
|
||||
void module_class::print_hello(void)
|
||||
{
|
||||
puts("Hello from C++ module");
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Inria
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup tests
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Sample module C++ class
|
||||
*
|
||||
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifndef MODULE_H
|
||||
#define MODULE_H
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
class module_class
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief constructor
|
||||
*/
|
||||
module_class();
|
||||
|
||||
/**
|
||||
* @brief destructor
|
||||
*/
|
||||
~module_class();
|
||||
|
||||
/**
|
||||
* @brief public function
|
||||
*/
|
||||
void print_hello(void);
|
||||
};
|
||||
|
||||
/** @} */
|
||||
#endif /* MODULE_H */
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Inria
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup tests
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Sample module C++ class
|
||||
*
|
||||
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "module.hpp"
|
||||
|
||||
#error "This should not be built"
|
||||
|
||||
module_class::module_class() {}
|
||||
|
||||
module_class::~module_class() {}
|
||||
|
||||
void module_class::print(void)
|
||||
{
|
||||
puts("Hello from C++ module");
|
||||
}
|
||||
Reference in New Issue
Block a user