On Feb 7, 2014, at 3:01 PM, Brad King <[email protected]> wrote:

> On 02/07/2014 04:46 PM, Jean-Christophe Fillion-Robin wrote:
>>>    I have been able to determine that the code isn’t working because it 
>>> seems that when running from ctest, cmake seems to be running in a 
>>> configuration-less mode. Ie CMAKE_BUILD_TYPE/CMAKE_CONFIGURATION_TYPE are 
>>> not set regardless of the -C option passed to ctest.    I would have 
>>> thought that the
>>>    build configuration of the test would match the configuration set with 
>>> ‘ctest -C .'
>> Agreed. Is there an issue in the tracker to document that problem ?
> 
> No, because it is not a bug, at least in so far as it is not intended
> to work.  Also it only influences CMake's own testing and not other
> projects so it is not public-facing behavior.
> 
> A few calls in Tests/CMakeLists.txt add
> 
> -DCMAKE_BUILD_TYPE=\${CTEST_CONFIGURATION_TYPE}

I have tried adding that to my test call (—build-options) but it doesn’t seem 
to make any difference.

> to force building with the tested configuration but most tests do not
> need this.  Most tests work in any configuration and do not depend on
> being built as the same configuration that the running CMake was.

This particular feature I am testing tests add_custom_command in different 
configurations, so configurations do matter in this scenario.

> Steve W, can you post your tests as a patch or point us to a repo
> where they are published so we can see how you're trying to test the
> new CONFIG option?

I pushed the add-custom-command-config-tmp branch to stage.   This branch does 
not represent the final topic branch I intend to submit.   It is only my local 
working branch.   It contains a sample test in Tests/CustomCommand/ConfigTest.  
  I will remove it as soon as you have seen what you need.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

-- 

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to