I am not using a dashboard.. 

What I found is this.. When running a test from a VCXProj system, CMake sets up 
the custom command as follows
Ctest ..... -C $(Configuration)

The $(Configuration) is a visual studio/devenv variable, that is set by the 
system baed on the current configuration.

However, when running cmake via a "super project" to a "subordinate external 
project" (sorry if my nomenclature is wrong), it runs without the -C option.

Using a custom TEST_COMMAND doesn’t help in the ExternalProject_Add command, 
because for windows VS multi-config setups, the current configuration isn’t 
known as a CMAKE variable at the proper time

So I descided to just "hard code" it in, like you suggested.
Scott

-----Original Message-----
From: David Cole [mailto:dlrd...@aol.com] 
Sent: Thursday, March 24, 2016 12:30 PM
To: Scott Aron Bloom
Cc: Hendrik Sattler; Alan W. Irwin; cmake@cmake.org
Subject: Re: [CMake] Two phase install?

Are you running a dashboard script (ctest -S script) when this happens? Or 
calling ctest directly with other arguments?

If you are running a -S script, you can specify the configuration to build and 
test in the script itself with the CTEST_CONFIGURATION_TYPE script variable. 
Read the docs here on the ctest_build and ctest_test
steps: https://cmake.org/cmake/help/v3.5/manual/ctest.1.html#ctest-build-step

The ctest_build command also takes a "CONFIGURATION" argument directly, but 
surprisingly, the ctest_test command does not seem to have that arg. 
https://cmake.org/cmake/help/v3.5/command/ctest_build.html
and https://cmake.org/cmake/help/v3.5/command/ctest_test.html

If you're not calling a -S script, I'm not sure how else you can do it besides 
passing "-C Release" on the command line...


HTH,
David C.



On Thu, Mar 24, 2016 at 2:09 PM, Scott Aron Bloom <sc...@towel42.com> wrote:
>
>
> -----Original Message-----
> From: Hendrik Sattler [mailto:p...@hendrik-sattler.de]
> Sent: Thursday, March 24, 2016 3:54 AM
> To: Alan W. Irwin; Scott Aron Bloom
> Cc: cmake@cmake.org
> Subject: Re: [CMake] Two phase install?
>
>
>
> Am 24. März 2016 10:14:40 MEZ, schrieb "Alan W. Irwin" 
> <ir...@beluga.phys.uvic.ca>:
>>On 2016-03-24 03:59-0000 Scott Aron Bloom wrote:
>>
>>> That method does NOT work with windows...  And since the visual
>>studio project has the external as a single command, (not sure if its 
>>calling nmake or the new build cmd) the proeject is not run in 
>>parallel.
>>
>>I am pretty sure ExternalProject_Add only works with generators 
>>associated with build commands you can run from the command line such 
>>as make, nmake, jom, ninja, etc..  So, for MSVC the way you arrange 
>>that is avoid all the visual studio generators, and instead use one of 
>>"NMake Makefiles", "NMake Makefiles JOM", or "Ninja".
>
> No. Just as with cmake-generated solutions, you can build those on the 
> command line using msbuild or devenv, the one used by cmake depends on the 
> cmake version. You can even use cmake itself to trigger the right build 
> command for those. Parallel building must be enabled by hand when using 
> msbuild. For devenv, the setting from the IDE is used.
>
> HS
> ============
>
> The final hurdle Im hitting.  When ctest is run, on windows I get the 
> complaint that the configuration is not set.
>
> Is there any way to set the -C option to ctest?
>
> Scott
> --
>
> 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
-- 

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 via email to