cotire
cotire copied to clipboard
Same Target Had been compile Twice with different Compile flags, but the prebuild header file hadn't been recreated.
as the title , we meet this problem , below ,we will make a example to explain what i meet . In my CMakeLists, we had build three target , A , B , C both A and B with depend C .
- build A , C target , compile flag with -DLE ,
- build B , C target , compile flag with -DBG when we build A C target with -DLE had been successed , we start build B, C target with -DBG then the prebuild head file hadn't recreate , so an error had occur as below . cc1: warning: xxx_C_prefix.h.gch: not used because `LE' not defined [-Winvalid-pch]
Is there any comman can force recreate the prebuild header file ?
I think the _pchFile need depend xxx/flags.make , i will search the depend method in the CMake website ...
As I Though , I did a test that i make _pchFile depend absolute path /xxx/xxx/flags.make, the prebuild header file can be recreate , but i don't known the MACRO of this file ,