David, Thanks, I did mean CMakeCache.txt.
Bill On Fri, Nov 5, 2010 at 10:38 AM, Gerhard Gappmeier <gerhard.gappme...@ascolab.com> wrote: > Hi > > when you checkout the tutorial you'll see that the NightlyMemcheck > target does not work. > (git clone git://github.com/gergap/helloworld.git) > > All tests fail because I'm using the EXECUTABLE_OUTPUT_PATH variable to > find the test executable. > e.g. ADD_TEST(SimpleTest ${EXECUTABLE_OUTPUT_PATH}/helloworld 5 3) > > This variable seems to be empty in Nightly and Experimental targets, though. > So valgrind fails with an error that "/helloworld" cannot be found. > > Any ideas why EXECUTABLE_OUTPUT_PATH is empty and how to fix that? > > > Am 05.11.2010 13:39, schrieb David Cole: >> Bill means your CMakeCache.txt file, not your CMakeLists.txt file. >> (Pretty sure...) :-) >> >> >> On Fri, Nov 5, 2010 at 8:30 AM, Bill Lorensen <bill.loren...@gmail.com> >> wrote: >>> Try adding these (with proper paths) to your CMakeLists.txt file: >>> CMAKE_BUILD_TYPE:STRING=Debug >>> COVERAGE_COMMAND:FILEPATH=/usr/bin/gcov >>> CMAKE_C_FLAGS:STRING=-g -O0 -fprofile-arcs -ftest-coverage >>> CMAKE_CXX_FLAGS:STRING=-g -O0 -fprofile-arcs -ftest-coverage >>> >>> CTEST_MEMORYCHECK_COMMAND:FILEPATH=/usr/bin/valgrind) >>> CTEST_MEMORYCHECK_COMMAND_OPTIONS:STRING=--trace-children=yes --quiet >>> --tool=memcheck --leak-check=yes --show-reachable=yes >>> --num-callers=100 --verbose --demangle=yes >>> >>> >>> On Wed, Nov 3, 2010 at 9:11 AM, Gerhard Gappmeier >>> <gerhard.gappme...@ascolab.com> wrote: >>>> Hi all, >>>> >>>> I'm trying to figure out how to use gcov and maybe also lcov with cmake. >>>> I know it works using ctest, I've seen that in several wiki entries, >>>> but I could not find one single example on how to use it. >>>> The wiki only shows the commandline args for GCC, but no cmake examples. >>>> >>>> I attached a simple hello world project with two tests (ADD_TEST) which >>>> work. >>>> I tried to add the "ctest_coverage" and "ctest_memcheck" commands but I >>>> can't >>>> get them working. >>>> >>>> Maybe somebody can complete this example. >>>> >>>> IMO a new section about gcov and valgrind should be added to >>>> http://www.cmake.org/cmake/help/cmake_tutorial.html >>>> This would help a lot of people. >>>> >>>> -- >>>> mit freundlichen Grüßen / best regards >>>> >>>> *Gerhard Gappmeier* >>>> ascolab GmbH - automation systems communication laboratory >>>> Tel.: +49 9131 691 123 >>>> Fax: +49 9131 691 128 >>>> Web: http://www.ascolab.com >>>> GPG Key Id: 5AAC50C4 >>>> GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4 >>>> >>>> -- >>>> *ascolab GmbH* >>>> Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß >>>> Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany >>>> Registernummer: HRB 9360 >>>> Registergericht: Amtsgericht Fürth >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the CMake FAQ at: >>>> http://www.cmake.org/Wiki/CMake_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.cmake.org/mailman/listinfo/cmake >>>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the CMake FAQ at: >>> http://www.cmake.org/Wiki/CMake_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.cmake.org/mailman/listinfo/cmake >>> >> > > > -- > mit freundlichen Grüßen / best regards > > *Gerhard Gappmeier* > ascolab GmbH - automation systems communication laboratory > Tel.: +49 9131 691 123 > Fax: +49 9131 691 128 > Web: http://www.ascolab.com > GPG-Key: http://www.ascolab.com/gpg/gg.asc > > -- > *ascolab GmbH* > Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß > Sitz der Gesellschaft: Am Weichselgarten 7 • 91058 Erlangen • Germany > Registernummer: HRB 9360 > Registergericht: Amtsgericht Fürth > > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake