[CMake] object file target

Juan Sanchez Juan.Sanchez at amd.com
Mon Jul 30 16:24:27 EDT 2007


Is there a command for creating a .o target on Linux?  If I create my
own custom command for creating an object, the .o file is being
recompiled every time.  I need the dependency scanner to recognize when
a .cc file does not need to be compiled into a .o file.

This is what I have right now.  Every time I type make, the object file
gets recreated.

  ADD_CUSTOM_COMMAND(
    OUTPUT  ${PSTUFF}.o
    DEPENDS ${PSTUFF}.cc
    COMMAND ${CMAKE_CXX_COMPILER}
    ARGS ${MYFLAGS}
  )


Thanks,

Juan


-- 
Juan Sanchez
Juan.Sanchez at amd.com
800-538-8450 Ext. 54395
512-602-4395




More information about the CMake mailing list