[CMake] Dependency not executed, why?
Eric Noulard
eric.noulard at gmail.com
Fri Nov 19 02:42:54 EST 2010
2010/11/19 Thomas Lehmann <t.lehmann at rtsgroup.net>
>
> Hi,
>
>
>
> I’ve found an example to use bison and flex in cmake.
>
> I have a static library where I want to add the generated
>
> sources but the dependencies are not triggered. Why?
>
>
>
> project(test)
>
>
>
> include_directories(.
>
> ${CMAKE_BINARY_DIR}/libs/test)
>
>
>
> add_custom_target(ScannerAndParser echo "Creating scanner.cxx and parser.cxx")
>
>
>
> add_custom_command(
>
> SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/scanner.l
>
> COMMAND flex
>
> ARGS -o ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx
>
> ${CMAKE_CURRENT_SOURCE_DIR}/scanner.l
>
> TARGET ScannerAndParser
>
> DEPENDS ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx
>
> OUTPUTS ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx)
OUTPUTS (with 'S') should be OUTPUT (without 'S')
I don't know the SOURCE option ?
Which version of CMake do you use?
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list