Closed Talkless closed 5 years ago
Same issue: I'm sometimes recompiling huge libraries with potentially a few hours of compilation, so having the build output of Conan in real time would be a huge benefit to just know how much longer I'm supposed to wait.
This probably could be instrumented through a VERBOSE
option to conan_cmake_run
or some equivalent.
That can be fixed very easily. Just replace at line 376: this:
execute_process(COMMAND ${conan_command} ${conan_args}
RESULT_VARIABLE return_code
OUTPUT_VARIABLE conan_output
ERROR_VARIABLE conan_output
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
message(STATUS "${conan_output}")
with this:
execute_process(COMMAND ${conan_command} ${conan_args}
RESULT_VARIABLE return_code
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
Everything will be printed to stdout and stderr at real time, without wait. It doesn't break anything, because the output message is printed to stdout anyway after conan execution is finished.
Thanks for the feedback. This has been implemented in https://github.com/conan-io/cmake-conan/commit/857403c74b284679526084c8f6eea50f2d38d7c9, will be released in 0.14.
Just to note, this change re-introduces the problem fixed in #100, though (server mode will no longer receive the output at all). Though with CMake 3.14 introducing https://cmake.org/cmake/help/v3.14/manual/cmake-file-api.7.html and 3.15 deprectating the https://cmake.org/cmake/help/v3.14/manual/cmake-server.7.html maybe that's OK (after 857403c74b284679526084c8f6eea50f2d38d7c9 it works better for the new way, and not at all for the older, now-deprecated way).
Kind of sucks until IDEs catch up, but VS2019 has adopted the new file API, and hopefully Qt creator eventually will.
I have this
CMakeLists.txt
to test conan usage:conanfile.txt:
src/main.cpp:
When I run
cmake ../ -DCMAKE_BUILD_TYPE=Release
, andconan
needs to build dependent libraries, for most of the time I see this fixed output:And only much later, at the end, I get full output, with
CMake
build progress, etc. At first, I thought something crashe/frozed, but CPU fan starting to spin up changed my mind :) .Is this design limitation to see real-time build procedure output via
conan_cmake_run
?