Adding support for exec enum generation using CMake custom command. anywhere
authorStephane Lenclud <tortoisehg@lenclud.com>
Mon, 04 Jan 2010 15:50:35 +0100
branchanywhere
changeset 21 af091391d962
parent 20 d63d727ee0a6
child 22 5c5219488d00
Adding support for exec enum generation using CMake custom command.
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
+ 	)