cotire icon indicating copy to clipboard operation
cotire copied to clipboard

Same Target Had been compile Twice with different Compile flags, but the prebuild header file hadn't been recreated.

Open lxy9527 opened this issue 5 years ago • 2 comments

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 .

  1. build A , C target , compile flag with -DLE ,
  2. 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 ?

lxy9527 avatar Jul 02 '20 12:07 lxy9527

I think the _pchFile need depend xxx/flags.make , i will search the depend method in the CMake website ...

lxy9527 avatar Jul 03 '20 03:07 lxy9527

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 ,

lxy9527 avatar Jul 03 '20 07:07 lxy9527