Question as title.
Netbeans does not offer pre- or postbuild steps and also does not offer this setting by default. Is there any convinient way I can make this work or can I edit some configs?
I think the makefile is getting regenerated when you add files etc.
I heavily rely on header only libs like boost or glm and my productivity depends on precompiled headers since it makes the code compile so much faster.
I use mingw as a compiler suite on windows and as language C++.
EDIT
My modified makefile after the first suggestion:
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
# build
build: .build-post
.build-pre:
# Add your pre 'build' code here...
NightLight.hpp.gch: Nightlight.hpp
$(COMPILE.cc) $(CXXFLAGS) -g NightLight.hpp
.build-post: .build-impl
# Add your post 'build' code here...
# clean
clean: .clean-post
.clean-pre:
# Add your pre 'clean' code here...
.clean-post: .clean-impl
# Add your post 'clean' code here...
$(RM) pch.h.gch
you have to add NightLight.hpp.gch after .build-pre: so that it is dependent on your target and will execute your target
example:
the problem with this approach is that you must have the exact $(CXXFLAGS) as in the other makefiles or your .gch will just be ignored and you have to set them manually for debug/release etc. (look at how $(CXXFLAGS) is defined in i.e. “Makefile-Debug.mk” in your nbproject folder and replace it in your makefile)
netbeans sucks with precompiled headers as far as i know