-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Need suport in writing a cmake module for custom type idl
In the moment I am struggling with the creation of the MPC custom_type “idl_files” that is defined in our MPC Project in the following way:
a) MPC Definition of the custom type:
// Set the idl compiler and flags as template values
specific {
tao_idl = $(ACE_ROOT)/bin/vc14/tao_idl.exe
tao_idl_dep = $(ACE_ROOT)/bin/vc14/tao_idl.exe
tao_idlflags = -Wb,pre_include=ace/pre.h \
-Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(TAO_ROOT)/tao -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT)/orbsvcs/orbsvcs
}
Define_Custom(IDL) {
automatic = 1
dependent = $(TAO_IDL_DEP)
command = $(TAO_IDL)
inputext = .idl
source_pre_extension = C, S
header_pre_extension = C, S
inline_pre_extension = C, S
source_outputext = .cpp, .cxx, .cc, .C
header_outputext = .h, .hpp, .hxx, .hh
inline_outputext = .i, .inl
keyword idlflags = commandflags
optional(source_pre_extension) {
commandflags(-GA) += A
}
optional(template_outputext) {
//commandflags(!-Sc) += S_T.cpp, S_T.cxx, S_T.cc, S_T.C
}
optional(header_pre_extension) {
//commandflags(!-Sc) += S_T
}
optional(inline_pre_extension) {
//commandflags(!-Sc) += S_T
}
}
after += TAO_IDL_EXE
idlflags += $(TAO_IDLFLAGS)
b) Use of the custom_type in the example project occi_server_registry_service.mpc:
idl_files {
gendir = ../../source/generated
idlflags += -o ../../source/generated
../../source/occi_server_registry.idl
}
c) CMakeList.txt Output from MPC (the include file “idl_files” has to be generated and is not existent in the moment):
include(idl_files OPTIONAL)
IDL_FILES_TARGET_SOURCES(
${PROJECT_TARGET_OCCI_SERVER_REGISTRY_SERVICE} PUBLIC ../../source/occi_server_registry.idl
IDL_FILES_OPTIONS -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO/tao -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO/orbsvcs -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO/orbsvcs/orbsvcs -Sp -o ../../source/generated)
d) Cmake should build the following make rule in the gnu makefile:
.NOTPARALLEL:
../../source/generated/occi_server_registryC.cpp ../../source/generated/occi_server_registryS.cpp ../../source/generated/occi_server_registryC.h ../../source/generated/occi_server_registryS.h ../../source/generated/occi_server_registryC.i ../../source/generated/occi_server_registryS.i: ../../source/occi_server_registry.idl C:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/bin/vc14/tao_idl.exe
@$(TESTDIRSTART) "../../source/generated" $(TESTDIREND) $(MKDIR) "../../source/generated"
C:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/bin/vc14/tao_idl.exe -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO/tao -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO/orbsvcs -IC:/Projekte/Git/SWC-CP-OCCI/HG/TAO_vob/TAO2_Release/release/TAO/orbsvcs/orbsvcs -Sp -o ../../source/generated ../../source/occi_server_registry.idl
Would be great if you could support us in hints to write a MPC custom command that produces a cmake include file “idl_files”.
I generated a perl module with chat gpt but have no idea how to add this to my codebase nor including it into the cmake template.
Help would be highly welcome.
Markus