diff --git a/cmake/dotnet.cmake b/cmake/dotnet.cmake index 78017ef..3e2f773 100644 --- a/cmake/dotnet.cmake +++ b/cmake/dotnet.cmake @@ -124,8 +124,8 @@ add_custom_command( add_custom_command( OUTPUT ${DOTNET_NATIVE_PROJECT_DIR}/timestamp - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} build -c Release /p:Platform=${DOTNET_PLATFORM} ${DOTNET_NATIVE_PROJECT}.csproj - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} pack -c Release ${DOTNET_NATIVE_PROJECT}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} build -c Release /p:Platform=${DOTNET_PLATFORM} ${DOTNET_NATIVE_PROJECT}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} pack -c Release ${DOTNET_NATIVE_PROJECT}.csproj COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_NATIVE_PROJECT_DIR}/timestamp DEPENDS ${PROJECT_BINARY_DIR}/dotnet/Directory.Build.props @@ -160,8 +160,8 @@ add_custom_command( add_custom_command( OUTPUT ${DOTNET_PROJECT_DIR}/timestamp - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} build -c Release /p:Platform=${DOTNET_PLATFORM} ${DOTNET_PROJECT}.csproj - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} pack -c Release ${DOTNET_PROJECT}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} build -c Release /p:Platform=${DOTNET_PLATFORM} ${DOTNET_PROJECT}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} pack -c Release ${DOTNET_PROJECT}.csproj COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_PROJECT_DIR}/timestamp DEPENDS ${DOTNET_PROJECT_DIR}/${DOTNET_PROJECT}.csproj @@ -213,7 +213,7 @@ function(add_dotnet_test FILE_NAME) add_custom_command( OUTPUT ${DOTNET_TEST_DIR}/timestamp - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} build -c Release ${TEST_NAME}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} build -c Release ${TEST_NAME}.csproj COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_TEST_DIR}/timestamp DEPENDS ${DOTNET_TEST_DIR}/${TEST_NAME}.csproj @@ -234,7 +234,7 @@ function(add_dotnet_test FILE_NAME) if(BUILD_TESTING) add_test( NAME dotnet_${COMPONENT_NAME}_${TEST_NAME} - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} test --no-build -c Release ${TEST_NAME}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} test --no-build -c Release ${TEST_NAME}.csproj WORKING_DIRECTORY ${DOTNET_TEST_DIR}) endif() message(STATUS "Configuring test ${FILE_NAME} done") @@ -275,8 +275,8 @@ function(add_dotnet_example FILE_NAME) add_custom_command( OUTPUT ${DOTNET_EXAMPLE_DIR}/timestamp - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} build -c Release ${EXAMPLE_NAME}.csproj - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} pack -c Release ${EXAMPLE_NAME}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} build -c Release ${EXAMPLE_NAME}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} pack -c Release ${EXAMPLE_NAME}.csproj COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_EXAMPLE_DIR}/timestamp DEPENDS ${DOTNET_EXAMPLE_DIR}/${EXAMPLE_NAME}.csproj @@ -298,13 +298,13 @@ function(add_dotnet_example FILE_NAME) if(USE_DOTNET_CORE_31) add_test( NAME dotnet_${COMPONENT_NAME}_${EXAMPLE_NAME}_netcoreapp31 - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} run --no-build --framework netcoreapp3.1 -c Release ${EXAMPLE_NAME}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} run --no-build --framework netcoreapp3.1 -c Release ${EXAMPLE_NAME}.csproj WORKING_DIRECTORY ${DOTNET_EXAMPLE_DIR}) endif() if(USE_DOTNET_6) add_test( NAME dotnet_${COMPONENT_NAME}_${EXAMPLE_NAME}_net60 - COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME -- ${DOTNET_EXECUTABLE} run --no-build --framework net6.0 -c Release ${EXAMPLE_NAME}.csproj + COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} run --no-build --framework net6.0 -c Release ${EXAMPLE_NAME}.csproj WORKING_DIRECTORY ${DOTNET_EXAMPLE_DIR}) endif() endif()