Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 70d6872

Browse files
committed
fix: windows
1 parent 6427200 commit 70d6872

File tree

6 files changed

+13
-59
lines changed

6 files changed

+13
-59
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

engine/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ add_compile_definitions(CORTEX_CONFIG_FILE_PATH="${CORTEX_CONFIG_FILE_PATH}")
9595

9696
option(CMAKE_BUILD_TEST "Enable testing" ON)
9797
option(CMAKE_BUILD_INJA_TEST "Enable inja example" OFF)
98-
# if(CMAKE_BUILD_TEST)
99-
# add_subdirectory(test)
100-
# endif()
98+
if(CMAKE_BUILD_TEST)
99+
add_subdirectory(test)
100+
endif()
101101

102-
# add_subdirectory(cli)
102+
add_subdirectory(cli)
103103

104104
if(CMAKE_BUILD_INJA_TEST)
105105
add_subdirectory(examples/inja)

engine/cli/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ set(OPENSSL_USE_STATIC_LIBS TRUE)
2121
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2222

2323
if(MSVC)
24-
add_compile_options(
25-
$<$<CONFIG:>:/MT> #---------|
26-
$<$<CONFIG:Debug>:/MTd> #---|-- Statically link the runtime libraries
27-
$<$<CONFIG:Release>:/MT> #--|
28-
)
24+
# add_compile_options(
25+
# $<$<CONFIG:>:/MT> #---------|
26+
# $<$<CONFIG:Debug>:/MTd> #---|-- Statically link the runtime libraries
27+
# $<$<CONFIG:Release>:/MT> #--|
28+
# )
2929

3030
add_compile_options(/utf-8)
3131
add_definitions(-DUNICODE -D_UNICODE)

engine/cmake/drogon.cmake

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,10 @@
11
include(FetchContent)
22

3-
# FetchContent_Declare(c-ares
4-
# GIT_REPOSITORY https://github.com/c-ares/c-ares.git
5-
# GIT_TAG v1.34.4
6-
# )
7-
8-
# FetchContent_MakeAvailable(c-ares)
9-
# set(C-ARES_INCLUDE_DIRS "${c-ares_BINARY_DIR}" "${c-ares_SOURCE_DIR}/include")
10-
11-
# set(C-ARES_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/lib)
12-
# message("xxx="${C-ARES_LIBRARIES})
13-
14-
# FetchContent_Declare(jsoncpp
15-
# GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp.git
16-
# GIT_TAG 1.9.5
17-
# )
18-
19-
# FetchContent_MakeAvailable(jsoncpp)
20-
# MESSAGE("jsoncpp_SOURCE_DIR" ${jsoncpp_SOURCE_DIR})
21-
22-
# set(JSONCPP_INCLUDE_DIRS "${jsoncpp_SOURCE_DIR}/include")
23-
# set(JSONCPP_LIBRARIES "${jsoncpp_BINARY_DIR}")
243
set(USE_OSSP_UUID TRUE)
254

26-
27-
# FetchContent_Declare(openssl
28-
# GIT_REPOSITORY https://github.com/openssl/openssl.git
29-
# GIT_TAG openssl-3.4.1
30-
# )
31-
32-
# FetchContent_MakeAvailable(openssl)
33-
34-
# set(OPENSSL_SSL_LIBRARY SSL)
35-
# set(OPENSSL_CRYPTO_LIBRARY Crypto)
365
set(OPENSSL_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/../build_deps/openssl)
376
set(OPENSSL_INCLUDE_DIR ${OPENSSL_INSTALL_DIR}/include)
387
set(OPENSSL_ROOT_DIR ${OPENSSL_INSTALL_DIR}/lib)
39-
# set(OPENSSL_INCLUDE_DIR "${openssl_BINARY_DIR}/include" "${openssl_BINARY_DIR}")
408

419
set(ZLIB_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/../build_deps/zlib/install)
4210
set(ZLIB_INCLUDE_DIR ${ZLIB_INSTALL_DIR}/include)
@@ -46,29 +14,16 @@ set(ZLIB_LIBRARY ${ZLIB_INSTALL_DIR}/lib/zlib.lib)
4614
set(JSONCPP_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/../build_deps/jsoncpp-lib)
4715
set(JSONCPP_LIBRARIES ${JSONCPP_INSTALL_DIR}/lib/jsoncpp.lib)
4816
set(JSONCPP_INCLUDE_DIRS ${JSONCPP_INSTALL_DIR}/include)
49-
message("JSONCPP_INCLUDE_DIRS="${JSONCPP_INCLUDE_DIRS})
5017

5118
set(C-ARES_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/../build_deps/c-ares-lib)
5219
set(C-ARES_LIBRARIES ${C-ARES_INSTALL_DIR}/lib/cares.lib)
5320
set(C-ARES_INCLUDE_DIRS ${C-ARES_INSTALL_DIR}/include)
54-
# message("C-ARES_INCLUDE_DIRS="${C-ARES_INCLUDE_DIRS})
55-
# FetchContent_GetProperties(openssl)
56-
# if(NOT openssl_POPULATED)
57-
# FetchContent_Populate(openssl)
58-
# add_subdirectory(${openssl_SOURCE_DIR} ${openssl_BINARY_DIR})
59-
# endif()
60-
MESSAGE("sang1" ${OPENSSL_ROOT_DIR})
21+
6122
find_package(OpenSSL REQUIRED)
6223
find_package(ZLIB REQUIRED)
63-
MESSAGE("sang1" ${OPENSSL_ROOT_DIR})
6424
FetchContent_Declare(drogon
6525
GIT_REPOSITORY https://github.com/drogonframework/drogon.git
6626
GIT_TAG v1.9.10
6727
)
68-
MESSAGE("sang2")
69-
FetchContent_MakeAvailable(drogon)
70-
MESSAGE("sang3")
7128

72-
# add_library(drogon-1 INTERFACE)
73-
# target_include_directories(drogon-1 INTERFACE ${drogon_SOURCE_DIR}/include ${drogon_BINARY_DIR}/include)
74-
# target_link_libraries(drogon INTERFACE event event_pthreads)
29+
FetchContent_MakeAvailableWithArgs(drogon BUILD_CTL=OFF)

engine/cmake/gtest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ FetchContent_Declare(googletest
44
GIT_REPOSITORY https://github.com/google/googletest.git
55
GIT_TAG v1.16.0
66
)
7-
7+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
88
FetchContent_MakeAvailable(googletest)

engine/test/components/test_function_calling.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ TEST_F(FunctionCallingUtilsTest, HasTools) {
3030
(*request)["tools"] = "random";
3131
EXPECT_FALSE(function_calling_utils::HasTools(request));
3232

33-
(*request)["tools"] = Json::Value::null;
33+
(*request)["tools"] = Json::Value(Json::nullValue);
3434
EXPECT_FALSE(function_calling_utils::HasTools(request));
3535
}
3636

0 commit comments

Comments
 (0)