mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	build(deps): CMake generation fails when path contains spaces #35332
Problem:
Additional include directories in DEPS_INCLUDE_FLAGS variable are not
quoted. Paths with spaces break the resulting compile command.
Solution:
Enclose values in double quotes.
Note: normally we should avoid manual quoting, but in this case we can't
because of how `DEPS_INCLUDE_FLAGS` is used in `BuildLuv.cmake`
and `BuildLpeg.cmake`.
(cherry picked from commit 77860f5418)
			
			
This commit is contained in:
		 MinimalEffort07
					MinimalEffort07
				
			
				
					committed by
					
						![github-actions[bot]](/assets/img/avatar_default.png) github-actions[bot]
						github-actions[bot]
					
				
			
			
				
	
			
			
			![github-actions[bot]](/assets/img/avatar_default.png) github-actions[bot]
						github-actions[bot]
					
				
			
						parent
						
							abfbd155da
						
					
				
				
					commit
					3343ee971b
				
			| @@ -73,7 +73,7 @@ if(HAS_OG_FLAG) | |||||||
|   set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS}) |   set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS}) | ||||||
| endif() | endif() | ||||||
|  |  | ||||||
| set(DEPS_INCLUDE_FLAGS "-I${DEPS_INSTALL_DIR}/include -I${DEPS_INSTALL_DIR}/include/luajit-2.1") | set(DEPS_INCLUDE_FLAGS "-I\"${DEPS_INSTALL_DIR}/include\" -I\"${DEPS_INSTALL_DIR}/include/luajit-2.1\"") | ||||||
|  |  | ||||||
| # If the macOS deployment target is not set manually (via $MACOSX_DEPLOYMENT_TARGET), | # If the macOS deployment target is not set manually (via $MACOSX_DEPLOYMENT_TARGET), | ||||||
| # fall back to local system version. Needs to be done here and in top-level CMakeLists.txt. | # fall back to local system version. Needs to be done here and in top-level CMakeLists.txt. | ||||||
| @@ -96,10 +96,10 @@ else() | |||||||
|   find_package(Lua 5.1 EXACT) |   find_package(Lua 5.1 EXACT) | ||||||
|   if(LUAJIT_FOUND) |   if(LUAJIT_FOUND) | ||||||
|     set(LUA_ENGINE LuaJit) |     set(LUA_ENGINE LuaJit) | ||||||
|     string(APPEND DEPS_INCLUDE_FLAGS " -I${LUAJIT_INCLUDE_DIR}") |     string(APPEND DEPS_INCLUDE_FLAGS " -I\"${LUAJIT_INCLUDE_DIR}\"") | ||||||
|   elseif(LUA_FOUND) |   elseif(LUA_FOUND) | ||||||
|     set(LUA_ENGINE Lua) |     set(LUA_ENGINE Lua) | ||||||
|     string(APPEND DEPS_INCLUDE_FLAGS " -I${LUA_INCLUDE_DIR}") |     string(APPEND DEPS_INCLUDE_FLAGS " -I\"${LUA_INCLUDE_DIR}\"") | ||||||
|   else() |   else() | ||||||
|     message(FATAL_ERROR "Could not find system lua or luajit") |     message(FATAL_ERROR "Could not find system lua or luajit") | ||||||
|   endif() |   endif() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user