[CMake] Platform tests counts as errors.

Óscar Fuentes ofv at wanadoo.es
Mon Mar 21 22:17:04 EDT 2011


Consider this custom_command:

  add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt
    COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${FOO_SOURCE_DIR}
    WORKING_DIRECTORY ${CX_NATIVE_TG_DIR})

When it is executed from a Makefile-based generator, no
problem. However, when it is executed from the VS 2008 IDE, failed
platform tests are signaled as errors:

2>-- Looking for sys/dir.h
2>CheckIncludeFile.c
2>CheckIncludeFile.c(1) : fatal error C1083: Cannot open include file: 'sys/dir.h': No such file or directory
2>-- Looking for sys/dir.h - not found

At the end, the custom_command is signaled as failed by the IDE because
of those "errors".

First of all, why

2>CheckIncludeFile.c
2>CheckIncludeFile.c(1) : fatal error C1083: Cannot open include file: 'sys/dir.h': No such file or directory

is shown in the middle of the usual

2>-- Looking for sys/dir.h
2>-- Looking for sys/dir.h - not found

?

Second, what can I do so the IDE does not interpret failed platform
tests as errors?



More information about the CMake mailing list