Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# A newer MSVC (windows-latest) emits C4875 ("a non-string literal argument to [[gsl::suppress]] is
# deprecated") from the vendored GSL headers, which several targets compile with warnings-as-error.
# Suppress this dependency-side deprecation so the Windows build isn't broken by toolchain drift. Must
# be set before arcana.cpp / Core / Polyfills are added below so they inherit it. Scoped to C++ (the
# warning only fires for GSL's C++ [[gsl::suppress]] attribute); kept directory-wide because GSL is
# pulled in transitively by many targets (arcana, AppRuntime, the polyfills) and no first-party code
# uses a non-string [[gsl::suppress]], so this doesn't mask our own warnings.
if(MSVC)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/wd4875>)
endif()
Comment thread
matthargett marked this conversation as resolved.

# --------------------------------------------------
# Options
# --------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion Core/Node-API-JSI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ if(NOT TARGET jsi)
endif()

target_include_directories(napi
PUBLIC "include")
PUBLIC
"include"
# napi.h pulls in the shared <napi/js_native_api_types.h>, which lives in
# Core/Node-API/Include/Shared. That sibling isn't built when the engine is JSI
# (Core/CMakeLists.txt selects Node-API-JSI instead of Node-API), so reference the shared
# headers directly here -- otherwise the JSI napi fails to compile with C1083.
"${CMAKE_CURRENT_SOURCE_DIR}/../Node-API/Include/Shared")

target_link_libraries(napi
PUBLIC jsi)
Expand Down