Skip to content

Commit 2a086d9

Browse files
committed
Add .Net 9.0 support
1 parent 28d7893 commit 2a086d9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,19 @@ message(STATUS ".Net: Use .Net 7.0 support: ${USE_DOTNET_7}")
141141
option(USE_DOTNET_8 "Use .Net 8.0 LTS support" OFF) # EOL: 2026-11-10
142142
message(STATUS ".Net: Use .Net 8.0 support: ${USE_DOTNET_8}")
143143

144+
option(USE_DOTNET_9 "Use .Net 9.0 support" OFF) # EOL: 2026-05-14
145+
message(STATUS ".Net: Use .Net 9.0 support: ${USE_DOTNET_9}")
146+
144147
include(dotnet)
145148

146149
add_subdirectory(tests)
147150

148151
option(BUILD_EXAMPLES "Build examples" ON)
149152
message(STATUS "Build examples: ${BUILD_EXAMPLES}")
150153

151-
if(USE_DOTNET_8)
154+
if(USE_DOTNET_9)
155+
set(EXAMPLE_DEFAULT_TFM "net9.0")
156+
elseif(USE_DOTNET_8)
152157
set(EXAMPLE_DEFAULT_TFM "net8.0")
153158
elseif(USE_DOTNET_7)
154159
set(EXAMPLE_DEFAULT_TFM "net7.0")

cmake/dotnet.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ endif()
8585
if(USE_DOTNET_8)
8686
list(APPEND TFM "net8.0")
8787
endif()
88+
if(USE_DOTNET_9)
89+
list(APPEND TFM "net9.0")
90+
endif()
8891

8992
list(LENGTH TFM TFM_LENGTH)
9093
if(TFM_LENGTH EQUAL "0")
@@ -227,6 +230,9 @@ function(add_dotnet_test FILE_NAME)
227230
if(USE_DOTNET_8)
228231
add_dotnet_tfm_test(${FILE_NAME} net8.0)
229232
endif()
233+
if(USE_DOTNET_9)
234+
add_dotnet_tfm_test(${FILE_NAME} net9.0)
235+
endif()
230236
message(STATUS "Configuring test ${FILE_NAME} ...DONE")
231237
endfunction()
232238

0 commit comments

Comments
 (0)