mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #27808 from jamessan/gen_cflags-cleanup
Cleanup construction of command-lines for header generation
This commit is contained in:
commit
dd0fc73bbe
@ -450,20 +450,27 @@ endif()
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
get_target_property(prop main_lib INTERFACE_COMPILE_DEFINITIONS)
|
||||
foreach(gen_cdef ${prop})
|
||||
if(NOT ${gen_cdef} MATCHES "INCLUDE_GENERATED_DECLARATIONS")
|
||||
list(APPEND gen_cflags "-D${gen_cdef}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT "${prop}" STREQUAL "prop-NOTFOUND")
|
||||
foreach(gen_cdef ${prop})
|
||||
if(NOT ${gen_cdef} MATCHES "INCLUDE_GENERATED_DECLARATIONS")
|
||||
list(APPEND gen_cflags "-D${gen_cdef}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
get_directory_property(targets BUILDSYSTEM_TARGETS)
|
||||
foreach(target ${targets})
|
||||
get_target_property(prop ${target} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
foreach(gen_include ${prop})
|
||||
list(APPEND gen_cflags "-I${gen_include}")
|
||||
endforeach()
|
||||
if(NOT "${prop}" STREQUAL "prop-NOTFOUND")
|
||||
message(STATUS "${target} props '${prop}'")
|
||||
foreach(gen_include ${prop})
|
||||
list(APPEND gen_cflags "-I${gen_include}")
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES gen_cflags)
|
||||
|
||||
if(APPLE AND CMAKE_OSX_SYSROOT)
|
||||
list(APPEND gen_cflags "-isysroot" "${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user