Skip to content

Commit

Permalink
cmake: For .Net RID when running examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 9, 2024
1 parent 0b4a0cb commit f0fb21b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/dotnet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function(add_dotnet_example FILE_NAME TFM)
add_custom_command(
OUTPUT ${DOTNET_EXAMPLE_DIR}/timestamp
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} build --nologo -c Release ${EXAMPLE_NAME}.csproj
${DOTNET_EXECUTABLE} build --nologo -r ${DOTNET_RID} -c Release ${EXAMPLE_NAME}.csproj
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} pack --nologo -c Release ${EXAMPLE_NAME}.csproj
COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_EXAMPLE_DIR}/timestamp
Expand All @@ -357,7 +357,7 @@ function(add_dotnet_example FILE_NAME TFM)
add_test(
NAME dotnet_${COMPONENT_NAME}_${EXAMPLE_NAME}_${TFM}
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} run --no-build -c Release ${EXAMPLE_NAME}.csproj
${DOTNET_EXECUTABLE} run --no-build -r ${DOTNET_RID} -c Release ${EXAMPLE_NAME}.csproj
WORKING_DIRECTORY ${DOTNET_EXAMPLE_DIR})
endif()
message(STATUS "Configuring example ${FILE_NAME} done")
Expand Down

0 comments on commit f0fb21b

Please sign in to comment.