cmake: Fix dotnet build

* fix cmake/dotnet.cmake
* fix <cmp>/dotnet/CMakeLists.txt
* fix examples/tests/CMakeLists.txt
This commit is contained in:
Mizux Seiha
2022-09-22 18:13:13 +02:00
committed by Corentin Le Molgat
parent 224ebed399
commit baaf1ca82a
10 changed files with 228 additions and 131 deletions

View File

@@ -29,3 +29,10 @@ set_target_properties(dotnet_constraint_solver PROPERTIES
SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
POSITION_INDEPENDENT_CODE ON)
target_link_libraries(dotnet_constraint_solver PRIVATE ortools::ortools)
if(BUILD_TESTING)
file(GLOB DOTNET_SRCS "*Tests.cs")
foreach(FILE_NAME IN LISTS DOTNET_SRCS)
add_dotnet_test(${FILE_NAME})
endforeach()
endif()