Skip to content

Commit

Permalink
Use options instead of definitions for header override
Browse files Browse the repository at this point in the history
  • Loading branch information
pbdot committed Jan 30, 2025
1 parent 308a692 commit 48c8192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:Debug>")
if (EDGE_MIMALLOC)
# Override memory allocations to use mimalloc
add_definitions(/FI"${CMAKE_SOURCE_DIR}/libraries/mimalloc/include/mimalloc-override.h")
add_compile_options(/FI"${CMAKE_SOURCE_DIR}/libraries/mimalloc/include/mimalloc-override.h")
endif()
endif()

Expand Down

2 comments on commit 48c8192

@LoboEire
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only does it not work with VS community, but even the usual VScode wont compile.

@pbdot
Copy link
Collaborator Author

@pbdot pbdot commented on 48c8192 Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VS and VSCode both use msbuild under the hood... they are really just frontends to the toolchain

I think it is just the quotes which added in case a space in the path, no idea why only an issue for you and dasho, unless Win7/Win10 thing. This should fix it #872

Please sign in to comment.