Skip to content

Commit a5c7b72

Browse files
Merge pull request #1789 from arcaneframework/dev/gg-simplify-detection-of-dotnet
Use detection of 'dotnet' from Arccon.
2 parents 12be2fe + 6510f63 commit a5c7b72

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

axlstar/CMake/FindDotNetCore.cmake

-13
This file was deleted.

axlstar/CMakeLists.txt

+9-5
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ message(STATUS "AXLSTAR_DOTNET_RUNNER is '${AXLSTAR_DOTNET_RUNNER}'")
3535
if (AXLSTAR_DOTNET_RUNNER STREQUAL mono)
3636
message(FATAL_ERROR "Building with 'mono' is no longer supported. Only 'coreclr' is supported")
3737
elseif (AXLSTAR_DOTNET_RUNNER STREQUAL coreclr)
38-
# Fichier pour rechercher .NetCore.
39-
include(CMake/FindDotNetCore.cmake)
38+
if (NOT DOTNET_EXEC)
39+
message(FATAL_ERROR
40+
"no 'dotnet' exec found.\n"
41+
" You can download a binary version of '.Net 8' at the following address:\n"
42+
" 'https://dotnet.microsoft.com/en-us/download´")
43+
endif()
44+
# La variable DOTNET_RUNNER_EXEC est utilisée pour la configuration de 'launcher.in'
4045
set(DOTNET_RUNNER_EXEC ${DOTNET_EXEC})
41-
set(DOTNET_BUILDER_EXEC ${DOTNET_EXEC})
4246
set(DLL_EXE_EXTENSION .dll)
4347
else()
4448
message(FATAL_ERROR "Invalid value '${AXLSTAR_DOTNET_RUNNER}' for AXLSTAR_DOTNET_RUNNER. Only 'coreclr' is supported")
@@ -103,7 +107,7 @@ set(AXLSTAR_BUILD_COMMAND_ARGS ${AXLSTAR_BUILD_COMMAND_ARGS} ${AXLSTAR_MSBUILD_C
103107
# spécifier que le nom de la solution et pas le chemin complet.
104108
add_custom_command(OUTPUT ${AXLSTAR_AXL2CC_EXE}
105109
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
106-
COMMAND ${DOTNET_BUILDER_EXEC}
110+
COMMAND ${ARCCON_MSBUILD_EXEC_coreclr}
107111
ARGS ${AXLSTAR_BUILD_COMMAND_ARGS}
108112
DEPENDS ${AXL_SOLUTION_FILE}
109113
)
@@ -112,7 +116,7 @@ add_custom_target(dotnet_axl_depend ALL DEPENDS ${AXLSTAR_AXL2CC_EXE})
112116
# Créé une cible pour forcer la recompilation
113117
add_custom_target(dotnet_axl
114118
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
115-
COMMAND ${DOTNET_BUILDER_EXEC} ${AXLSTAR_BUILD_COMMAND_ARGS}
119+
COMMAND ${ARCCON_MSBUILD_EXEC_coreclr} ${AXLSTAR_BUILD_COMMAND_ARGS}
116120
)
117121

118122
configure_file(${AXLSTAR_ROOT}/Arcane.Axl/axl.xsd share/axl.xsd)

0 commit comments

Comments
 (0)