diff options
author | Michael Dickens <michael.dickens@ettus.com> | 2017-08-16 14:15:13 -0400 |
---|---|---|
committer | Michael Dickens <michael.dickens@ettus.com> | 2017-08-16 14:15:13 -0400 |
commit | 6bc3586de167572962e0989e960c1c67de804383 (patch) | |
tree | 2a92c3d1bf750c02d2f5ab6dcb8a8b48c6c2689f /cmake | |
parent | 1db4890b85375a0b9cff035c4bff3580282f7ad1 (diff) | |
parent | e286742f64981636019cc2cfbead2e510e5ce585 (diff) |
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.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/FindCppUnit.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
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() |