Skip to content

Commit

Permalink
Fix deprecated FetchContent_Populate warning third_party/uvwasi cmake…
Browse files Browse the repository at this point in the history
… build (WebAssembly#2440)
  • Loading branch information
Changqing-JING authored Jul 12, 2024
1 parent 00a1e05 commit adc4c9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,11 @@ if (BUILD_TOOLS)
)

if(WITH_WASI)
# uvwasi uses the deprecated FetchContent_Populate function, disable it to avoid build error
set(CMAKE_POLICY_DEFAULT_CMP0169_BACK ${CMAKE_POLICY_DEFAULT_CMP0169})
set(CMAKE_POLICY_DEFAULT_CMP0169 OLD)
add_subdirectory("third_party/uvwasi" EXCLUDE_FROM_ALL)
set(CMAKE_POLICY_DEFAULT_CMP0169 ${CMAKE_POLICY_DEFAULT_CMP0169_BACK})
include_directories(third_party/uvwasi/include)
add_definitions(-DWITH_WASI)
set(INTERP_LIBS uvwasi_a)
Expand Down

0 comments on commit adc4c9f

Please sign in to comment.