summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-06 19:31:14 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-24 15:37:20 (GMT)
commitdc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76 (patch)
treea2639cb395d5075d879b73b35250dcd7d9305a39
parent5587f403b1555fa71ea88130852eb6e84df50368 (diff)
downloadCastXML-dc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76.zip
CastXML-dc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76.tar.gz
CastXML-dc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76.tar.bz2
test: Add infrastructure for C-mode tests
-rw-r--r--test/CMakeLists.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 42abd2c..e1b3c12 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -27,23 +27,31 @@ macro(castxml_test_cmd test)
)
endmacro()
-macro(castxml_test_gccxml test)
+macro(castxml_test_gccxml_common prefix ext std test)
set(command $<TARGET_FILE:castxml>
--castxml-gccxml --castxml-start start
- -std=c++98
- ${CMAKE_CURRENT_LIST_DIR}/input/${test}.cxx
+ ${std}
+ ${CMAKE_CURRENT_LIST_DIR}/input/${test}.${ext}
)
add_test(
- NAME gccxml.${test}
+ NAME ${prefix}.${test}
COMMAND ${CMAKE_COMMAND}
"-Dcommand:STRING=${command}"
- "-Dtest=gccxml.${test}"
+ "-Dtest=${prefix}.${test}"
"-Dxml=${test}.xml"
"-Dxmllint=${LIBXML2_XMLLINT_EXECUTABLE}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/run.cmake
)
endmacro()
+macro(castxml_test_gccxml test)
+ castxml_test_gccxml_common(gccxml cxx -std=c++98 ${test})
+endmacro()
+
+macro(castxml_test_gccxml_c test)
+ castxml_test_gccxml_common(gccxml.c c -std=c89 ${test})
+endmacro()
+
set(empty_c ${CMAKE_CURRENT_LIST_DIR}/input/empty.c)
set(empty_cxx ${CMAKE_CURRENT_LIST_DIR}/input/empty.cxx)
set(empty_m ${CMAKE_CURRENT_LIST_DIR}/input/empty.m)