[CMake] How to structure compilation command line

Alain-Serge Nagni alainsergenagni at yahoo.com
Tue Jun 28 07:54:53 EDT 2005


Hello,
 I would like to know if it's possible to modify the
structure of the instruction for compiling and linking
generated by cmake. To make it more clear, here is an
example:

I have a simple project with one single file: main.cpp

I run ccmake from the command line and added this
instruction to CMAKE_CXX_FLAGS:
`GraphicsMagick++-config --cppflags --cxxflags
--ldflags --libs`

when I do make I will have this:

Building executable
/home/toto/Tests/magicgraphic3/magicgraphic3...
c++      `GraphicsMagick++-config --cppflags
--cxxflags --ldflags --libs` -fPIC  main.o    -o
/home/asnagni/Tests/magicgraphic3/magicgraphic3
-rdynamic



I would like to have this:
/home/toto/Tests/magicgraphic3/magicgraphic3...
c++      -fPIC  main.o    -o
/home/asnagni/Tests/magicgraphic3/magicgraphic3
-rdynamic `GraphicsMagick++-config --cppflags
--cxxflags --ldflags --libs`



What I'm looking for is a way to force
`GraphicsMagick++-config --cppflags --cxxflags
--ldflags --libs` to be at the end of the instruction.


Can this be done with the parameters provided by
ccmake instead of doing it the generated make file?



Best regards,
Alain-serge


		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com


More information about the CMake mailing list