cmake -E remove -f

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cmake -E remove -f

Craig Scott-3
Can anyone identify a scenario where the -f option to the CMake command mode's "remove" command makes any difference? Testing a range of possibilities has so far yielded no difference for the cases I can think of. The documentation simply says "use -f to force it", which doesn't explain when such forcing would be needed.

--
Craig Scott
Melbourne, Australia

--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cmake -E remove -f

Mark Ferry
Hi Craig

On Thu, 06 Apr 2017 08:55:58 +1000, Craig Scott wrote:
> Can anyone identify a scenario where the -f option to the CMake command
> mode's "remove" command makes any difference?
>

How about removing directories:

~/src/cmake-test$ cmake --version
cmake version 3.0.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
~/src/cmake-test$ mkdir foo

~/src/cmake-test$ cmake -E remove foo
~/src/cmake-test$ echo $?
1

~/src/cmake-test$ cmake -E remove -f foo
~/src/cmake-test$ echo $?
0



--
Cognomen Ltd
http://cognomen.co.uk
+44 7855 790184

--

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:
http://public.kitware.com/mailman/listinfo/cmake

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cmake -E remove -f

Craig Scott-3
Yes, but in both cases the directory foo is still not deleted! At least on OSX any way.

On Thu, Apr 6, 2017 at 9:22 AM, Mark Ferry <[hidden email]> wrote:
Hi Craig

On Thu, 06 Apr 2017 08:55:58 +1000, Craig Scott wrote:
> Can anyone identify a scenario where the -f option to the CMake command
> mode's "remove" command makes any difference?
>

How about removing directories:

~/src/cmake-test$ cmake --version
cmake version 3.0.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
~/src/cmake-test$ mkdir foo

~/src/cmake-test$ cmake -E remove foo
~/src/cmake-test$ echo $?
1

~/src/cmake-test$ cmake -E remove -f foo
~/src/cmake-test$ echo $?
0



--
Cognomen Ltd
http://cognomen.co.uk
<a href="tel:%2B44%207855%20790184" value="+447855790184">+44 7855 790184



--
Craig Scott
Melbourne, Australia

--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cmake -E remove -f

Craig Scott-3
After taking a look at the source code, I'm convinced this option is questionable. Issue created in gitlab here.


On Thu, Apr 6, 2017 at 9:35 AM, Craig Scott <[hidden email]> wrote:
Yes, but in both cases the directory foo is still not deleted! At least on OSX any way.

On Thu, Apr 6, 2017 at 9:22 AM, Mark Ferry <[hidden email]> wrote:
Hi Craig

On Thu, 06 Apr 2017 08:55:58 +1000, Craig Scott wrote:
> Can anyone identify a scenario where the -f option to the CMake command
> mode's "remove" command makes any difference?
>

How about removing directories:

~/src/cmake-test$ cmake --version
cmake version 3.0.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
~/src/cmake-test$ mkdir foo

~/src/cmake-test$ cmake -E remove foo
~/src/cmake-test$ echo $?
1

~/src/cmake-test$ cmake -E remove -f foo
~/src/cmake-test$ echo $?
0



--
Cognomen Ltd
http://cognomen.co.uk
<a href="tel:%2B44%207855%20790184" value="+447855790184" target="_blank">+44 7855 790184



--
Craig Scott
Melbourne, Australia



--
Craig Scott
Melbourne, Australia

--

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:
http://public.kitware.com/mailman/listinfo/cmake
Loading...