From c9955f897b907c5b89a3b4252580aa33fd41c5df Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 2 Mar 2016 13:44:36 +0100 Subject: [PATCH] cunit: make it work (again) with C++ test suites --- src/xbt/cunit.c | 1 + tools/cmake/UnitTesting.cmake | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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) -- 2.20.1