mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
build: show build type specific compiler flags when using --version
The build type specific flags are defined in the variables CMAKE_C_FLAGS_<CONFIG>, where <CONFIG> can be DEBUG, RELEASE, RELWITHDEBINFO and MINSIZEREL.
This commit is contained in:
parent
3683d6b7a8
commit
7100a80253
@ -130,6 +130,7 @@ endif()
|
|||||||
if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG)
|
if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG)
|
||||||
string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||||
string(REPLACE "/DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
string(REPLACE "/DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||||
|
string(REPLACE " " " " CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") # Remove duplicate whitespace
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(LOG_LIST_ACTIONS "Add list actions logging" OFF)
|
option(LOG_LIST_ACTIONS "Add list actions logging" OFF)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define NVIM_API_LEVEL_COMPAT @NVIM_API_LEVEL_COMPAT@
|
#define NVIM_API_LEVEL_COMPAT @NVIM_API_LEVEL_COMPAT@
|
||||||
#define NVIM_API_PRERELEASE @NVIM_API_PRERELEASE@
|
#define NVIM_API_PRERELEASE @NVIM_API_PRERELEASE@
|
||||||
|
|
||||||
#define NVIM_VERSION_CFLAGS "${CMAKE_C_COMPILER} $<JOIN:$<TARGET_PROPERTY:nvim,COMPILE_OPTIONS>, > -D$<JOIN:$<TARGET_PROPERTY:nvim,COMPILE_DEFINITIONS>, -D> -I$<JOIN:$<TARGET_PROPERTY:nvim,INCLUDE_DIRECTORIES>, -I>"
|
#define NVIM_VERSION_CFLAGS "${CMAKE_C_COMPILER} $<$<CONFIG:Debug>:${CMAKE_C_FLAGS_DEBUG}>$<$<CONFIG:Release>:${CMAKE_C_FLAGS_RELEASE}>$<$<CONFIG:RelWithDebInfo>:${CMAKE_C_FLAGS_RELWITHDEBINFO}>$<$<CONFIG:MinSizeRel>:${CMAKE_C_FLAGS_MINSIZEREL}> $<JOIN:$<TARGET_PROPERTY:nvim,COMPILE_OPTIONS>, > -D$<JOIN:$<TARGET_PROPERTY:nvim,COMPILE_DEFINITIONS>, -D> -I$<JOIN:$<TARGET_PROPERTY:nvim,INCLUDE_DIRECTORIES>, -I>"
|
||||||
#define NVIM_VERSION_BUILD_TYPE "$<CONFIG>"
|
#define NVIM_VERSION_BUILD_TYPE "$<CONFIG>"
|
||||||
|
|
||||||
#endif // AUTO_VERSIONDEF_H
|
#endif // AUTO_VERSIONDEF_H
|
||||||
|
Loading…
Reference in New Issue
Block a user