[CMake] add_custom_command and CONFIG-dependent output

Braden McDaniel braden at endoframe.com
Fri Aug 22 16:29:51 EDT 2014


I'm trying to do this:

     set(LIB_STAGEDIR "${STAGEDIR}/lib/$<CONFIG>")
     add_custom_command(
         OUTPUT ${LIB_STAGEDIR}
         COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_STAGEDIR}
     )

…and CMake complains thusly:

   add_custom_command called with OUTPUT containing a "<".  This 
character is
   not allowed.

Is there some way to specify OUTPUT when it is dependent on the value 
of $<CONFIG> or similar?

-- 
Braden McDaniel
<braden at endoframe.com>



More information about the CMake mailing list