[firewalld-recode] master: Compile Rich Language sources (cee176d)
by mildew@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/firewalld-recode.git
On branch : master
>---------------------------------------------------------------
commit cee176ddc6b8c4551beecbf1518a8c7c5268b4a3
Author: Daniel Kopecek <dkopecek(a)redhat.com>
Date: Wed Nov 12 08:20:34 2014 +0100
Compile Rich Language sources
>---------------------------------------------------------------
CMakeLists.txt | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9233894..2c6f93a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,8 @@ pkg_check_modules(EXPAT REQUIRED expat)
include_directories(${GLIBMM_INCLUDE_DIRS})
include_directories(${GIOMM_INCLUDE_DIRS})
include_directories(${EXPAT_INCLUDE_DIRS})
+include_directories(${CMAKE_SOURCE_DIR}/src/)
+include_directories(${CMAKE_SOURCE_DIR}/src/ThirdParty/quex/quex-0.65.2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wformat=2 -pthread")
@@ -23,19 +25,24 @@ file(GLOB daemon_dbus_methods_SOURCES
"src/Daemon/DBus/zone/*.cpp")
file(GLOB daemon_SOURCES
- "src/Daemon/*.cpp"
- "src/Daemon/*.hpp"
+ "src/Daemon/[A-Z]*.cpp"
+ "src/Daemon/[A-Z]*.hpp"
"src/Daemon/Backends/*.[ch]pp"
"src/Daemon/Backends/Linux/*.cpp"
"src/Daemon/Backends/Linux/*.hpp"
"src/Daemon/Firewall/*.cpp"
- "src/Daemon/Firewall/*.hpp")
+ "src/Daemon/Firewall/*.hpp"
+ "src/Daemon/Firewall/RichRules/*.cpp"
+ "src/Daemon/Firewall/RichRules/*.hpp"
+ "src/Daemon/Firewall/RichLanguageParser/*.cpp"
+ "src/Daemon/Firewall/RichLanguageParser/*.hpp")
file(GLOB common_SOURCES
"src/Common/*.cpp"
"src/Common/*.hpp")
add_executable(firewalld
+ "src/Daemon/main.cpp"
${common_SOURCES}
${daemon_SOURCES}
${daemon_dbus_methods_SOURCES})
@@ -45,7 +52,6 @@ target_link_libraries(firewalld ${GLIBMM_LIBRARIES} ${GIOMM_LIBRARIES} ${EXPAT_L
#
# Compile helpers & Tests
#
-include_directories(${CMAKE_SOURCE_DIR}/src/)
add_executable(glib-vgsupp-helper glib-vgsupp-helper.cpp)
target_link_libraries(glib-vgsupp-helper ${GLIBMM_LIBRARIES} ${GIOMM_LIBRARIES})
@@ -90,6 +96,15 @@ add_executable(test_service_xml
target_link_libraries(test_service_xml ${GLIBMM_LIBRARIES} ${EXPAT_LIBRARIES})
+# Compile test: richrule
+add_executable(test_richrule
+ tests/richrule.cpp
+ ${common_SOURCES}
+ ${daemon_SOURCES}
+ ${daemon_dbus_methods_SOURCES})
+
+target_link_libraries(test_richrule ${GLIBMM_LIBRARIES} ${GIOMM_LIBRARIES} ${EXPAT_LIBRARIES})
+
include(CTest)
enable_testing()
set(CTEST_MEMORYCHECK_COMMAND valgrind)
@@ -101,3 +116,5 @@ add_test(NAME UNIT_SysctlCloseOnUnref COMMAND test_sysctl 1)
add_test(NAME UNIT_UtilityRunCommand COMMAND test_runcommand)
add_test(NAME UNIT_KernelModule COMMAND test_kernelmodule)
add_test(NAME UNIT_IPTables COMMAND test_iptables)
+
+add_test(NAME UNIT_RichRuleParser COMMAND test_richrule "foo")
\ No newline at end of file