From: Martin Quinson Date: Wed, 2 Mar 2016 12:44:36 +0000 (+0100) Subject: cunit: make it work (again) with C++ test suites X-Git-Tag: v3_13~576^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c9955f897b907c5b89a3b4252580aa33fd41c5df?ds=sidebyside cunit: make it work (again) with C++ test suites --- diff --git a/src/xbt/cunit.c b/src/xbt/cunit.c index b8353b4bb7..5235db6c9e 100644 --- a/src/xbt/cunit.c +++ b/src/xbt/cunit.c @@ -7,6 +7,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ /* This is partially inspirated from the OSSP ts (Test Suite Library) */ +/* At some point we should use https://github.com/google/googletest instead */ #include "src/portable.h" diff --git a/tools/cmake/UnitTesting.cmake b/tools/cmake/UnitTesting.cmake index 1417fef18a..fe83e00055 100644 --- a/tools/cmake/UnitTesting.cmake +++ b/tools/cmake/UnitTesting.cmake @@ -27,7 +27,8 @@ endif() foreach(file ${FILES_CONTAINING_UNITTESTS}) get_filename_component(basename ${file} NAME_WE) - set(EXTRACTED_TEST_SOURCE_FILES ${EXTRACTED_TEST_SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/src/${basename}_unit.c) + get_filename_component(ext ${file} EXT) + set(EXTRACTED_TEST_SOURCE_FILES ${EXTRACTED_TEST_SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/src/${basename}_unit${ext}) endforeach() set(EXTRACTED_TEST_SOURCE_FILES ${EXTRACTED_TEST_SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_units_main.c)