Open mleotta opened 6 years ago
@mwoehlke-kitware any thoughts on this? I consider GTest to be broken in KWIVER on Windows until this is addressed.
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 togtest.dll
to thePATH
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.
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?
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.
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.