Skip to content
Snippets Groups Projects
Commit 2a2ebf94 authored by cnowke's avatar cnowke
Browse files

event includes are now auto-generated

parent e1dc6586
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ endmacro() ...@@ -17,7 +17,7 @@ endmacro()
macro ( generate_specializations ) macro ( generate_specializations )
unset ( _EVENT_NAMES )
foreach ( entry ${EVENT_NAME_LIST} ) foreach ( entry ${EVENT_NAME_LIST} )
set (_EVENT_NAMES "${_EVENT_NAMES}\nSPECIALIZE_MESSAGE_TYPE( ${entry} )" ) set (_EVENT_NAMES "${_EVENT_NAMES}\nSPECIALIZE_MESSAGE_TYPE( ${entry} )" )
endforeach() endforeach()
...@@ -26,6 +26,22 @@ macro ( generate_specializations ) ...@@ -26,6 +26,22 @@ macro ( generate_specializations )
src/nett-python/specializations_template.h src/nett-python/specializations_template.h
specializations.h specializations.h
@ONLY ) @ONLY )
message ( "successfully generated python_slot specializations" ) message ( "successfully generated python_slot specializations" )
endmacro()
macro ( generate_includes )
unset ( _EVENT_NAMES )
foreach ( entry ${EVENT_NAME_LIST} )
set (_EVENT_NAMES "${_EVENT_NAMES}\n#include <../schema/${entry}.pb.h>" )
endforeach()
configure_file(
src/nett-python/includes_template.h
includes.h
@ONLY )
message ( "successfully generated event includes" )
endmacro() endmacro()
\ No newline at end of file
...@@ -54,6 +54,7 @@ add_event ( nett_python map_string_float_vector_message ${NETT_SCHEMA_DIR} ${PRO ...@@ -54,6 +54,7 @@ add_event ( nett_python map_string_float_vector_message ${NETT_SCHEMA_DIR} ${PRO
add_event ( nett_python population_connectivity_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} ) add_event ( nett_python population_connectivity_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} )
add_event ( nett_python area_populations_connectivity_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} ) add_event ( nett_python area_populations_connectivity_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} )
add_event ( nett_python areas_populations_connectivity_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} ) add_event ( nett_python areas_populations_connectivity_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} )
add_event ( nett_python tick_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} )
add_library (nett_python SHARED ${ProjectSources} ${nett_python_EVENT_SOURCE_FILES}) add_library (nett_python SHARED ${ProjectSources} ${nett_python_EVENT_SOURCE_FILES})
...@@ -84,3 +85,4 @@ add_custom_command( TARGET nett_python ...@@ -84,3 +85,4 @@ add_custom_command( TARGET nett_python
endif() endif()
generate_specializations() generate_specializations()
generate_includes()
@_EVENT_NAMES@
...@@ -8,20 +8,9 @@ ...@@ -8,20 +8,9 @@
#include <nett/nett.h> #include <nett/nett.h>
#include <memory> #include <memory>
#undef min //oh dear Microsoft: whoever defined min as a macro should be seriously ...
#include <../schema/string_message.pb.h> #include <includes.h> //include auto-generated header for all events
#include <../schema/float_message.pb.h>
#include <../schema/string_vector_message.pb.h>
#include <../schema/float_vector_message.pb.h>
#include <../schema/hierarchy_message.pb.h>
#include <../schema/population_rates_message.pb.h>
#include <../schema/flux_message.pb.h>
#include <../schema/connectivity_message.pb.h>
#include <../schema/map_string_float_vector_message.pb.h>
#include <../schema/population_connectivity_message.pb.h>
#include <../schema/area_populations_connectivity_message.pb.h>
#include <../schema/areas_populations_connectivity_message.pb.h>
using namespace boost::python; using namespace boost::python;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment