premake-core icon indicating copy to clipboard operation
premake-core copied to clipboard

sysincludedirs does not generate -isystem in xcode

Open IanLilleyT opened this issue 7 years ago • 2 comments

My premake script has sysincludedirs "./libs" which goes under Header Search Paths in the Xcode project setting. The command line output then turns this into -I ./libs.

Found a similar issue with cmake: https://gitlab.kitware.com/cmake/cmake/issues/16795

I fixed this by putting ./libs under System Header Search Paths, which generates -isystem ./libs

IanLilleyT avatar Dec 25 '18 23:12 IanLilleyT

Seems reasonable to me, we currently have: includedirs -> USER_HEADER_SEARCH_PATHS sysincludedirs -> HEADER_SEARCH_PATHS

While CMake seems to have: includedirs -> HEADER_SEARCH_PATHS sysincludedirs -> SYSTEM_HEADER_SEARCH_PATHS

Should we match that? Or is USER_HEADER_SEARCH_PATHS correct for includedirs? I'm fairly certain someone went out of their way to change it to USER_... relatively recently, so perhaps it is correct?

samsinsane avatar Dec 31 '18 02:12 samsinsane

Making sysincludedirs points to SYSTEM_HEADER_SEARCH_PATHS seems the correct solution to me.

I do not use XCode, what are the differences between USER_HEADER_SEARCH_PATHS and HEADER_SEARCH_PATHS?

tdesveauxPKFX avatar Jan 04 '19 17:01 tdesveauxPKFX