Skip to content

[CMake] Disable macros in Windows CMake build #707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2024
Merged
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
7 changes: 6 additions & 1 deletion Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
##===----------------------------------------------------------------------===##

add_subdirectory(_FoundationCShims)
add_subdirectory(FoundationMacros)

# Disable the macro build on Windows until we can correctly build it for the host architecture
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
add_subdirectory(FoundationMacros)
endif()

add_subdirectory(FoundationEssentials)
add_subdirectory(FoundationInternationalization)
8 changes: 5 additions & 3 deletions Sources/FoundationEssentials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ add_subdirectory(String)
add_subdirectory(TimeZone)
add_subdirectory(URL)

# Depend on FoundationMacros
add_dependencies(FoundationEssentials FoundationMacros)
target_compile_options(FoundationEssentials PRIVATE -plugin-path ${CMAKE_BINARY_DIR}/lib)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
# Depend on FoundationMacros
add_dependencies(FoundationEssentials FoundationMacros)
target_compile_options(FoundationEssentials PRIVATE -plugin-path ${CMAKE_BINARY_DIR}/lib)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL Android)
target_compile_options(FoundationEssentials PRIVATE
Expand Down