SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -std=c++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
-SET(SOURCES
- parser.cc
- document.cc
- declaration.cc
- interface.cc
- type.cc
- parameter.cc
- element.cc
- structure.cc
- block.cc
- generator.cc
- cs_gen_base.cc
- cs_proxy_gen.cc
- cs_stub_gen.cc
- main.cc
-)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCES)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/cs_gen CS_GEN_SOURCES)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../)
SET(TILDC_deps ${FLEX_TIDLC_OUTPUTS})
-ADD_EXECUTABLE(tidlc ${BISON_TIDLC_OUTPUTS} ${FLEX_TIDLC_OUTPUTS} ${SOURCES})
+ADD_EXECUTABLE(tidlc
+ ${BISON_TIDLC_OUTPUTS}
+ ${FLEX_TIDLC_OUTPUTS}
+ ${CS_GEN_SOURCES}
+ ${SOURCES}
+ )
TARGET_LINK_LIBRARIES(tidlc ${LIBPKGS_LDFLAGS})
INSTALL(TARGETS tidlc DESTINATION bin)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/copyright.cb DESTINATION share/tidl)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cs_interop.cb DESTINATION share/tidl)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cs_proxy_interop.cb DESTINATION share/tidl)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cs_stub_interop.cb DESTINATION share/tidl)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/code_block/copyright.cb DESTINATION share/tidl/code_block)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/code_block/cs_interop.cb DESTINATION share/tidl/code_block)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/code_block/cs_proxy_interop.cb DESTINATION share/tidl/code_block)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/code_block/cs_stub_interop.cb DESTINATION share/tidl/code_block)
#include <vector>
-#include "idlc/cs_gen_base.h"
+#include "idlc/cs_gen/cs_gen_base.h"
namespace tidl {
* limitations under the License.
*/
-#ifndef IDLC_CS_GEN_BASE_H_
-#define IDLC_CS_GEN_BASE_H_
+#ifndef IDLC_CS_GEN_CS_GEN_BASE_H_
+#define IDLC_CS_GEN_CS_GEN_BASE_H_
#include <memory>
#include <string>
} // namespace tidl
-#endif // IDLC_CS_GEN_BASE_H_
+#endif // IDLC_CS_GEN_CS_GEN_BASE_H_
* limitations under the License.
*/
-#include "idlc/cs_proxy_gen.h"
+#include "idlc/cs_gen/cs_proxy_gen.h"
namespace tidl {
* limitations under the License.
*/
-#ifndef IDLC_CS_PROXY_GEN_H_
-#define IDLC_CS_PROXY_GEN_H_
+#ifndef IDLC_CS_GEN_CS_PROXY_GEN_H_
+#define IDLC_CS_GEN_CS_PROXY_GEN_H_
#include <memory>
#include <string>
-#include "idlc/cs_gen_base.h"
+#include "idlc/cs_gen/cs_gen_base.h"
namespace tidl {
} // namespace tidl
-#endif // IDLC_CS_PROXY_GEN_H_
+#endif // IDLC_CS_GEN_CS_PROXY_GEN_H_
* limitations under the License.
*/
-#include "idlc/cs_stub_gen.h"
+#include "idlc/cs_gen/cs_stub_gen.h"
namespace tidl {
* limitations under the License.
*/
-#ifndef IDLC_STUB_GEN_H_
-#define IDLC_STUB_GEN_H_
+#ifndef IDLC_CS_GEN_STUB_GEN_H_
+#define IDLC_CS_GEN_STUB_GEN_H_
#include <memory>
#include <string>
-#include "idlc/cs_gen_base.h"
+#include "idlc/cs_gen/cs_gen_base.h"
namespace tidl {
} // namespace tidl
-#endif // IDLC_STUB_GEN_H_
+#endif // IDLC_CS_GEN_STUB_GEN_H_
std::string line;
int cnt = 1;
- cb_file.open("/usr/share/tidl/" + filename);
+ cb_file.open("/usr/share/tidl/code_block/" + filename);
if (!cb_file.is_open()) {
- cb_file.open("../idlc/" + filename);
+ cb_file.open("../idlc/code_block/" + filename);
}
if (!cb_file.is_open())
#include <memory>
#include "idlc/parser.h"
-#include "idlc/cs_proxy_gen.h"
-#include "idlc/cs_stub_gen.h"
+#include "idlc/cs_gen/cs_proxy_gen.h"
+#include "idlc/cs_gen/cs_stub_gen.h"
namespace {
%license LICENSE
%manifest %{name}.manifest
%{_bindir}/tidlc
-%{_usr_share_dir}/tidl/*.cb
+%{_usr_share_dir}/tidl/*
%files tests
%manifest %{name}.manifest
../idlc/structure.cc
../idlc/block.cc
../idlc/generator.cc
- ../idlc/cs_gen_base.cc
- ../idlc/cs_proxy_gen.cc
- ../idlc/cs_stub_gen.cc
../idlc/parser.cc
)
-SET(UNIT_TESTS_SOURCES
- document_unittest.cc
- block_unittest.cc
- type_unittest.cc
- element_unittest.cc
- declaration_unittest.cc
- interface_unittest.cc
- structure_unittest.cc
- generator_unittest.cc
- cs_proxy_gen_unittest.cc
- cs_stub_gen_unittest.cc
- parser_unittest.cc
- main.cc
- )
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../idlc/cs_gen CS_GEN_SOURCES)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} UNIT_TESTS_SOURCES)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/cs_gen CS_GEN_UNIT_TESTS_SOURCES)
FLEX_TARGET(TIDLC
${CMAKE_CURRENT_SOURCE_DIR}/../idlc/tidlc.ll
${BISON_TIDLC_OUTPUTS}
${FLEX_TIDLC_OUTPUTS}
${TIDLC_SOURCES}
+ ${CS_GEN_SOURCES}
${UNIT_TESTS_SOURCES}
+ ${CS_GEN_UNIT_TESTS_SOURCES}
)
TARGET_LINK_LIBRARIES(tidl-unit-tests ${GTEST_LIBRARIES} pthread)
#include <iostream>
#include "idlc/parser.h"
-#include "idlc/cs_proxy_gen.h"
+#include "idlc/cs_gen/cs_proxy_gen.h"
class CsProxyGenTest : public testing::Test {
public:
#include <iostream>
#include "idlc/parser.h"
-#include "idlc/cs_stub_gen.h"
+#include "idlc/cs_gen/cs_stub_gen.h"
class CsStubGenTest : public testing::Test {
public: