File tree Expand file tree Collapse file tree 4 files changed +39
-0
lines changed Expand file tree Collapse file tree 4 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # This file is not used for compiling but used
2+ # when generating project using CMake generator.
3+ # If you are not using CMake then just open .sln file
4+
5+ cmake_minimum_required (VERSION 3.22)
6+
7+ project (CppAst.NET CSharp)
8+
9+ set (CMAKE_CSharp_FLAGS "${CMAKE_CSharp_FLAGS} /langversion:latest" )
10+
11+ set (CMAKE_DOTNET_TARGET_FRAMEWORK net8.0)
12+ set (CMAKE_DOTNET_SDK "Microsoft.NET.Sdk" )
13+
14+ add_subdirectory (src)
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.22)
2+
3+ add_subdirectory (CppAst)
4+ add_subdirectory (CppAst.Tests)
Original file line number Diff line number Diff line change 1+ file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR} /*.cs)
2+
3+ add_library (CppAst.Tests SHARED ${SOURCE_FILES} )
4+
5+ set_target_properties (CppAst.Tests PROPERTIES
6+ VS_PACKAGE_REFERENCES "Microsoft.NET.Test.Sdk_17.8.0;nunit_4.0.1;NUnit3TestAdapter_4.5.0"
7+ )
8+
9+ target_compile_options (CppAst.Tests PUBLIC "/unsafe" )
10+ target_link_libraries (CppAst.Tests CppAst)
Original file line number Diff line number Diff line change 1+ file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR} /*.cs)
2+
3+ set (CMAKE_CSharp_FLAGS "${CMAKE_CSharp_FLAGS} /langversion:7.3" )
4+
5+ add_library (CppAst SHARED ${SOURCE_FILES} )
6+
7+ set_target_properties (CppAst PROPERTIES
8+ VS_PACKAGE_REFERENCES "ClangSharp_17.0.1;Irony_1.2.0"
9+ )
10+
11+ target_compile_options (CppAst PUBLIC "/unsafe" )
You can’t perform that action at this time.
0 commit comments