Skip to content

Commit 27e3972

Browse files
committed
Removed PCH for now
1 parent e510afa commit 27e3972

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

code/framework/CMakeLists.txt

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -149,44 +149,6 @@ endif()
149149

150150
add_library(FrameworkServer STATIC ${FRAMEWORK_SERVER_SRC})
151151

152-
# Precompiled Headers (PCH) for faster builds
153-
# Framework base PCH - stable, frequently used headers
154-
# Using PUBLIC so child targets can inherit via INTERFACE_PRECOMPILE_HEADERS
155-
#
156-
# IMPORTANT: FrameworkServer and FrameworkClient use REUSE_FROM Framework.
157-
# This is critical because these targets have V8/libuv include directories and
158-
# NODE_WANT_INTERNALS defined, which causes Windows SDK errno conflicts (EINVAL/ERANGE
159-
# undefined) if they try to compile their own PCH. By reusing Framework's PCH
160-
# (compiled without those settings), we avoid the issue.
161-
target_precompile_headers(Framework PUBLIC
162-
# C headers first - cerrno must be included before any headers that may
163-
# be affected by libuv/Node.js which don't define EINVAL/ERANGE on Windows
164-
<cerrno>
165-
166-
# STL (stable, frequently used)
167-
<memory>
168-
<string>
169-
<vector>
170-
<unordered_map>
171-
<functional>
172-
173-
# Stable vendor headers
174-
<spdlog/spdlog.h>
175-
<glm/glm.hpp>
176-
<glm/gtc/quaternion.hpp>
177-
<nlohmann/json.hpp>
178-
179-
# ECS - used by both server and client
180-
<flecs/flecs.h>
181-
)
182-
183-
# FrameworkServer and FrameworkClient reuse Framework's PCH to avoid
184-
# Windows SDK errno conflicts when compiling with V8/libuv include paths
185-
target_precompile_headers(FrameworkServer REUSE_FROM Framework)
186-
if(WIN32)
187-
target_precompile_headers(FrameworkClient REUSE_FROM Framework)
188-
endif()
189-
190152
# Custom defines
191153
target_compile_definitions(Framework PUBLIC MG_ENABLE_LOG=0)
192154

@@ -267,9 +229,6 @@ target_include_directories(FrameworkNodeEngine PUBLIC
267229
target_link_libraries(FrameworkNodeEngine PUBLIC libnode v8pp spdlog)
268230

269231
# Node.js internal APIs require NODE_WANT_INTERNALS
270-
# NOTE: Do NOT add ${LIBNODE_UV_INCLUDE_DIR} here - it causes Windows SDK errno
271-
# conflicts because #include <errno.h> finds uv/errno.h instead of system errno.h.
272-
# The main libnode include dir already has uv.h which includes uv/* properly.
273232
target_compile_definitions(FrameworkNodeEngine PRIVATE NODE_WANT_INTERNALS=1)
274233

275234
# Match Framework compile definitions and features

code/tests/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
add_executable(FrameworkTests framework_ut.cpp)
22

33
target_include_directories(FrameworkTests PRIVATE . ../framework/src)
4-
target_include_directories(FrameworkTests SYSTEM PRIVATE ${LIBNODE_UV_INCLUDE_DIR})
54
target_link_libraries(FrameworkTests Framework FrameworkServer libnode)
65

76
# Ensure libnode.dll is copied to bin directory before running tests (Windows only)
@@ -12,10 +11,6 @@ endif()
1211
# Tests use Node.js APIs through the scripting engine
1312
target_compile_definitions(FrameworkTests PRIVATE NODE_WANT_INTERNALS=1)
1413

15-
# Reuse Framework's PCH (includes standard headers and flecs)
16-
# Note: We reuse from Framework directly because FrameworkServer itself uses REUSE_FROM Framework
17-
target_precompile_headers(FrameworkTests REUSE_FROM Framework)
18-
1914
add_custom_target(RunFrameworkTests
2015
COMMAND $<TARGET_FILE:FrameworkTests>
2116
DEPENDS $<TARGET_FILE:FrameworkTests>)

0 commit comments

Comments
 (0)