diff --git a/CMakeLists.txt b/CMakeLists.txt index 307786b5ea8252d0c1170760906de7532180ca7e..d6663b15dbd6c06ae5e635ce0e4dd675374dc41e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/include/os/os.h b/include/os/os.h index f200bafc729a0f4885843056efa29606927ebe2d..259aef814366810aac7bec8ba720d111e63023eb 100644 --- a/include/os/os.h +++ b/include/os/os.h @@ -26,7 +26,10 @@ extern "C" { #include #include #include +#include +#include "osAtomic.h" +#include "osDef.h" #include "osEndian.h" #include "osMemory.h" diff --git a/src/os/inc/osAtomic.h b/include/os/osAtomic.h similarity index 100% rename from src/os/inc/osAtomic.h rename to include/os/osAtomic.h diff --git a/include/os/osDef.h b/include/os/osDef.h new file mode 100644 index 0000000000000000000000000000000000000000..a68e50e3b516aa0bf2791cca71553f7654f84e91 --- /dev/null +++ b/include/os/osDef.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * 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 . + */ + +#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_*/ \ No newline at end of file diff --git a/src/util/inc/tarray.h b/include/util/tarray.h similarity index 100% rename from src/util/inc/tarray.h rename to include/util/tarray.h diff --git a/src/util/inc/tlockfree.h b/include/util/tlockfree.h similarity index 100% rename from src/util/inc/tlockfree.h rename to include/util/tlockfree.h diff --git a/src/util/src/tarray.c b/src/util/source/tarray.c similarity index 100% rename from src/util/src/tarray.c rename to src/util/source/tarray.c diff --git a/src/util/src/tlockfree.c b/src/util/source/tlockfree.c similarity index 100% rename from src/util/src/tlockfree.c rename to src/util/source/tlockfree.c