Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lxy9527 opened this issue Jul 2, 2020 · 2 comments

Comments

@lxy9527
Copy link

lxy9527 commented Jul 2, 2020

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
Copy link
Author

lxy9527 commented Jul 3, 2020

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

@lxy9527
Copy link
Author

lxy9527 commented Jul 3, 2020

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 ,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant