summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-27 18:21:45 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-27 18:21:45 (GMT)
commit7279ab2caf72b68126bf0c1d7e62c7d89024f9a0 (patch)
tree03d4108e944e2abbc0848750e4210c5b85dd87bc
parentd4a78a99b6dfef5413ae4e969f3865f3b6f1a45d (diff)
downloaduscxml-7279ab2caf72b68126bf0c1d7e62c7d89024f9a0.zip
uscxml-7279ab2caf72b68126bf0c1d7e62c7d89024f9a0.tar.gz
uscxml-7279ab2caf72b68126bf0c1d7e62c7d89024f9a0.tar.bz2
Support for php extensions in debug mode
-rw-r--r--contrib/cmake/FindPHP5.cmake6
-rw-r--r--src/bindings/swig/php/CMakeLists.txt11
2 files changed, 14 insertions, 3 deletions
diff --git a/contrib/cmake/FindPHP5.cmake b/contrib/cmake/FindPHP5.cmake
index 68e0f68..d449112 100644
--- a/contrib/cmake/FindPHP5.cmake
+++ b/contrib/cmake/FindPHP5.cmake
@@ -38,6 +38,12 @@ if (UNIX)
if (PHP_CONFIGURE_OPTIONS MATCHES ".*enable-maintainer-zts.*")
set(PHP_ZTS_ENABLED ON)
endif()
+
+ set(PHP_DEBUG_ENABLED OFF)
+ if (PHP_CONFIGURE_OPTIONS MATCHES ".*enable-debug.*")
+ set(PHP_DEBUG_ENABLED ON)
+ endif()
+
endif()
else()
message(STATUS "Finding PHP5 on Windows is not supported")
diff --git a/src/bindings/swig/php/CMakeLists.txt b/src/bindings/swig/php/CMakeLists.txt
index 91c6c36..1ef54e7 100644
--- a/src/bindings/swig/php/CMakeLists.txt
+++ b/src/bindings/swig/php/CMakeLists.txt
@@ -73,12 +73,17 @@ if (APPLE)
set_target_properties(uscxmlNativePHP PROPERTIES LINK_FLAGS ${PHP_MODULE_CXX_FLAGS})
endif()
+set(PHP_COMPILE_FLAGS "-DSWIG")
+
if (PHP_ZTS_ENABLED)
# we are only building php bindings for unices anyhow
- set_target_properties(uscxmlNativePHP PROPERTIES COMPILE_FLAGS "-DZTS -DPTHREADS -DSWIG")
-else()
- set_target_properties(uscxmlNativePHP PROPERTIES COMPILE_FLAGS "-DSWIG")
+ set(PHP_COMPILE_FLAGS "${PHP_COMPILE_FLAGS} -DZTS")
+ set(PHP_COMPILE_FLAGS "${PHP_COMPILE_FLAGS} -DPTHREADS")
+endif()
+if (PHP_DEBUG_ENABLED)
+ set(PHP_COMPILE_FLAGS "${PHP_COMPILE_FLAGS} -DZEND_DEBUG")
endif()
+set_target_properties(uscxmlNativePHP PROPERTIES COMPILE_FLAGS ${PHP_COMPILE_FLAGS})
set_target_properties(uscxmlNativePHP PROPERTIES FOLDER "Bindings")