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

Tests fail to build in Visual Studio #434

Open
mleotta opened this issue Dec 18, 2017 · 4 comments
Open

Tests fail to build in Visual Studio #434

mleotta opened this issue Dec 18, 2017 · 4 comments

Comments

@mleotta
Copy link
Member

mleotta commented Dec 18, 2017

When building KWIVER in Visual Studio on Windows, the test will fail to build because GTest is required to run at build time and is not in the system path. GTest is typically provided as part of Fletch. We need a way for CMake to add the Fletch binary directory to the path for the KWIVER visual studio solution file.

@mleotta
Copy link
Member Author

mleotta commented Dec 18, 2017

@mwoehlke-kitware any thoughts on this? I consider GTest to be broken in KWIVER on Windows until this is addressed.

@mwoehlke-kitware
Copy link
Member

From the README (see also #366):

If you are on Windows and enable tests (KWIVER_ENABLE_TESTS=ON), and are building shared libraries (BUILD_SHARED_LIBS=ON), you will need to add the path to gtest.dll to the PATH in your environment in order to build and run the tests.

The easiest way to achieve this is to use the setup_KWIVER.bat script (described in the next session), and to run builds and/or launch Visual Studio from a command prompt which has been so configured.

@mleotta
Copy link
Member Author

mleotta commented Dec 18, 2017

We should not have to do this. This is a major pain. We want to be able to build this project as easily as any other project CMake-based project and not make the developers need to jump through hoops. You should not have to set your system path or launch Visual Studio from a command prompt to build KWIVER.

There must be some way for CMake to inject this path into the Visual Studio project file, right?

@mwoehlke-kitware
Copy link
Member

There must be some way for CMake to inject this path into the Visual Studio project file, right?

Not to my knowledge. (At best it would require a new feature in CMake, but I seem to recall @bradking saying it is not possible.)

Anyway, you will have the same problem if you try to run the tests.

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

2 participants