Skip to content

Commit

Permalink
Avoid overlapping binary directories when building the generator as a…
Browse files Browse the repository at this point in the history
… subproject.
  • Loading branch information
tristanlabelle authored Sep 27, 2024
1 parent c243e89 commit 38e6050
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Generator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else()
execute_process(
COMMAND ${CMAKE_COMMAND}
-S "${CMAKE_CURRENT_SOURCE_DIR}"
-B "${CMAKE_CURRENT_BINARY_DIR}"
-B "${CMAKE_CURRENT_BINARY_DIR}/Build"
-G "${CMAKE_GENERATOR}"
-D "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
-D "CMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
Expand All @@ -25,10 +25,10 @@ else()

message(STATUS "Building Generator as subproject...")
execute_process(
COMMAND ${CMAKE_COMMAND} --build "${CMAKE_CURRENT_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} --build "${CMAKE_CURRENT_BINARY_DIR}/Build"
COMMAND_ERROR_IS_FATAL ANY)

# Now build InteropTests, which depends on SWIFTWINRT_EXE
set(SWIFTWINRT_EXE "${CMAKE_CURRENT_BINARY_DIR}/Sources/SwiftWinRT/SwiftWinRT.exe")
set(SWIFTWINRT_EXE "${CMAKE_CURRENT_BINARY_DIR}/Build/Sources/SwiftWinRT/SwiftWinRT.exe")
add_subdirectory(InteropTests)
endif()

0 comments on commit 38e6050

Please sign in to comment.