mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix: ignore non-existent properties during header generation
`get_target_property(<var> ...)` sets `<var>` to `<var>-NOTFOUND` if the property doesn't exist for the given target. Detect this situation to avoid adding various `-Dprop-NOTFOUND` and `-Iprop-NOTFOUND` to the command-line when generating the headers.
This commit is contained in:
		| @@ -450,18 +450,23 @@ 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() | ||||
|  | ||||
| if(APPLE AND CMAKE_OSX_SYSROOT) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 James McCoy
					James McCoy