Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
AlexeyGamov
committed
Jan 13, 2017
1 parent
70c1ef0
commit ea8428c
Showing
10 changed files
with
143 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
client/client-multi/client-cpp/Modules/AvroStructGenerator.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,65 @@ | |||
# | |||
# Copyright 2014-2016 CyberVision, Inc. | |||
# | |||
# Licensed under the Apache License, Version 2.0 (the "License"); | |||
# you may not use this file except in compliance with the License. | |||
# You may obtain a copy of the License at | |||
# | |||
# http://www.apache.org/licenses/LICENSE-2.0 | |||
# | |||
# Unless required by applicable law or agreed to in writing, software | |||
# distributed under the License is distributed on an "AS IS" BASIS, | |||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
# | |||
# This file is generated by CppEventSourcesGenerator.java | |||
# from client-cpp/templates/event/AvroStructGenerator.cmake.template | |||
|
|||
find_program(avrogen avrogencpp) | |||
|
|||
if (${avrogen} STREQUAL "avrogen-NOTFOUND") | |||
message(FATAL_ERROR "avrogen is NOT found") | |||
else() | |||
message("Generating necessary files according to Avro schemas") | |||
endif() | |||
|
|||
if (WIN32) | |||
set(directory_separator "\\") | |||
else() | |||
set(directory_separator "/") | |||
endif() | |||
|
|||
set(avro_schemas ${CMAKE_CURRENT_SOURCE_DIR}${directory_separator}avro${directory_separator}) | |||
set(kaa_headers ${CMAKE_CURRENT_SOURCE_DIR}${directory_separator}kaa${directory_separator}) | |||
|
|||
file(MAKE_DIRECTORY ${avro_schemas}event ${kaa_headers}gen) | |||
|
|||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}endpoint.avsc | |||
-o ${kaa_headers}gen${directory_separator}EndpointGen.hpp | |||
-n kaa) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}profile.avsc | |||
-o ${kaa_headers}profile${directory_separator}gen${directory_separator}ProfileGen.hpp | |||
-n kaa_profile) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}notification.avsc | |||
-o ${kaa_headers}notification${directory_separator}gen${directory_separator}NotificationGen.hpp | |||
-n kaa_notification) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}log.avsc | |||
-o ${kaa_headers}log${directory_separator}gen${directory_separator}LogGen.hpp -n kaa_log) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}configuration.avsc | |||
-o ${kaa_headers}configuration${directory_separator}gen${directory_separator}ConfigurationGen.hpp | |||
-n kaa_configuration) | |||
|
|||
set(event_family_classes "") | |||
|
|||
foreach(family ${event_family_classes}) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}event${directory_separator}${family}.avsc | |||
-o ${kaa_headers}event${directory_separator}gen${directory_separator}${family}Gen.hpp | |||
-n ns${family}) | |||
endforeach(family) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
client/client-multi/client-cpp/templates/event/AvroStructGenerator.cmake.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,66 @@ | |||
# | |||
# Copyright 2014-2016 CyberVision, Inc. | |||
# | |||
# Licensed under the Apache License, Version 2.0 (the "License"); | |||
# you may not use this file except in compliance with the License. | |||
# You may obtain a copy of the License at | |||
# | |||
# http://www.apache.org/licenses/LICENSE-2.0 | |||
# | |||
# Unless required by applicable law or agreed to in writing, software | |||
# distributed under the License is distributed on an "AS IS" BASIS, | |||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
# | |||
# This file is generated by CppEventSourcesGenerator.java | |||
# from client-cpp/templates/event/AvroStructGenerator.cmake.template | |||
|
|||
find_program(avrogen avrogencpp) | |||
|
|||
if (${avrogen} STREQUAL "avrogen-NOTFOUND") | |||
message(FATAL_ERROR "avrogen is NOT found") | |||
else() | |||
message("Generating necessary files according to Avro schemas") | |||
endif() | |||
|
|||
if (WIN32) | |||
set(directory_separator "\\") | |||
else() | |||
set(directory_separator "/") | |||
endif() | |||
|
|||
set(avro_schemas ${CMAKE_CURRENT_SOURCE_DIR}${directory_separator}avro${directory_separator}) | |||
set(kaa_headers ${CMAKE_CURRENT_SOURCE_DIR}${directory_separator}kaa${directory_separator}) | |||
|
|||
file(MAKE_DIRECTORY ${avro_schemas}event ${kaa_headers}gen) | |||
|
|||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}endpoint.avsc | |||
-o ${kaa_headers}gen${directory_separator}EndpointGen.hpp | |||
-n kaa) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}profile.avsc | |||
-o ${kaa_headers}profile${directory_separator}gen${directory_separator}ProfileGen.hpp | |||
-n kaa_profile) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}notification.avsc | |||
-o ${kaa_headers}notification${directory_separator}gen${directory_separator}NotificationGen.hpp | |||
-n kaa_notification) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}log.avsc | |||
-o ${kaa_headers}log${directory_separator}gen${directory_separator}LogGen.hpp -n kaa_log) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}configuration.avsc | |||
-o ${kaa_headers}configuration${directory_separator}gen${directory_separator}ConfigurationGen.hpp | |||
-n kaa_configuration) | |||
|
|||
# [event_family_class_list] is substituted with a real list of event families during sdk generation. | |||
set(event_family_classes [event_family_class_list]) | |||
|
|||
foreach(family ${event_family_classes}) | |||
execute_process(COMMAND ${avrogen} | |||
-i ${avro_schemas}event${directory_separator}${family}.avsc | |||
-o ${kaa_headers}event${directory_separator}gen${directory_separator}${family}Gen.hpp | |||
-n ns${family}) | |||
endforeach(family) |
39 changes: 0 additions & 39 deletions
39
client/client-multi/client-cpp/templates/event/avrogen.bat_template
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
client/client-multi/client-cpp/templates/event/avrogen.sh_template
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.