This commit is contained in:
Hongze Cheng 2021-09-22 11:04:14 +08:00
parent 80c3d406b5
commit 72bdaf1014
8 changed files with 37 additions and 1 deletions

View File

@ -20,7 +20,7 @@ set(DEPS_TMP_FILE "${CMAKE_BINARY_DIR}/deps_tmp_CMakeLists.txt.in")
configure_file("${CMAKE_SUPPORT_DIR}/deps_CMakeLists.txt.in" ${DEPS_TMP_FILE})
## googletest
option(BUILD_TEST "If build unit tests using googletest" ON)
option(BUILD_TEST "If build unit tests using googletest" OFF)
if(${BUILD_TEST})
cat("${CMAKE_SUPPORT_DIR}/gtest_CMakeLists.txt.in" ${DEPS_TMP_FILE})

View File

@ -26,7 +26,10 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sched.h>
#include "osAtomic.h"
#include "osDef.h"
#include "osEndian.h"
#include "osMemory.h"

33
include/os/osDef.h Normal file
View File

@ -0,0 +1,33 @@
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program 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.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_OS_DEF_H_
#define _TD_OS_DEF_H_
#ifdef __cplusplus
extern "C" {
#endif
#if defined(__GNUC__)
#define FORCE_INLINE inline __attribute__((always_inline))
#else
#define FORCE_INLINE
#endif
#ifdef __cplusplus
}
#endif
#endif /*_TD_OS_DEF_H_*/