On Thursday 12 February 2009 11:47:09 Bill O'Hara wrote: > Right now I have a legacy makefile which does the equivalent of > > gcc -c foo.c > g++ -o foo foo.o -lasdf -lqwer > > Because asdf and qwer are static libraries from c++ sources. > > Is there a straightforward way to do something like > > add_executable(foo foo.c) > target_link_libraries(foo asdf qwer) > > in this case and have g++ used for final compilation step? > > thanks > b.
Try this: set_target_properties(foo PROPERTIES LINKER_LANGAUGE CXX) Clint _______________________________________________ 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