Skip to content

Commit

Permalink
Merge pull request #4 from hoffmann-stefan/feature/pass-target-framew…
Browse files Browse the repository at this point in the history
…ork-to-tests

Add argument for target framework in tests
  • Loading branch information
hoffmann-stefan authored Apr 20, 2023
2 parents cb35d70 + 15b00f4 commit c1f263d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmake/Modules/FindDotNETExtra.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,17 @@ endfunction()
function(add_dotnet_test _TARGET_NAME)
cmake_parse_arguments(_add_dotnet_test
""
""
"TARGET_FRAMEWORK"
"SOURCES;INCLUDE_DLLS;INCLUDE_NUPKGS;INCLUDE_REFERENCES"
${ARGN}
)

set(CSHARP_TARGET_FRAMEWORK "netcoreapp2.0")
if(_add_dotnet_test_TARGET_FRAMEWORK)
set(CSHARP_TARGET_FRAMEWORK ${_add_dotnet_test_TARGET_FRAMEWORK})
else()
set(CSHARP_TARGET_FRAMEWORK "net6.0")
endif()

set(XUNIT_INCLUDE_REFERENCES
"Microsoft.NET.Test.Sdk=15.9.0"
"xunit=2.4.1"
Expand Down

0 comments on commit c1f263d

Please sign in to comment.