mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
build: create separate targets for nvim with and without runtime files
This distinction is important for correct dependency management, as the nvim binary is used to create some runtime files. The nvim binary (and the target to build it) is thus called `nvim_bin` and the target to build all of nvim (binary+runtime) is called `nvim`.
This commit is contained in:
@ -148,7 +148,7 @@ foreach(BUILD_TYPE Debug Release RelWithDebInfo MinSizeRel)
|
||||
set(GEN_RHS "${CMAKE_C_FLAGS_${BUILD_TYPE_UPPER}} ")
|
||||
string(APPEND VERSION_STRING "$<${GEN_CONFIG}:${GEN_RHS}>")
|
||||
|
||||
set(GEN_RHS "$<$<BOOL:$<TARGET_PROPERTY:nvim,INTERPROCEDURAL_OPTIMIZATION_${BUILD_TYPE_UPPER}>>:${CMAKE_C_COMPILE_OPTIONS_IPO}>")
|
||||
set(GEN_RHS "$<$<BOOL:$<TARGET_PROPERTY:nvim_bin,INTERPROCEDURAL_OPTIMIZATION_${BUILD_TYPE_UPPER}>>:${CMAKE_C_COMPILE_OPTIONS_IPO}>")
|
||||
string(APPEND VERSION_STRING "$<${GEN_CONFIG}:${GEN_RHS}>")
|
||||
endforeach()
|
||||
|
||||
@ -161,7 +161,7 @@ function(append_target_expression)
|
||||
""
|
||||
${ARGN})
|
||||
|
||||
set(TARGET_EXPRESSION "$<TARGET_PROPERTY:nvim,${ARG_PROPERTY}>")
|
||||
set(TARGET_EXPRESSION "$<TARGET_PROPERTY:nvim_bin,${ARG_PROPERTY}>")
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.15)
|
||||
set(TARGET_EXPRESSION "$<REMOVE_DUPLICATES:${TARGET_EXPRESSION}>")
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user