aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/otherbinding/CMakeLists.txt15
-rw-r--r--tests/otherbinding/other-binding.xml.in23
-rw-r--r--tests/samplebinding/CMakeLists.txt15
-rw-r--r--tests/samplebinding/sample-binding.xml.in21
4 files changed, 55 insertions, 19 deletions
diff --git a/tests/otherbinding/CMakeLists.txt b/tests/otherbinding/CMakeLists.txt
index 9b14fae4e..e8b89eb5c 100644
--- a/tests/otherbinding/CMakeLists.txt
+++ b/tests/otherbinding/CMakeLists.txt
@@ -13,17 +13,14 @@ ${CMAKE_CURRENT_BINARY_DIR}/other/otherobjecttype_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/other/other_module_wrapper.cpp
)
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/other-binding.xml.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/other-binding.xml" @ONLY)
+
add_custom_command(OUTPUT ${other_SRC}
-COMMAND ${GENERATORRUNNER_BINARY}
- --generator-set=${generators_BINARY_DIR}/shiboken_generator${CMAKE_RELEASE_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}
- --enable-parent-ctor-heuristic
- ${CMAKE_CURRENT_SOURCE_DIR}/global.h
- --include-paths=${libother_SOURCE_DIR}${PATH_SEP}${libsample_SOURCE_DIR}${PATH_SEP}${libsample_SOURCE_DIR}/..
- --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${sample_SOURCE_DIR}
- --output-directory=${CMAKE_CURRENT_BINARY_DIR}
- ${other_TYPESYSTEM}
+COMMAND ${GENERATORRUNNER_BINARY} --project-file=${CMAKE_CURRENT_BINARY_DIR}/other-binding.xml
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-COMMENT "Running generator for test binding..."
+COMMENT "Running generator for 'other' test binding..."
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/tests/otherbinding/other-binding.xml.in b/tests/otherbinding/other-binding.xml.in
new file mode 100644
index 000000000..446049ac7
--- /dev/null
+++ b/tests/otherbinding/other-binding.xml.in
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<generator-project>
+ <generator-set generator="@generators_BINARY_DIR@/shiboken_generator@CMAKE_RELEASE_POSTFIX@@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@" />
+
+ <header-file location="@CMAKE_CURRENT_SOURCE_DIR@/global.h" />
+ <typesystem-file location="@other_TYPESYSTEM@" />
+
+ <output-directory location="@CMAKE_CURRENT_BINARY_DIR@" />
+
+ <include-paths>
+ <path location="@libother_SOURCE_DIR@" />
+ <path location="@libsample_SOURCE_DIR@" />
+ <path location="@libsample_SOURCE_DIR@/.." />
+ </include-paths>
+ <typesystem-paths>
+ <path location="@CMAKE_CURRENT_SOURCE_DIR@" />
+ <path location="@sample_SOURCE_DIR@" />
+ </typesystem-paths>
+
+ <enable-parent-ctor-heuristic />
+
+</generator-project>
+
diff --git a/tests/samplebinding/CMakeLists.txt b/tests/samplebinding/CMakeLists.txt
index 2c2623d6c..b0908d8c9 100644
--- a/tests/samplebinding/CMakeLists.txt
+++ b/tests/samplebinding/CMakeLists.txt
@@ -87,18 +87,13 @@ ${CMAKE_CURRENT_BINARY_DIR}/sample/voidholder_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/valueandvirtual_wrapper.cpp
)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sample-binding.xml.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/sample-binding.xml" @ONLY)
+
add_custom_command(OUTPUT ${sample_SRC}
-COMMAND ${GENERATORRUNNER_BINARY}
- --generator-set=${generators_BINARY_DIR}/shiboken_generator${CMAKE_RELEASE_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}
- --enable-parent-ctor-heuristic
- --use-isnull-as-nb_nonzero
- ${CMAKE_CURRENT_SOURCE_DIR}/global.h
- --include-paths=${libsample_SOURCE_DIR}
- --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR}
- --output-directory=${CMAKE_CURRENT_BINARY_DIR}
- ${sample_TYPESYSTEM}
+COMMAND ${GENERATORRUNNER_BINARY} --project-file=${CMAKE_CURRENT_BINARY_DIR}/sample-binding.xml
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-COMMENT "Running generator for test binding..."
+COMMENT "Running generator for 'sample' test binding..."
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/tests/samplebinding/sample-binding.xml.in b/tests/samplebinding/sample-binding.xml.in
new file mode 100644
index 000000000..207821c99
--- /dev/null
+++ b/tests/samplebinding/sample-binding.xml.in
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<generator-project>
+ <generator-set generator="@generators_BINARY_DIR@/shiboken_generator@CMAKE_RELEASE_POSTFIX@@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@" />
+
+ <header-file location="@CMAKE_CURRENT_SOURCE_DIR@/global.h" />
+ <typesystem-file location="@sample_TYPESYSTEM@" />
+
+ <output-directory location="@CMAKE_CURRENT_BINARY_DIR@" />
+
+ <include-paths>
+ <path location="@libsample_SOURCE_DIR@" />
+ </include-paths>
+ <typesystem-paths>
+ <path location="@CMAKE_CURRENT_SOURCE_DIR@" />
+ </typesystem-paths>
+
+ <enable-parent-ctor-heuristic />
+ <use-isnull-as-nb_nonzero />
+
+</generator-project>
+