mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 22:32:11 +08:00
refactor: remove '#define MODULE_NAME' from tests
And use target_compile_definitions() instead
This commit is contained in:
@@ -116,6 +116,8 @@ function(px4_add_functional_gtest)
|
||||
# also links to fuzztest_gtest_main
|
||||
test_stubs) # put test_stubs last
|
||||
|
||||
target_compile_definitions(${TESTNAME} PRIVATE MODULE_NAME="${TESTNAME}")
|
||||
|
||||
if(COMPILE_FLAGS)
|
||||
target_compile_options(${TESTNAME} PRIVATE ${COMPILE_FLAGS})
|
||||
endif()
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define MODULE_NAME "manual_control"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "ManualControl.hpp"
|
||||
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define MODULE_NAME "rc_update"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "rc_update.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user