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

get_target_property() called with non-existent target "NOTFOUND". #4

Closed
parkercoates opened this issue Jun 29, 2015 · 6 comments
Closed

Comments

@parkercoates
Copy link

I'm porting a rather large code base CMake and shopping around for a precompiled header solution. Yours seems like the cleanest, but I've had no luck getting it to work.

When I attempt to add a precompiled header to any of my targets, I get the following two errors repeated for several thousand lines. CMake version 3.2.3. Since the stack isn't real, I don't know how to start debugging the issue. Any assistance would be appreciated.

CMake Error at cmake/CMakePCHCompiler/CMakePCHCompiler.cmake:229 (get_target_property):
  get_target_property() called with non-existent target "NOTFOUND".
Call Stack (most recent call first):
  Some weird path:9999 (__watch_pch_last_hook)


CMake Error at cmake/CMakePCHCompiler/CMakePCHCompiler.cmake:236 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  NOTFOUND.pch
Call Stack (most recent call first):
  Some weird path:9999 (__watch_pch_last_hook)
@AmineKhaldi
Copy link

This looks like issue #1 which still exists (but the issue is marked resolved for some reason)

@parkercoates
Copy link
Author

@AmineKhaldi, it seems you're right. Thanks.

Were you ever able to get CMakePCHCompiler working for you?

@AmineKhaldi
Copy link

Not yet. Hopefully Adam will get to the bottom of it.

@DoDoENT
Copy link

DoDoENT commented Jan 21, 2016

Is it even possible to add precompiled header to target which depends on target that will be defined later (i.e. after calling target_precompiled_header) or does this require native CMake support? I am also getting hundreds of errors such like these...

Also, in order use your compiler at all, I need to add following line in my CMakeLists.txt:

cmake_policy(SET CMP0045 OLD)

@m-7761
Copy link
Contributor

m-7761 commented Jun 30, 2017

Here is a fix for this problem in my case: #11

@nanoant
Copy link
Owner

nanoant commented Jul 26, 2018

Should be fixed by 0166e2c, feel free to comment if this is not the case.

@nanoant nanoant closed this as completed Jul 26, 2018
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

5 participants