On 29. Jul, 2010, at 10:18 , Ingolf Steinbach wrote:

> 2010/7/29 Michael Wild <them...@gmail.com>:
>> Where is the main() function? In B?
> 
> Yes, it would be in B.
> 
>> Perhaps it would be a good idea to not compile it into B, but use the file 
>> containing main() as the "required file" instead.
> 
> This approach works around the current limitation. But I'd still
> consider it suboptimal: for instance, the suite of unit tests for the
> product would now require 6 (more or less identical) unit tests (for
> each of the main() functions) rather than only one.
> 
> Kind regards
> Ingolf

Then just create an empty dummy file using e.g. file(WRITE 
${CMAKE_BINARY_DIR}/dummy.c ""). It is fast and doesn't hurt too much. Most 
importantly it doesn't pollute your source tree.


Michael


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

Reply via email to