Skip to content

Commit 87ab404

Browse files
Refactor OpenSSL flags; update CI & clang-format
Split the long OPENSSL_CPPFLAGS string into a readable list (OPENSSL_CPPFLAGS_LIST) and join it back into OPENSSL_CPPFLAGS to simplify maintenance. Add a cmake-lint disable comment for OpenSSL_FOUND. Adjust the GitHub Actions step condition to use `false && always()` (keeps the step disabled while evaluating always()). Remove the explicit LineEnding setting from .clang-format.
1 parent a00c898 commit 87ab404

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

.clang-format

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ IndentWrappedFunctionNames: true
6969
InsertBraces: true
7070
InsertNewlineAtEOF: true
7171
KeepEmptyLinesAtTheStartOfBlocks: false
72-
LineEnding: LF
7372
MaxEmptyLinesToKeep: 1
7473
NamespaceIndentation: All
7574
ObjCBinPackProtocolList: Never

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155

156156
- name: Run tests
157157
id: test
158-
if: false
158+
if: false && always()
159159
working-directory: build/tests
160160
run: ./test_moonlight --gtest_color=yes --gtest_output=xml:test_results.xml
161161

cmake/modules/GetOpenSSL.cmake

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,22 @@ endif()
2020
find_program(PERL_EXECUTABLE perl REQUIRED)
2121
find_program(OPENSSL_MAKE_EXECUTABLE NAMES make REQUIRED)
2222

23-
set(OPENSSL_CPPFLAGS
24-
"-UWIN32 -U_WIN32 -DNO_SYSLOG -DOPENSSL_NO_SYSLOG -D_exit=_Exit -I${NXDK_DIR}/lib -I${NXDK_DIR}/lib/xboxrt/libc_extensions -I${NXDK_DIR}/lib/pdclib/include -I${NXDK_DIR}/lib/pdclib/platform/xbox/include -I${NXDK_DIR}/lib/winapi -I${NXDK_DIR}/lib/xboxrt/vcruntime -I${NXDK_DIR}/lib/net/lwip/src/include -I${NXDK_DIR}/lib/net/nforceif/include")
23+
set(OPENSSL_CPPFLAGS_LIST
24+
-UWIN32
25+
-U_WIN32
26+
-DNO_SYSLOG
27+
-DOPENSSL_NO_SYSLOG
28+
-D_exit=_Exit
29+
"-I${NXDK_DIR}/lib"
30+
"-I${NXDK_DIR}/lib/xboxrt/libc_extensions"
31+
"-I${NXDK_DIR}/lib/pdclib/include"
32+
"-I${NXDK_DIR}/lib/pdclib/platform/xbox/include"
33+
"-I${NXDK_DIR}/lib/winapi"
34+
"-I${NXDK_DIR}/lib/xboxrt/vcruntime"
35+
"-I${NXDK_DIR}/lib/net/lwip/src/include"
36+
"-I${NXDK_DIR}/lib/net/nforceif/include"
37+
)
38+
list(JOIN OPENSSL_CPPFLAGS_LIST " " OPENSSL_CPPFLAGS)
2539

2640
set(OPENSSL_ENV
2741
${CMAKE_COMMAND} -E env
@@ -79,7 +93,7 @@ ExternalProject_Add(openssl_external
7993
PATCH_COMMAND ""
8094
)
8195

82-
set(OpenSSL_FOUND TRUE)
96+
set(OpenSSL_FOUND TRUE) # cmake-lint: disable=C0103
8397
set(OPENSSL_INCLUDE_DIR "${OPENSSL_INSTALL_DIR}/include")
8498
set(OPENSSL_CRYPTO_LIBRARY "${OPENSSL_INSTALL_DIR}/lib/libcrypto.a")
8599
set(OPENSSL_SSL_LIBRARY "${OPENSSL_INSTALL_DIR}/lib/libssl.a")

0 commit comments

Comments
 (0)