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

KWIVER_TEST_ADD_TARGETS breaks CMake generation step #1138

Open
russelldj opened this issue Nov 17, 2020 · 7 comments
Open

KWIVER_TEST_ADD_TARGETS breaks CMake generation step #1138

russelldj opened this issue Nov 17, 2020 · 7 comments

Comments

@russelldj
Copy link
Contributor

russelldj commented Nov 17, 2020

I am trying to build the up-to-date master on Ubuntu 18.04. Generally it builds fine, but I have been having issues trying to get unit tests for the arrows. After setting KWIVER_TEST_ADD_TARGETS=True, CMake will configure fine but fail at the generation step with the following error:

CMake Error at CMake/utils/kwiver-utils-tests.cmake:70 (add_dependencies):
  The dependency target "gtest_discover_tests" of target "tests" does not
  exist.
Call Stack (most recent call first):
  CMake/kwiver-utils.cmake:20 (include)
  CMakeLists.txt:143 (include)

Which points to here. Unfortunately, my CMake understanding is very poor, so I don't know if this is a simple error. This issue has persisted for CMake versions 3.15.0, 3.18.0, and 3.19.0.

@dstoup
Copy link
Collaborator

dstoup commented Nov 17, 2020

Can you please post the following information?

  • A detailed KWIVER CMake configuration, e.g. every option enabled or disabled from the default.
  • Your Fletch config. Same as KWIVER, anything different than the default.
  • Any details we need to know about the steps to reproduce this issue, e.g. environment variables set? Did you run setup_KWIVER.sh before running tests. Also, just a number list of exact steps helps.
  • What version of CMake are you using?

@russelldj
Copy link
Contributor Author

russelldj commented Nov 17, 2020

KWIVER:

  • Point fletch_DIR and the build
  • ENABLE_TESTS=True
  • KWIVER_TEST_ADD_TARGETS=True

Fletch:

  • fletch_ENABLE_PDAL=False (Due to a libcurl linking error I can look into later)

I used CMake 3.18.3 for the latest tests of both Fletch and KWIVER, but this issue has also happened with versions 3.15.0 and and 3.19.0.

Steps to reproduce

  • Build Fletch from the latest master in a clean directory with the described config
  • Configure KWIVER from the latest master in an empty directory.
  • When using the CMake GUI the Generate step fails with the error described above.

@mwoehlke-kitware
Copy link
Member

I assume you mean KWIVER_TEST_ADD_TARGETS (note the terminal 'S')? KWIVER_TEST_ADD_TARGET doesn't appear to be a thing.

I wonder if this has ever worked... are you actually trying to use the individual test targets?

@russelldj russelldj changed the title KWIVER_TEST_ADD_TARGET breaks CMake generation step KWIVER_TEST_ADD_TARGETS breaks CMake generation step Nov 18, 2020
@russelldj
Copy link
Contributor Author

Good catch, yes I meant KWIVER_TEST_ADD_TARGETS (edited to reflect that) and that's what I was actually using. As discussed internally, I likely didn't need this option in the first place.

@russelldj
Copy link
Contributor Author

Is removing this unneeded flag useful or should I just close this?

@mwoehlke-kitware
Copy link
Member

Is removing this unneeded flag useful

Probably less chance of confusion if it didn't exist; if you're interested, I'd say go for it.

@dstoup
Copy link
Collaborator

dstoup commented Jan 12, 2021 via email

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

3 participants