# HG changeset patch # User Stephane Lenclud # Date 1262616635 -3600 # Node ID af091391d9620cae4738143c13a50b1a4fffee5f # Parent d63d727ee0a6a6fc9374c22f5e5ef0a9859e0dce Adding support for exec enum generation using CMake custom command. diff -r d63d727ee0a6 -r af091391d962 kernel/eka/CMakeLists.txt --- a/kernel/eka/CMakeLists.txt Mon Jan 04 12:25:19 2010 +0100 +++ b/kernel/eka/CMakeLists.txt Mon Jan 04 15:50:35 2010 +0100 @@ -101,7 +101,7 @@ target_link_libraries(epoc estub euser) - + @@ -110,5 +110,14 @@ source_group(Sources REGULAR_EXPRESSION ".+\\.cpp$") source_group(Includes REGULAR_EXPRESSION ".+\\.h$") -#TODO: generate the exec enum +#Generate the exec enum using CMAKE custom command #perl genexec.pl -i execs.txt -e ../include/exec_enum.h -u ../include/exec_user.h -k ../include/exec_kernel.h + +add_custom_command ( + TARGET euser + PRE_BUILD + COMMAND perl ./kernel/genexec.pl -i ./kernel/execs.txt -e ./include/exec_enum.h -u ./include/exec_user.h -k ./include/exec_kernel.h + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Generating exec headers..." + VERBATIM + )