代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/yajl 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 255917e92717c491ffb66eb63a3333682d13df60 Mon Sep 17 00:00:00 2001
From: haozi007 <liuhao27@huawei.com>
Date: Wed, 8 Jun 2022 07:27:46 +0100
Subject: [PATCH] add cmake option for test and binary
Signed-off-by: haozi007 <liuhao27@huawei.com>
---
CMakeLists.txt | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c0a9be..9cc63c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,18 +64,27 @@ ENDIF (WIN32)
ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(test)
-ADD_SUBDIRECTORY(reformatter)
-ADD_SUBDIRECTORY(verify)
+
+IF (NOT DISABLE_TEST)
+ ADD_SUBDIRECTORY(test)
+ENDIF ()
+
+IF (NOT DISABLE_BIN)
+ ADD_SUBDIRECTORY(reformatter)
+ ADD_SUBDIRECTORY(verify)
+ENDIF ()
+
ADD_SUBDIRECTORY(example)
ADD_SUBDIRECTORY(perf)
INCLUDE(YAJLDoc.cmake)
-# a test target
-ADD_CUSTOM_TARGET(test
- ./run_tests.sh ${CMAKE_CURRENT_BINARY_DIR}/test/parsing/yajl_test
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test/parsing)
+IF (NOT DISABLE_TEST)
+ # a test target
+ ADD_CUSTOM_TARGET(test
+ ./run_tests.sh ${CMAKE_CURRENT_BINARY_DIR}/test/parsing/yajl_test
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test/parsing)
-ADD_CUSTOM_TARGET(test-api ${CMAKE_CURRENT_SOURCE_DIR}/test/api/run_tests.sh
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test/api)
+ ADD_CUSTOM_TARGET(test-api ${CMAKE_CURRENT_SOURCE_DIR}/test/api/run_tests.sh
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test/api)
+ENDIF ()
--
2.20.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。