70 lines
2.6 KiB
Diff
70 lines
2.6 KiB
Diff
|
|
From 87e8dc5ae7d6de1aa9f75f13a57fec769d9edae3 Mon Sep 17 00:00:00 2001
|
||
|
|
From: xuxuepeng <xuxuepeng1@huawei.com>
|
||
|
|
Date: Thu, 23 Nov 2023 12:49:19 +0000
|
||
|
|
Subject: [PATCH 10/13] !293 Add declaration macro for unit test * Add
|
||
|
|
declaration macro for unit test
|
||
|
|
|
||
|
|
---
|
||
|
|
CMakeLists.txt | 1 +
|
||
|
|
src/utils/utils_macro.h | 35 +++++++++++++++++++++++++++++++++++
|
||
|
|
2 files changed, 36 insertions(+)
|
||
|
|
create mode 100644 src/utils/utils_macro.h
|
||
|
|
|
||
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
|
index 4bf5335..f61bc1f 100644
|
||
|
|
--- a/CMakeLists.txt
|
||
|
|
+++ b/CMakeLists.txt
|
||
|
|
@@ -134,6 +134,7 @@ install(FILES src/utils/utils_buffer.h DESTINATION include/isula_libutils)
|
||
|
|
install(FILES src/utils/utils_convert.h DESTINATION include/isula_libutils)
|
||
|
|
install(FILES src/utils/utils_file.h DESTINATION include/isula_libutils)
|
||
|
|
install(FILES src/utils/utils_linked_list.h DESTINATION include/isula_libutils)
|
||
|
|
+install(FILES src/utils/utils_macro.h DESTINATION include/isula_libutils)
|
||
|
|
install(FILES src/utils/utils_mainloop.h DESTINATION include/isula_libutils)
|
||
|
|
install(FILES src/utils/utils_memory.h DESTINATION include/isula_libutils)
|
||
|
|
install(FILES src/utils/utils_string.h DESTINATION include/isula_libutils)
|
||
|
|
diff --git a/src/utils/utils_macro.h b/src/utils/utils_macro.h
|
||
|
|
new file mode 100644
|
||
|
|
index 0000000..9e1bc0a
|
||
|
|
--- /dev/null
|
||
|
|
+++ b/src/utils/utils_macro.h
|
||
|
|
@@ -0,0 +1,35 @@
|
||
|
|
+/******************************************************************************
|
||
|
|
+ * isula: macro definitions for isula
|
||
|
|
+ *
|
||
|
|
+ * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
|
||
|
|
+ *
|
||
|
|
+ * Authors:
|
||
|
|
+ * xuxuepeng <xuxuepeng1@huawei.com>
|
||
|
|
+ *
|
||
|
|
+ * This library is free software; you can redistribute it and/or
|
||
|
|
+ * modify it under the terms of the GNU Lesser General Public
|
||
|
|
+ * License as published by the Free Software Foundation; either
|
||
|
|
+ * version 2.1 of the License, or (at your option) any later version.
|
||
|
|
+ *
|
||
|
|
+ * This library is distributed in the hope that it will be useful,
|
||
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
|
+ * Lesser General Public License for more details.
|
||
|
|
+ *
|
||
|
|
+ * You should have received a copy of the GNU Lesser General Public
|
||
|
|
+ * License along with this library; if not, write to the Free Software
|
||
|
|
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
|
+ ********************************************************************************/
|
||
|
|
+
|
||
|
|
+#ifndef _ISULA_UTILS_MACRO_H
|
||
|
|
+#define _ISULA_UTILS_MACRO_H
|
||
|
|
+
|
||
|
|
+#ifndef UNIT_TEST
|
||
|
|
+#define STATIC static
|
||
|
|
+#define INLINE inline
|
||
|
|
+#else
|
||
|
|
+#define STATIC
|
||
|
|
+#define INLINE
|
||
|
|
+#endif
|
||
|
|
+
|
||
|
|
+#endif // _ISULA_UTILS_MACRO_H
|
||
|
|
\ No newline at end of file
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|