[CMake] Multiple executables per project?

2012-10-28 Thread Rui Maciel
I'm developing a software package which consists of a GUI application 
and a command line program.  Both programs share common libraries, and 
essentially they only differ in which UI components each program uses.


I would like to use CMake to handle the build project of this package, 
but as I never used CMake to pull this off I don't even know if it is 
possible.  So, does anyone have any experience using CMake to set a 
project with multiple executables sharing commong libraries?  If it is 
possible what's the best way to pull this off?



Thanks in advance,
Rui Maciel
--

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


Re: [CMake] A way to set default compiler, etc.?

2012-09-20 Thread Rui Maciel

On 09/20/2012 02:10 PM, Dave Abrahams wrote:

When I invoke cmake for the first time in a project, I normally use

  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

I'm tired of typing that every time I blow away my CMakeCache.txt.  Is
there a place I can register these preferences so I don't have to?


Have you tried adding CMAKE_FORCE_C_COMPILER() AND 
CMAKE_FORCE_CXX_COMPILER() macros to your CMakeLists.txt ?


http://www.cmake.org/cmake/help/v2.8.8/cmake.html#module:CMakeForceCompiler


Hope this helps,
Rui Maciel
--

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


[CMake] Check if a command exists?

2012-09-03 Thread Rui Maciel
I have a small project which includes a couple of parsers whose lexers 
are generated by re2c.  I intended to set cmake so that it could check 
if re2c is present in the system, but after browsing through the docs 
I've ended up empty-handed.


So, is there a way to set a cmake project so that it checks if a 
tool/program/command is present in the build system?  If there is a way 
to run that check, can anyone provide an example?



Thanks in advance,
Rui Maciel
--

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