-----Original Message-----
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Yngve Inntjore Levinsen
Sent: Donnerstag, 8. August 2013 17:54
Cc: cmake@cmake.org
Subject: Re: [CMake] macro/functions in ctest scripts

Den 08. aug. 2013 17:36, skrev Jakub Zakrzewski:
> Hi,
>
> a neee - just ignore this - I need more sleep...
>
> This indeed looks like a correct piece of code.
> Moreover - it works perfectly with my ctest...

No problem. I noticed that if I add this in the "ctest run script", i.e.
the script I execute like "ctest -S myscript.cmake", then the macro works 
correctly. Hence perhaps it is correct that the ctest --help-command is 
reporting this as such. However what I am trying to do now (not sure if it is 
supposed to work), is to add this to a 'CTestTestfile.cmake' file in the 
project itself, where the project is not using cmake (there is nothing to 
compile so it doesn't make much sense to use cmake).

Cheers,
Yngve
--

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://www.cmake.org/mailman/listinfo/cmake

Hi,

I think it should work. Especially because that's the file I tested on... I 
mean, my project is CMake-generated, but I modified CTestTestfile.cmake 
manually:

# CMake generated Testfile for 
# Source directory: /home/jzakrzewski/server
# Build directory: /home/jzakrzewski/server/build/debug
# 
# This file includes the relevent testing commands required for 
# testing this directory and lists subdirectories to be tested as well.

macro(hello MESSAGE)
   message("${MESSAGE}")
endmacro(hello)
hello("Hello World")

SUBDIRS(src/Base)
SUBDIRS(src/Core)

And whe running just plain
ctest
command, I have output like this:

UpdateCTestConfiguration  from 
:/home/jzakrzewski/server/build/debug/DartConfiguration.tcl
UpdateCTestConfiguration  from 
:/home/jzakrzewski/server/build/debug/DartConfiguration.tcl
Test project /home/jzakrzewski/server/build/debug
Constructing a list of tests
Hello World
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
        <cutoff>

So it's apparently working.

--
Gruesse,
Jakub



--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to