Improve build.
This commit is contained in:
parent
155edbee92
commit
1930349f6e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,4 +2,4 @@
|
|||
cmake-shell/
|
||||
external/gtest/googletest-release-1.11.0/
|
||||
external/libconfig/libconfig-1.7.3/
|
||||
out/
|
||||
output_files/
|
|
@ -1,9 +1,9 @@
|
|||
set(DEFINE_LINUX "linux")
|
||||
set(CMAKE_SOURCE_DIR_IPCSDK "${CMAKE_SOURCE_DIR}")
|
||||
set(CMAKE_SOURCE_DIR_IPCSDK "${CMAKE_SOURCE_DIR_IPCSDK}${SUBMODULE_PATH_OF_IPCSDK}")
|
||||
set(EXEC_OUTPUT_PATH "${PLATFORM_PATH}/out/bin")
|
||||
set(LIBS_OUTPUT_PATH "${PLATFORM_PATH}/out/libs")
|
||||
set(TEST_OUTPUT_PATH "${PLATFORM_PATH}/out/test")
|
||||
set(EXEC_OUTPUT_PATH "${PLATFORM_PATH}/output_files/bin")
|
||||
set(LIBS_OUTPUT_PATH "${PLATFORM_PATH}/output_files/libs")
|
||||
set(TEST_OUTPUT_PATH "${PLATFORM_PATH}/output_files/test")
|
||||
|
||||
set(PROJECT_ROOT_PATH "${PLATFORM_PATH}")
|
||||
set(APPLICATION_SOURCE_PATH "${CMAKE_SOURCE_DIR_IPCSDK}/application")
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
## 1.2 功能介绍
|
||||
* 设置库文件输出路径:`set(LIBRARY_OUTPUT_PATH ${LIBS_OUTPUT_PATH})`.
|
||||
该语句用于设置该功能的静态库的生成路径,其中`${LIBS_OUTPUT_PATH}`在/build/cmake/global_config.cmake被定义在项目根目录的/out/libs/。
|
||||
该语句用于设置该功能的静态库的生成路径,其中`${LIBS_OUTPUT_PATH}`在/build/cmake/global_config.cmake被定义在项目根目录的/output_files/libs/。
|
||||
|
||||
* 添加实现功能的文件目录:`include_directories(./)`.
|
||||
该语句旨在向编译器告知该功能的实现文件和头文件的所在位置。
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <gtest/gtest.h>
|
||||
namespace IHalTest
|
||||
{
|
||||
// ../out/test/bin/IHalTest --gtest_filter=IHalTest.Demo
|
||||
// ../output_files/test/bin/IHalTest --gtest_filter=IHalTest.Demo
|
||||
TEST(IHalTest, Demo)
|
||||
{
|
||||
ILogInit(LOG_EASYLOGGING);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <gtest/gtest.h>
|
||||
namespace ILogTest
|
||||
{
|
||||
// ../out/test/bin/LogTest --gtest_filter=ILogTest.Demo
|
||||
// ../output_files/test/bin/LogTest --gtest_filter=ILogTest.Demo
|
||||
TEST(ILogTest, Demo)
|
||||
{
|
||||
CreateLogModule();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <gtest/gtest.h>
|
||||
namespace LogCTest
|
||||
{
|
||||
// ../out/test/bin/LogCTest --gtest_filter=LogCTest.Demo
|
||||
// ../output_files/test/bin/LogCTest --gtest_filter=LogCTest.Demo
|
||||
TEST(LogCTest, Demo)
|
||||
{
|
||||
create_log_module();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <gtest/gtest.h>
|
||||
namespace ReturnCodeTest
|
||||
{
|
||||
// ../out/test/bin/ReturnCodeTest --gtest_filter=ReturnCodeTest.Demo
|
||||
// ../output_files/test/bin/ReturnCodeTest --gtest_filter=ReturnCodeTest.Demo
|
||||
TEST(ReturnCodeTest, Demo)
|
||||
{
|
||||
InitLog(LOG_EASYLOGGING, nullptr);
|
||||
|
|
|
@ -24,7 +24,7 @@ LogEasylogging::LogEasylogging(const LogSetting *setting)
|
|||
void LogEasylogging::Init(const enum LogInstance &log)
|
||||
{
|
||||
#if 0
|
||||
el::Configurations conf("/home/xiaojiazhu/project/OS/OSThings/test/out/bin/default-logger.conf");
|
||||
el::Configurations conf("/home/xiaojiazhu/project/OS/OSThings/test/output_files/bin/default-logger.conf");
|
||||
el::Loggers::reconfigureAllLoggers(conf);
|
||||
#endif
|
||||
// Set the log path.
|
||||
|
|
|
@ -23,7 +23,7 @@ LogEasylogging::LogEasylogging(const LogSetting *setting)
|
|||
bool LogEasylogging::Init()
|
||||
{
|
||||
#if 0
|
||||
el::Configurations conf("/home/xiaojiazhu/project/OS/OSThings/test/out/bin/default-logger.conf");
|
||||
el::Configurations conf("/home/xiaojiazhu/project/OS/OSThings/test/output_files/bin/default-logger.conf");
|
||||
el::Loggers::reconfigureAllLoggers(conf);
|
||||
#endif
|
||||
// Set the log path.
|
||||
|
|
Loading…
Reference in New Issue
Block a user