From 296be93db3396bef243c4a6dd54061de07f36079 Mon Sep 17 00:00:00 2001 From: Michael Dickens <michael.dickens@ettus.com> Date: Mon, 14 Aug 2017 15:17:49 -0400 Subject: cmake: Fix for CppUnit and C++11 If CppUnit version >= 1.14.0, try to switch to C++11. Otherwise, use C++98 as before. Requires that FindCppUnit return the CppUnit version if found. --- cmake/Modules/FindCppUnit.cmake | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindCppUnit.cmake b/cmake/Modules/FindCppUnit.cmake index f93ade3412..4e9469f9f6 100644 --- a/cmake/Modules/FindCppUnit.cmake +++ b/cmake/Modules/FindCppUnit.cmake @@ -37,3 +37,10 @@ LIST(APPEND CPPUNIT_LIBRARIES ${CMAKE_DL_LIBS}) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) MARK_AS_ADVANCED(CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) + + +# set version to be useable by calling script + +IF(CPPUNIT_FOUND) + set(CPPUNIT_VERSION ${PC_CPPUNIT_VERSION} CACHE INTERNAL "CppUnit Version" FORCE) +ENDIF() -- cgit v1.2.3