Re: [CMake] Help with non-standard use of CMake

2019-01-02 Thread Eric Noulard
Hi Kyle & Donald,

ctest scripting is documented in here as well:
https://cmake.org/cmake/help/v3.13/manual/ctest.1.html#ctest-script

Since this is generated from in-source documentation:
https://github.com/Kitware/CMake/blob/master/Help/manual/ctest.1.rst

may be an explanation on how to use ctest without cmake directly in a
subsection of this manual would be  a way to keep it
more up-to-date along with the source.


Le mer. 2 janv. 2019 à 18:26, Kyle Edwards via CMake  a
écrit :

> On Wed, 2019-01-02 at 12:01 -0500, Donald MacQueen [|] wrote:
> > I looked at the example of Using ctest and cdash without cmake
> > (https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Using-CTE
> > ST-and-CDASH-without-CMAKE#steercmake)
> > and I think I will try to go in that direction.
>
> Donald,
>
> I just looked at that page, and it looks like it was written a very
> long time ago, before cmake_host_system_information() and
> execute_process() were created. The exec_program() command has been
> deprecated for years. I'm going to work on updating it a little bit
> right now.
>
> Kyle
> --
>
> 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
>


-- 
Eric
-- 

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


Re: [CMake] Help with non-standard use of CMake

2019-01-02 Thread Kyle Edwards via CMake
On Wed, 2019-01-02 at 12:01 -0500, Donald MacQueen [|] wrote:
> I looked at the example of Using ctest and cdash without cmake 
> (https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Using-CTE
> ST-and-CDASH-without-CMAKE#steercmake) 
> and I think I will try to go in that direction.

Donald,

I just looked at that page, and it looks like it was written a very
long time ago, before cmake_host_system_information() and
execute_process() were created. The exec_program() command has been
deprecated for years. I'm going to work on updating it a little bit
right now.

Kyle
-- 

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


Re: [CMake] Help with non-standard use of CMake

2019-01-02 Thread Donald MacQueen [|] via CMake

Hi Kyle,

I looked at the example of Using ctest and cdash without cmake 
(https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Using-CTEST-and-CDASH-without-CMAKE#steercmake) 
and I think I will try to go in that direction.


Part of my confusion is that I inherited this from a former employee and 
have been learning by doing/hacking.


Thanks for the reply.

On 1/2/2019 9:39 AM, Kyle Edwards wrote:

On Tue, 2019-01-01 at 16:55 -0500, Donald MacQueen [|] wrote:

No. CMakelists.txt does nothing but download the correct installer
(32 or 64 bit) from our server, set a bunch of variables, and then
run CTest.  I invoke the InstallShield installer from a command line
in a CTest.
There is no project, no make, no compile, no build. Just set a bunch
of variables and run CTest.
I think from what Kyle said I need to migrate(?) this to a script
that can be called from CTest directly, e.g., ctest -D Experimental
-S cdash.txt.
Thanks for the reply.

If CMakeLists.txt is only downloading and running an installer, then
perhaps it would be best to move this step into your CTest dashboard
script as you suggested. Your CMakeLists.txt is generating the
CTestTestfile.cmake file for you, but you can also write this file
yourself with a series of add_test() calls, which would enable you to
completely get rid of CMakeLists.txt.

If you're not comfortable doing this, you can also just do project(foo
LANGUAGES NONE) in your CMakeLists.txt as has already been suggested.

FWIW, the usual convention for CMake scripts is for anything other than
CMakeLists.txt to have a .cmake extension (though this isn't enforced,
it's just a convention.) And the -D argument to CTest isn't necessary
when running a dashboard script. So your CTest invocation would look
like this:

ctest -S dashboard.cmake

You can also have this script run ctest_configure(), which will run
CMake for you (if you decide not to migrate from CMakeLists.txt) so you
don't have to do it in the batch file.

Good luck, and let us know if you have any more questions!

Kyle


--
Donald [|]
A bad day in [] is better than a good day in {}.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

--

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


Re: [CMake] Help with non-standard use of CMake

2019-01-02 Thread Kyle Edwards via CMake
On Tue, 2019-01-01 at 16:55 -0500, Donald MacQueen [|] wrote:
> No. CMakelists.txt does nothing but download the correct installer
> (32 or 64 bit) from our server, set a bunch of variables, and then
> run CTest.  I invoke the InstallShield installer from a command line
> in a CTest.
> There is no project, no make, no compile, no build. Just set a bunch
> of variables and run CTest.
> I think from what Kyle said I need to migrate(?) this to a script
> that can be called from CTest directly, e.g., ctest -D Experimental
> -S cdash.txt.
> Thanks for the reply.

If CMakeLists.txt is only downloading and running an installer, then
perhaps it would be best to move this step into your CTest dashboard
script as you suggested. Your CMakeLists.txt is generating the
CTestTestfile.cmake file for you, but you can also write this file
yourself with a series of add_test() calls, which would enable you to
completely get rid of CMakeLists.txt.

If you're not comfortable doing this, you can also just do project(foo
LANGUAGES NONE) in your CMakeLists.txt as has already been suggested.

FWIW, the usual convention for CMake scripts is for anything other than
CMakeLists.txt to have a .cmake extension (though this isn't enforced,
it's just a convention.) And the -D argument to CTest isn't necessary
when running a dashboard script. So your CTest invocation would look
like this:

ctest -S dashboard.cmake

You can also have this script run ctest_configure(), which will run
CMake for you (if you decide not to migrate from CMakeLists.txt) so you
don't have to do it in the batch file.

Good luck, and let us know if you have any more questions!

Kyle
-- 

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