CMakeDetermineCompilerId: link flags after source file
can you please add one more variable at this line
https://gitlab.kitware.com/cmake/cmake/-/blob/v3.23.2/Modules/CMakeDetermineCompilerId.cmake#L707
execute_process(
COMMAND "${CMAKE_${lang}_COMPILER}"
${CMAKE_${lang}_COMPILER_ID_ARG1}
${userflags}
${testflags}
${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
"${src}"
+ ${CMAKE_${lang}_COMPILER_ID_LINK_FLAGS_ALWAYS}
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
this is need to able to pass addition compiler flags to msvc cl.exe
i can't pass this flags through ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
because this is wrong order with "${src}"
and will produce error while run cl.exe
variable ${CMAKE_${lang}_COMPILER_ID_LINK_FLAGS_ALWAYS}
i will use in toolchain_file
Edited by Brad King