ADD_CUSTOM_TARGET USES_TERMINAL not printing out stuff

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ADD_CUSTOM_TARGET USES_TERMINAL not printing out stuff

Gonzalo Garramuño
I run cpack with the trick of using a custom configuration.

ADD_CUSTOM_TARGET( bundle
                COMMAND "${CMAKE_CPACK_COMMAND}"
                "-C" "$<CONFIGURATION>"
                "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake"
                COMMENT "Running CPack. Please wait..."
                USES_TERMINAL
                DEPENDS translations )

This used to print out all that cpack was doing while it was doing it. 
Now with v3.15.0-rc1 it just sits there and outputs all the text at the
end when it finishes, which sucks as it looks like it has hung.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: ADD_CUSTOM_TARGET USES_TERMINAL not printing out stuff

CMake mailing list
On 6/5/19 8:27 AM, Gonzalo Garramuño wrote:
> This used to print out all that cpack was doing while it was doing it. 
> Now with v3.15.0-rc1 it just sits there and outputs all the text at the
> end when it finishes, which sucks as it looks like it has hung.

Thanks for trying the release candidate!

However, I cannot reproduce this in a simple example:


```
$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
project(UsesTerminal NONE)
add_custom_target(UseTerminal ALL
  COMMAND sh "${CMAKE_CURRENT_SOURCE_DIR}/custom.sh"
  USES_TERMINAL
  )

$ cat ../custom.sh
echo first
sleep 1
echo second
sleep 1
echo third

$ cmake --version
cmake version 3.15.0-rc1
...

$ cmake .. -GNinja

$ ninja UseTerminal
...
first
second
third
```

While ninja is running I can see one line print at a time separated
by one second each.

Please try to provide a more complete standalone example.  Also please
open an issue for this at https://gitlab.kitware.com/cmake/cmake/issues

Does `pool = console` appear in the `build.ninja` rule for your custom target?

Thanks,
-Brad
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: ADD_CUSTOM_TARGET USES_TERMINAL not printing out stuff

Gonzalo Garramuño


El 05/06/19 a las 11:51, Brad King escribió:
> On 6/5/19 8:27 AM, Gonzalo Garramuño wrote:
>> This used to print out all that cpack was doing while it was doing it.
>> Now with v3.15.0-rc1 it just sits there and outputs all the text at the
>> end when it finishes, which sucks as it looks like it has hung.
> Thanks for trying the release candidate!
>
> However, I cannot reproduce this in a simple example:
>
Thanks Brad, for trying it out.  The problem seems to be related to
cpack.  I posted a more complete example with a bash wrapup script. You
will still need to fill in the bin directory of the build with something
big, so cpack will take a while compressing it.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake