yrnkrn / zapcc

zapcc is a caching C++ compiler based on clang, designed to perform faster compilations
Other
1.25k stars 61 forks source link

Cocos2d-x and CMake WatchMacro #10

Closed v1993 closed 6 years ago

v1993 commented 6 years ago

If I get rigth usage WatchMacro this macroses should be added to that directive:

# Cocos2d-x
BUILD_EDITOR_COCOSBUILDER
BUILD_EDITOR_COCOSTUDIO
BUILD_EDITOR_SPINE
BUILD_EXTENSIONS
BUILD_JS_LIBS
BUILD_LUA_LIBS
BUILD_SHARED_LIBS
DEBUG_MODE
GEN_COCOS_PREBUILT
USE_BOX2D
USE_BULLET
USE_CHIPMUNK
USE_COCOS_PREBUILT
USE_EXTERNAL_PREBUILT
USE_JPEG
USE_PNG
USE_RECAST
USE_TIFF
USE_WEBP
# CMake
CMAKE_BUILD_TYPE
yrnkrn commented 6 years ago

WatchMacro is used for reset when macros change definitions during a build via different -D command line flags or #define from different files that zappc heuristic does not catch it otherwise. For example if USE_* macros does not change during the whole build, so no need to watch for them.

You usually don't want to add any macros unless strictly required as this may cause cache resets and slowdown. Had you encountered compile or link errors?

v1993 commented 6 years ago

Ok, I was wrong. Thansk for explaining this. Probably, you should add this as comment to zapccs.config?

yrnkrn commented 6 years ago

Yes, done in d54fb9dc2186df8873940c21f27fb459bd5af474