The topic is similar to this one
http://industriousone.com/topic/separate-pch-file-c-vs-c-files
Some library (AntTweakBar) uses precompiled header files only for C++ files, not C.
Is there a way to do this with premake?
The topic is similar to this one
http://industriousone.com/topic/separate-pch-file-c-vs-c-files
Some library (AntTweakBar) uses precompiled header files only for C++ files, not C.
Is there a way to do this with premake?
Not currently, no.
BTW, one can easily put #ifdef __cplusplus around C++ includes in PCH.
Thanks for suggesting the workarounds, I just disabled PCH for now.
The previous link I send had the suggestion of pchsource_c / _cpp and pchheader_c / _cpp
Is it that you are too busy/other priorities to apply that patch, or is there something wrong with it?
I'm looking for the same kind of options, but the difference for me is that I also have a few .cpp that should not use PCH :)
For the moment, I create a second project, side by side with the original one, containing all the files that do not use PCH, but the perfect solution would be to make file configuration correctly handle flags. Something like :
configuration { "*.c" }
flags { "NoPCH" }
configuration { "somepath/**.cpp" }
flags { "NoPCH" }
etc.
On an unrelated note : someone knows any decent lua debugger that could be used with premake to set breakpoints, inspect variables, etc. ? I'm having a hard time knowing what variable contains what, and this is the biggest problem I have anytime I want to do something in premake ...
@erwincoumans: "Is it that you are too busy/other priorities to apply that patch, or is there something wrong with it?"
The problem with the existing patch is a) it doesn't have any tests, but more importantly b) it only works for Visual Studio. So really it is a little of both.
No worries, it is low priority because several workarounds exist.
Another way is to split the library in two, each with different PCH settings.
@Citron: a Lua debugger that works with premake would be great indeed.
Thanks,
Erwin
A little follow up on debugging (at least Erwin might be interested ^^)
Decoda works really well (http://www.unknownworlds.com/decoda/download) Unfortunately, it's a 30 days limited trial, but I still have to try other options.
Anyway, if you want to fully debug premake4 (setting breakpoints, inspect all variables, etc.) you'll have to build premake in debug. Then in decoda, create a new project, add all the .lua files location in src, and when done, open the project settings, set Command to the debug executable of premake, and set the command arguments like this :
--scripts=path_to_your_src_folder --your_other_options your_target
(replace the custom stuff by the real options / targets, of course ^^)
And set the working directory to where your premake4.lua script is located !
Done. You can set breakpoints, add watches, etc. Beware that execution of the script is really slow (debug build + Decoda doing a lot in background I'd guess)
>Unfortunately, it's a 30 days limited trial
Unfortunately, it's for Windows(
You can try to look for LuaEclipse, but I didn't get it to break ...
It was a pain in the ... to configure so that premake would execute, but I finally succeeded. Unfortunately, on the versions I tested, I wasn't able to set breakpoints.
Maybe I missed something, but if you want to give it a try, here's the url : http://luaeclipse.luaforge.net/