diff options
author | Brad King <brad.king@kitware.com> | 2014-03-06 19:31:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-24 15:37:20 (GMT) |
commit | dc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76 (patch) | |
tree | a2639cb395d5075d879b73b35250dcd7d9305a39 /test/CMakeLists.txt | |
parent | 5587f403b1555fa71ea88130852eb6e84df50368 (diff) | |
download | CastXML-dc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76.zip CastXML-dc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76.tar.gz CastXML-dc4d4e2dcdbf6464c864d7fa49e2da3a04cd3e76.tar.bz2 |
test: Add infrastructure for C-mode tests
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 18 |
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) |