Open beenjohn opened 2 years ago
I should add that I'm using a conan recipe for cmake, so cmake is only accessible in the build environment.
Hi @beenjohn
Thanks for your report.
I think that some more detail is necessary. The best way to start would be to start from the conan new hello/0.1 -m=cmake_lib
and have a full reproducible example. Because for example:
ctest()
doesn't exist, I guess you mean test()
VirtualRunEnv
to define the running environment for you
For some background, I'm building a package that depends on gnuradio which complicates things in itself.
When trying to run cmake(self).ctest after a successful build, none of the dependency libraries are available. This is all being done in the build method of the recipe. I can make things work by adding the cmake path to the run environment and running ctest in the conanrunenv.
From looking at conan.tools.cmake.cmake it doesn't look like the test call is made aware of the toolchain or other build settings. What is the intended use of ctest? Should I be running ctest in a different area of the recipe?