[CMake] Question about dependencies for install (FILES...)
Christoph Cullmann
cullmann at absint.com
Sat Jan 16 13:54:50 EST 2010
Hi,
I try to install a flex generated file: (lex.loopmap_.cpp)
CMakeLists.txt excerpt:
set (cfg_cfiles_install
files
conmap.cpp
loopmap.cpp
regmap.cpp
mapping.cpp
lex.loopmap_.cpp
paggdl.cpp
scc.cpp
sort.cpp
sort_exp.cpp
)
# install some source files
install(FILES ${cfg_cfiles_install} DESTINATION ${CFGDIR_C})
# targets to refresh the scanner
ADD_CUSTOM_COMMAND(
OUTPUT "lex.loopmap_.cpp"
COMMAND flex ARGS -8 -Ploopmap_ -olex.loopmap_.cpp map.lex
DEPENDS "map.lex"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
But CMake doesn't call flex and fails at install.
How do I tell it the dependency to generate the file on demand if not there or
the .lex was changed?
Greetings
Christoph
--
-------------------------------------- Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH Email: cullmann at AbsInt.com
Science Park 1 Tel: +49-681-38360-22
66123 Saarbrücken Fax: +49-681-38360-20
GERMANY WWW: http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
More information about the CMake
mailing list