discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] cmake error if cppunit not installed


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] cmake error if cppunit not installed
Date: Fri, 13 Jul 2012 08:15:14 -0400

On Fri, Jul 13, 2012 at 5:06 AM, Alexandru Csete <address@hidden> wrote:
> Greetings,
>
> Trying to run cmake on a Linux Mint 13 installation that doesn't have
> cppunit leads to what looks like an unintentional error message:
>
> -- Configuring gr-filter support...
> --   Dependency ENABLE_GRUEL = ON
> --   Dependency ENABLE_VOLK = ON
> --   Dependency Boost_FOUND = TRUE
> --   Dependency ENABLE_GR_CORE = ON
> --   Dependency ENABLE_GR_FFT = ON
> --   Enabling gr-filter support.
> --   Override with -DENABLE_GR_FILTER=ON/OFF
> CMake Error at gr-filter/lib/CMakeLists.txt:178 (GR_ADD_TEST):
>   Unknown CMake command "GR_ADD_TEST".
>
>
> CMake Error: The following variables are used in this project, but
> they are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the
> CMake files:
> CPPUNIT_INCLUDE_DIRS (ADVANCED)
>    used as include directory in directory
> /home/alc/gnuradio/src/gnuradio.git/gr-filter/lib
> CPPUNIT_LIBRARIES (ADVANCED)
>     linked by target "test-gr-filter" in directory
> /home/alc/gnuradio/src/gnuradio.git/gr-filter/lib
>
> -- Configuring incomplete, errors occurred!
>
>
> With cppunit installed everything is fine.
>
> Alex

Alright, thanks. That should be easy to fix. Try this:

diff --git a/gr-filter/lib/CMakeLists.txt b/gr-filter/lib/CMakeLists.txt
index 73d7d7b..46e7ee1 100644
--- a/gr-filter/lib/CMakeLists.txt
+++ b/gr-filter/lib/CMakeLists.txt
@@ -157,6 +157,8 @@ add_dependencies(gnuradio-filter gnuradio-fft
filter_generated_includes filter_g
 ########################################################################
 # QA C++ Code for gr-filter
 ########################################################################
+if(ENABLE_TESTING)
+include(GrTest)
 list(APPEND test_gr_filter_sources
     ${CMAKE_CURRENT_SOURCE_DIR}/test_gr_filter.cc
     ${CMAKE_CURRENT_SOURCE_DIR}/qa_filter.cc
@@ -176,3 +178,4 @@ target_link_libraries(
 )

 GR_ADD_TEST(test_gr_filter test-gr-filter)
+endif(ENABLE_TESTING)


Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]