[CMake] Platform tests counts as errors.

David Cole david.cole at kitware.com
Tue Mar 22 16:08:51 EDT 2011


We theorize that:
Visual Studio tools detect that they are running as a sub-process in a
Visual Studio environment and send their output to a named pipe
instead of stdout.

If anybody has a pointer to some conclusive proof regarding this
theory, feel free to send it along.


On Tue, Mar 22, 2011 at 3:45 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
> Hello David.
>
> David Cole <david.cole at kitware.com> writes:
>
>> Oh, one more thing... in order to activate that suppress output in VS
>> chunk of code, you have to turn on the logging feature of
>> ExternalProject.
>>
>> include(ExternalProject)
>> ExternalProject_Add(CxNativeTg
>>  SOURCE_DIR "${FOO_SOURCE_DIR}"
>>  CMAKE_ARGS
>>    -DCMAKE_BUILD_TYPE=Release
>>   LOG_CONFIGURE 1
>> )
>
> (The last line ought to be "LOG_CONFIGURE 0")
>
> Sadly, that macro does too much. I want to build a specific executable
> contained on a big project on a well-known place and be able to run it
> from the main build. ExternalProject wants to build and install the
> whole project. I tried to workaround that by setting BINARY_DIR,
> BUILD_COMMAND and INSTALL_COMMAND, but the macro ignored BINARY_DIR.
>
> The macro silences the errors coming from platform tests using
> execute_process and setting ERROR_VARIABLE. It is not possible to do
> that with custom_command, unless the command is a script that in turn
> uses execute_process.
>
> So why cmake with the VS IDE generator outputs the errors coming from
> platform tests when executed from a custom_command but not when executed
> from the console?
>
> Thanks.
>


More information about the CMake mailing list