Re: [CMake] How to suppress valgrind errors reported by NightlyMemCheck ?

2016-03-20 Thread Aaron Boxer
Hi Xavier,


On Sun, Mar 20, 2016 at 1:50 PM, Xavier Besseron 
wrote:

> Hi Aaron,
>
> I don't know if that's what you're looking for,
> but you can try to set Valgrind options using an environment variable or
> a cmake variable
>
> set(VALGRIND_OPTS "--suppressions=/path/to/your_suppression_file.supp")
>
>
> or
>
>
> export VALGRIND_OPTS="--suppressions=/path/to/your_suppression_file.supp"
>
>
Excellent, thanks for your help. This worked for me.

Aaron





>
>
> Best regards,
>
> Xavier
>
> On Sun, Mar 20, 2016 at 6:14 PM, Aaron Boxer  wrote:
>
>> My program links to libstdc++. It turns out there is a well-known false
>> positive
>> from valgrind regarding libstdc++ memory pools.
>>
>> http://valgrind.org/docs/manual/faq.html#faq.reports
>>
>> How may I suppress this error when running ctest -D NightlyMemCheck  ?
>>
>> Thanks,
>> Aaron
>>
>
>
>
> --
> Dr Xavier BESSERON
> Research associate
> FSTC, University of Luxembourg
> Campus Kirchberg, Office E-007
> Phone: +352 46 66 44 5418
> http://luxdem.uni.lu/
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-20 Thread Alexander Stein
On Tuesday 08 March 2016, 10:00:00 wrote Nicholas Braden:
> Jakob, I don't think there is any confusion about what REQUIRED means.
> Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS
> should not be required under any circumstances. The example error
> message seems pretty clear to me that the expected behavior and actual
> behavior are different. I went and looked at the source code of the
> find module:
> 
> https://github.com/Kitware/CMake/blob/master/Modules/FindQt4.cmake
> 
> It seems that there is no check whatsoever for
> Qt4_FIND_REQUIRED_, so the find module just blindly assumes
> that all components are required.
> 
> More info: 
> https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#find-modules
> 
> To me this seems like a bug in the find module.

Yep, FindQt4.cmake doesn't support OPTIONAL_COMPONENTS which seems only to work 
if FIND_PACKAGE_HANDLE_STANDARD_ARGS is called with HANDLE_COMPONENTS passed. 
This is not the case and does not work. I guess due to different naming scheme 
used for components. AFAICS they have to be e.g. Qt4_QtCore_FOUND, but not 
QT_QTCORE_FOUND.

Best regards,
Alexander

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] How to suppress valgrind errors reported by NightlyMemCheck ?

2016-03-20 Thread Xavier Besseron
Hi Aaron,

I don't know if that's what you're looking for,
but you can try to set Valgrind options using an environment variable or a
cmake variable

set(VALGRIND_OPTS "--suppressions=/path/to/your_suppression_file.supp")


or


export VALGRIND_OPTS="--suppressions=/path/to/your_suppression_file.supp"



Best regards,

Xavier

On Sun, Mar 20, 2016 at 6:14 PM, Aaron Boxer  wrote:

> My program links to libstdc++. It turns out there is a well-known false
> positive
> from valgrind regarding libstdc++ memory pools.
>
> http://valgrind.org/docs/manual/faq.html#faq.reports
>
> How may I suppress this error when running ctest -D NightlyMemCheck  ?
>
> Thanks,
> Aaron
>



-- 
Dr Xavier BESSERON
Research associate
FSTC, University of Luxembourg
Campus Kirchberg, Office E-007
Phone: +352 46 66 44 5418
http://luxdem.uni.lu/
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] How to suppress valgrind errors reported by NightlyMemCheck ?

2016-03-20 Thread Aaron Boxer
My program links to libstdc++. It turns out there is a well-known false
positive
from valgrind regarding libstdc++ memory pools.

http://valgrind.org/docs/manual/faq.html#faq.reports

How may I suppress this error when running ctest -D NightlyMemCheck  ?

Thanks,
Aaron
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CMAKE_USE_PTHREADS_INIT cleanup

2016-03-20 Thread Aaron Boxer
On Sun, Mar 20, 2016 at 8:46 AM, Aaron Boxer  wrote:

> I recently added pthreads to my cmake program.
> When I run valgrind, I get a "blocks still reachable" warning,
> coming from dl_init.
>
> I suspect that pthreads is not cleaning up properly. Is there a way
> of ensuring that the shared library for pthreads gets cleaned up correctly
> via cmake?
>
> i.e. a matching CLEANUP to got with the INIT call ?
>


Turns out it isn't pthreads library.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] CMAKE_USE_PTHREADS_INIT cleanup

2016-03-20 Thread Aaron Boxer
I recently added pthreads to my cmake program.
When I run valgrind, I get a "blocks still reachable" warning,
coming from dl_init.

I suspect that pthreads is not cleaning up properly. Is there a way
of ensuring that the shared library for pthreads gets cleaned up correctly
via cmake?

i.e. a matching CLEANUP to got with the INIT call ?

Thanks,
Aaron
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake