Hi Sébastien,

>  > ---8<---
>  > project(coolcoding)
>  >
>  > # generate coolcoding's static lexer
>  > set(COOLCODING_BAR_HPP
> ${PROJECT_BINARY_DIR}/include/foo/io/coolcoding/coolcoding_bar.hpp)
>  >
>  > add_executable(generate_coolcoding_bar generate_coolcoding_bar.cpp)
>  >
>  > add_custom_command(
>  >    OUTPUT  ${COOLCODING_BAR_HPP}
>  >    COMMAND generate_coolcoding_bar ${COOLCODING_BAR_HPP}
>  >    )
>
> You might want to add
>
> DEPENDS generate_coolcoding_bar
>
> to this command.
>

IMO the DEPENDS is only useful if you have an input file dependency, which isn't here the case.

file(MAKE_DIRECTORY ${directory})

did help, but is verbose since I use set(DIR ...) and set(HPP ${DIR}/...). It would be nice if cmake would know that there is a directory to create....

Thanks,
Olaf


--

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

Reply via email to