[CMake] Error running CMake on Win 7 64

2013-06-19 Thread Aaron Boxer
Hello,

I am trying to run cmake on a project (openjpeg)
using CMake 2.8.11 GUI, and I get the following errors:

The C compiler identification is unknown

Check if the system is big endian

Searching 16 bit integer

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (message):

no suitable type found

Call Stack (most recent call first):

CMakeLists.txt:146 (TEST_BIG_ENDIAN)

Configuring incomplete, errors occurred!


Any ideas?


Thanks,

Aaron
--

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

[CMake] Fwd: Error running CMake on Win 7 64

2013-06-19 Thread Aaron Boxer
-- Forwarded message --
From: Aaron Boxer boxe...@gmail.com
Date: Wed, Jun 19, 2013 at 11:47 AM
Subject: Re: [CMake] Error running CMake on Win 7 64
To: Sergei Nikulov sergey.niku...@gmail.com


@Sergei


When I click configure, I choose Visual Studio 2010 Win64 as my
compiler.


Then I get the following output:



The C compiler identification is unknown

Check if the system is big endian

Searching 16 bit integer

Looking for sys/types.h

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37
(get_filename_component):

get_filename_component called with incorrect number of arguments

Call Stack (most recent call first):

CMakeLists.txt:3 (PROJECT)

 CMake Error: Internal CMake error, TryCompile configure of cmake failed

Looking for sys/types.h - not found

Looking for stdint.h

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37
(get_filename_component):

get_filename_component called with incorrect number of arguments

Call Stack (most recent call first):

CMakeLists.txt:3 (PROJECT)

 CMake Error: Internal CMake error, TryCompile configure of cmake failed

Looking for stdint.h - not found

Looking for stddef.h

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37
(get_filename_component):

get_filename_component called with incorrect number of arguments

Call Stack (most recent call first):

CMakeLists.txt:3 (PROJECT)

 CMake Error: Internal CMake error, TryCompile configure of cmake failed

Looking for stddef.h - not found

Check size of unsigned short

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37
(get_filename_component):

get_filename_component called with incorrect number of arguments

Call Stack (most recent call first):

CMakeLists.txt:3 (PROJECT)

 CMake Error: Internal CMake error, TryCompile configure of cmake failed

Check size of unsigned short - failed

Check size of unsigned int

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37
(get_filename_component):

get_filename_component called with incorrect number of arguments

Call Stack (most recent call first):

CMakeLists.txt:3 (PROJECT)

 CMake Error: Internal CMake error, TryCompile configure of cmake failed

Check size of unsigned int - failed

Check size of unsigned long

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37
(get_filename_component):

get_filename_component called with incorrect number of arguments

Call Stack (most recent call first):

CMakeLists.txt:3 (PROJECT)

 CMake Error: Internal CMake error, TryCompile configure of cmake failed

Check size of unsigned long - failed

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (message):

no suitable type found

Call Stack (most recent call first):

CMakeLists.txt:146 (TEST_BIG_ENDIAN)

 Configuring incomplete, errors occurred!


On Wed, Jun 19, 2013 at 11:37 AM, Aaron Boxer boxe...@gmail.com wrote:

 Thanks, Sergei.
 Yes, I have visual studio 2008, 2010 and 2012 installed.
 And I have built VTK on this system.
 Aaron


 On Wed, Jun 19, 2013 at 11:13 AM, Sergei Nikulov sergey.niku...@gmail.com
  wrote:

 2013/6/19 Aaron Boxer boxe...@gmail.com

 Hello,

 I am trying to run cmake on a project (openjpeg)
 using CMake 2.8.11 GUI, and I get the following errors:

 The C compiler identification is unknown

 Check if the system is big endian

 Searching 16 bit integer

 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (message):

 no suitable type found

 Call Stack (most recent call first):

 CMakeLists.txt:146 (TEST_BIG_ENDIAN)

 Configuring incomplete, errors occurred!


 Any ideas?


 Do you have any compiler installed?
 AFAIR, you should select what tool set should be used for
 configuration/generation.
 The C compiler identification is unknown pretty self-descriptive.



 Thanks,

 Aaron

 --

 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




 --
 Best Regards,
 Sergei Nikulov



--

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

Re: [CMake] Fwd: Error running CMake on Win 7 64

2013-06-19 Thread Aaron Boxer
Sergei,
Yes, thanks very much for testing this out.
I was able to build the project on another system.

Cheers,
Aaron



On Wed, Jun 19, 2013 at 2:37 PM, Sergei Nikulov sergey.niku...@gmail.comwrote:




 @Sergei


 When I click configure, I choose Visual Studio 2010 Win64 as my
 compiler.


 Then I get the following output:


 Aaron,

 Looks like something wrong with your environment.
 Another idea is - try remove CMakeCache in existing build dir or start
 from clean dir
 Re-run cmake.
 Just checked out project from google and it works just fine

 The C compiler identification is MSVC 16.0.40219.1

 Check for working C compiler using: Visual Studio 10 Win64

 Check for working C compiler using: Visual Studio 10 Win64 -- works

 Detecting C compiler ABI info

 Detecting C compiler ABI info - done

 Check if the system is big endian

 Searching 16 bit integer

 Looking for sys/types.h

 Looking for sys/types.h - found

 Looking for stdint.h

 Looking for stdint.h - found
 ...

--

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

[CMake] Build cmake child project from cmake parent project

2014-02-19 Thread Aaron Boxer
I have cmake two projects, with project 2 added as a git submodule in
project 1.

I would like to build project 2 from project 1.

How can I do this? I tried add_subdirectory, but this is just for adding
source directories. I want to use the project 2 cmake files to build it.

Thanks!
-- 

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Build cmake child project from cmake parent project

2014-02-20 Thread Aaron Boxer
Thanks very much, Magnus! I will try it out.
(your tag line made me laugh)

Cheers,
Aaron


On Thu, Feb 20, 2014 at 1:21 AM, Magnus Therning mag...@therning.orgwrote:

 On Wed, Feb 19, 2014 at 06:24:44PM -0500, Aaron Boxer wrote:
  I have cmake two projects, with project 2 added as a git submodule in
  project 1.
 
  I would like to build project 2 from project 1.
 
  How can I do this? I tried add_subdirectory, but this is just for adding
  source directories. I want to use the project 2 cmake files to build it.

 Have a look at ExternalProject
 (http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:ExternalProject
 )
 it's very likely what you are looking for.

 /M


 --
 Magnus Therning  OpenPGP: 0xAB4DFBA4
 email: mag...@therning.org   jabber: mag...@therning.org
 twitter: magthe   http://therning.org/magnus

 I invented the term Object-Oriented, and I can tell you I did not have
 C++ in mind.
  -- Alan Kay

 --

 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://www.cmake.org/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://www.cmake.org/mailman/listinfo/cmake

[CMake] Loading Plugins

2014-10-31 Thread Aaron Boxer
Hello!

I have a C CMake project, and I would like to add the following feature:

1) define an interface for a second dynamic library
2) look in a specified folder at runtime, and try to load this library
3) if loading fails, then get notified of this fact, so that I can use
statically linked fall-back routines in the parent project.

Is this possible?  Any ideas or advice would be greatly appreciated.

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] Loading Plugins

2014-10-31 Thread Aaron Boxer
On Fri, Oct 31, 2014 at 5:48 PM, J Decker d3c...@gmail.com wrote:


 really nothing at all to do with cmake; a couple macros and you can
 support cross-platform... a few less and you can init interfaces pretty
 easily
 at the end of init or during early discovery of functions, if they fail
 you can fillthe interface with static methods or return a different
 interface

 code part of
 https://code.google.com/p/c-system-abstraction-component-gui/source/browse/src/streamlib/ffmpeg/ffmpeg_interface.c


 #ifdef WIN32
 #define lib_format WIDE(avformat-56.dll)
 #else

 #if defined( __ANDROID__) || defined( __LINUX__ )
 #define lib_format WIDE(libavformat.so)
 #endif

 static struct fmpeg_interface
 {
 #define declare_func(a,b,c) a (CPROC *b) c
 #define setup_func(lib, a,b,c) if( ffmpeg.b=(a(CPROC*)c)LoadFunction( lib,
 _WIDE(#b) ) )

 declare_func( void, av_register_all,(void) );
 declare_func( int, avformat_open_input, (AVFormatContext **ps, const char
 *filename, AVInputFormat *fmt, AVDictionary **options) );
 /*...*/
 } ffmpeg;


 void Init( void )
 {
  setup_func( lib_format, void, av_register_all,(void) );
 setup_func( lib_format, int, avformat_open_input, (AVFormatContext **,
 const char *, AVInputFormat *, AVDictionary **) );
 setup_func( lib_format, int, avformat_close_input, (AVFormatContext **) );
  }

 void LaterUsage( void )
 {
 ffmpeg.av_register_all();
 }

 void LaterUsageAsPointer( void )
 {
 struct fmpeg_interface interface = ffmpeg; /* or from some other function
 */
 interface-av_register_all();
 }

 if you have intellisense, makes for nice popups of available methods.


Thanks. After a little Googling, I found this Dr. Dobbs article that
describes, with source code, how create a plugin architecture.

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

[CMake] undefined reference to 'pthread_create'

2016-02-04 Thread Aaron Boxer
Hello,
I have a cmake project that uses C++11 threads.
I have added the lines

set (CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


CMAKE version is 3.2.2, running on Ubuntu.

When I try to build, I get the error

undefined reference to `pthread_create`

Any ideas on how to fix this?

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] undefined reference to 'pthread_create'

2016-02-04 Thread Aaron Boxer
Thanks. So, even though threading is part of the standard, I still need to
link to pthreads library ?

On Thu, Feb 4, 2016 at 11:53 AM, rpela...@archlinux.info <
rpela...@archlinux.info> wrote:

> I believe that doesn't have anything to do with C11 flags. You are just
> missing the link to the pthread library. I could be wrong.
>
> Try and add this to your cmake file:
>
> find_package (Threads)
>
> target_link_libraries (myexecutable/lib ${CMAKE_THREAD_LIBS_INIT})
>
>
>
> Sent from my iPhone
>
> On Feb 4, 2016, at 10:42 AM, Aaron Boxer <boxe...@gmail.com> wrote:
>
> Hello,
> I have a cmake project that uses C++11 threads.
> I have added the lines
>
> set (CMAKE_CXX_STANDARD 14)
> set(CMAKE_CXX_STANDARD_REQUIRED ON)
>
>
> CMAKE version is 3.2.2, running on Ubuntu.
>
> When I try to build, I get the error
>
> undefined reference to `pthread_create`
>
> Any ideas on how to fix this?
>
> 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
>
>
-- 

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] undefined reference to 'pthread_create'

2016-02-04 Thread Aaron Boxer
Thanks, guys This is working now.

Cheers,
Aaron

On Thu, Feb 4, 2016 at 1:05 PM, J Decker <d3c...@gmail.com> wrote:

> On Thu, Feb 4, 2016 at 9:55 AM, Aaron Boxer <boxe...@gmail.com> wrote:
> > Thanks. So, even though threading is part of the standard, I still need
> to
> > link to pthreads library ?
>
> Yes; sounds more like an issue for GCC :)   I mean you don't have to
> tell it to link against c library or c++ runtime libraries... and it
> IS pthread specific so it's not like there's going to be some
> alternative provider for such services.
>
> using MinGW under linux to get a windows output it links automatically
> to a 'winpthreads.dll' which then becomes a runtime requirement... so
> it's not impossible for the compiler suite to do.
>
>
> >
> > On Thu, Feb 4, 2016 at 11:53 AM, rpela...@archlinux.info
> > <rpela...@archlinux.info> wrote:
> >>
> >> I believe that doesn't have anything to do with C11 flags. You are just
> >> missing the link to the pthread library. I could be wrong.
> >>
> >> Try and add this to your cmake file:
> >>
> >> find_package (Threads)
> >>
> >> target_link_libraries (myexecutable/lib ${CMAKE_THREAD_LIBS_INIT})
> >>
> >>
> >>
> >> Sent from my iPhone
> >>
> >> On Feb 4, 2016, at 10:42 AM, Aaron Boxer <boxe...@gmail.com> wrote:
> >>
> >> Hello,
> >> I have a cmake project that uses C++11 threads.
> >> I have added the lines
> >>
> >> set (CMAKE_CXX_STANDARD 14)
> >> set(CMAKE_CXX_STANDARD_REQUIRED ON)
> >>
> >>
> >> CMAKE version is 3.2.2, running on Ubuntu.
> >>
> >> When I try to build, I get the error
> >>
> >> undefined reference to `pthread_create`
> >>
> >> Any ideas on how to fix this?
> >>
> >> 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
> >
> >
> >
> > --
> >
> > 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

[CMake] best way of parsing test results from ctest + valgrind

2016-03-01 Thread Aaron Boxer
Hello,
I am just getting started on using valgrind memory analysis for my tests.
When I run ctest with nightly memory check, I get an XML document, but it
is very hard to read the results. What is the best way of reading this doc?

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

[CMake] ASAN error

2016-04-12 Thread Aaron Boxer
Hello,
I am running on Ubuntu 15.10, with g++ 5.2.1
I have built my cmake project with ASAN and UBSAN.

When I run the ctest nightly memory check, all of my tests fail
with the error

Shadow memory range interleaves with an existing memory mapping. ASan
cannot proceed correctly. ABORTING


Has anyone encountered this? If I just run make test, then

I don't get these errors.

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

[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

[CMake] Delete CDash project

2016-03-25 Thread Aaron Boxer
Does anyone know how to delete a CDash project? There doesn't seem to be
any way to do this on the website.

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] Delete CDash project

2016-03-25 Thread Aaron Boxer
Never mind - you can do this using the not very obvious "unsubscribe"
option in manage subscription.

On Fri, Mar 25, 2016 at 10:43 AM, Aaron Boxer <boxe...@gmail.com> wrote:

> Does anyone know how to delete a CDash project? There doesn't seem to be
> any way to do this on the website.
>
> 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 <boxe...@gmail.com> 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] 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] 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 <xavier.besse...@uni.lu>
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 <boxe...@gmail.com> 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] best way of parsing test results from ctest + valgrind

2016-03-02 Thread Aaron Boxer
Thanks, Dave!  Since this is an open source project, I just set up a CDash
instance
on my.cdash.org.

Cheers,
Aaron

On Wed, Mar 2, 2016 at 5:19 AM, Dave Flogeras <dfloger...@gmail.com> wrote:

> On Tue, Mar 1, 2016 at 8:15 PM, Aaron Boxer <boxe...@gmail.com> wrote:
> > Hello,
> > I am just getting started on using valgrind memory analysis for my tests.
> > When I run ctest with nightly memory check, I get an XML document, but it
> > is very hard to read the results. What is the best way of reading this
> doc?
> >
>
> For me, the best way to go was to go through the short-term pain of
> setting up CDash (it is not very hard, but you do have to set up a
> database, a webserver and PHP).  Also, you only set it up once and you
> can host as many projects on your server as you like.
>
> Once that is done, create a project in CDash and it will generate you
> a CTestConfig.cmake which you drop into your CMake project. Then it is
> as easy as "make NightlySubmit" (after
> NightlyStart/Configure/Build/Test etc.).  It handles uploading the xml
> to CDash and CDash will parse it and build you nice tables to
> summarize.  Clicking into individual tests will show you their
> results.
>
> If you like, you can then go further and use a tool like python to
> script and automate your clone/configure/build/test/upload process
> across multiple projects/multiple variations.  I do this on multiple
> hosts so that CDash aggregates the results of building multiple
> projects, with multiple compilers, on multiple operating systems.  It
> all depends what you need.
>
> That may not be the easiest solution, but I think it is a good one and
> worth looking into.
>
> HTH
> Dave
>
-- 

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_THREAD_LIBS_INIT

2016-03-01 Thread Aaron Boxer
Hello,
I am getting link error "undefined reference to pthread_create"

I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line,
and I have added

FIND_PACKAGE(Threads REQUIRED).

Here is a link to my cmake file:

https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt

Any help would be very greatly appreciated.

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

[CMake] CMAKE_DL_LIBS

2016-03-01 Thread Aaron Boxer
Hello!
I have a CMAKE project that creates an executable that links with a static
lib
from a second CMAKE project. The static lib requires the dlopen and dlclose
symbols.

So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake file.

However, I still get an error about "undefined reference to symbol
"dlclose"

I am using CMake 3.2.2.

Any ideas ?

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_DL_LIBS

2016-03-01 Thread Aaron Boxer
Thanks! I found the problem: I needed to add CMAKE_DL_LIBS to another
static library that the main exe was linking to.
Now this link error is gone.


On Tue, Mar 1, 2016 at 9:55 AM, J. Caleb Wherry <calebwhe...@gmail.com>
wrote:

> That link looks fine to me. You might want to verify that the
> CMAKE_DL_LIBS variable actually contains what it should on your system (or
> a least contains what it should right before using it).
>
> You could explicitly add the "-dl" to that link statement and see if that
> works. That's what that variable should contain anyways on Linux boxes.
>
> -Caleb
>
> (Pasting off list response below)
>
> Thanks, Caleb. Are you saying that I need to add "-ldl" link lib in
> addition to ${CMAKE_DL_LIBS} ?
>
>
> My CMake file is here:
>
>
> https://github.com/GrokImageCompression/opendcp/blob/master/cli/CMakeLists.txt
>
> and the lines for the exe that is not linking are found here:
>
> TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} )
>
>
> This is an open source proj, by the way. I can send you a few short lines
> about how to build on Ubuntu, if you are interested.
>
> Thanks very much for your help.
>
>
> Aaron
>
> On Tuesday, March 1, 2016, Aaron Boxer <boxe...@gmail.com> wrote:
>
>>
>>
>> On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer <boxe...@gmail.com> wrote:
>>
>>> Hello!
>>> I have a CMAKE project that creates an executable that links with a
>>> static lib
>>> from a second CMAKE project. The static lib requires the dlopen and
>>> dlclose
>>> symbols.
>>>
>>> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake
>>> file.
>>>
>>> However, I still get an error about "undefined reference to symbol
>>> "dlclose"
>>>
>>
>> The error states: "missing DSO from command line"
>>
>> Also, the second CMAKE project also contains executables that link with
>> the static
>> library, and they link with no problem.
>>
>>
>>
>>
>>
>
> --
> Sent from my iPhone 4s
>
-- 

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_THREAD_LIBS_INIT

2016-03-01 Thread Aaron Boxer
OK, figured this one out too.  Thank again, Caleb!

On Tue, Mar 1, 2016 at 10:48 AM, Aaron Boxer <boxe...@gmail.com> wrote:

> Hello,
> I am getting link error "undefined reference to pthread_create"
>
> I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line,
> and I have added
>
> FIND_PACKAGE(Threads REQUIRED).
>
> Here is a link to my cmake file:
>
>
> https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt
>
> Any help would be very greatly appreciated.
>
> 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_DL_LIBS

2016-03-01 Thread Aaron Boxer
On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer <boxe...@gmail.com> wrote:

> Hello!
> I have a CMAKE project that creates an executable that links with a static
> lib
> from a second CMAKE project. The static lib requires the dlopen and dlclose
> symbols.
>
> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake
> file.
>
> However, I still get an error about "undefined reference to symbol
> "dlclose"
>

The error states: "missing DSO from command line"

Also, the second CMAKE project also contains executables that link with the
static
library, and they link with no problem.
-- 

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] Strange test failure

2017-01-21 Thread Aaron Boxer
Thanks, Nils, I figured it out.

On Jan 20, 2017 2:41 AM, "Nils Gladitz" <nilsglad...@gmail.com> wrote:

> On 01/20/2017 12:59 AM, Aaron Boxer wrote:
>
> I have a test in my ctest suite that fails both with
>> and without a ! at the beginning of the test.
>>
>> So,
>>
>> FOO -BAR -BAZ
>>
>> fails
>>
>> and
>>
>> !FOO -BAR -BAZ
>>
>> fails.
>>
>
> I am not aware of "!" having any special meaning in the context of CTest.
> Can you elaborate?
>
>
>> Any ideas, or how can I get more info on the failure ?
>>
>
> ctest -V or ctest --output-on-failure might help.
>
> What type of failure does CTest indicate?
>
> Nils
>
-- 

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] Strange test failure

2017-01-19 Thread Aaron Boxer
I have a test in my ctest suite that fails both with
and without a ! at the beginning of the test.

So,

FOO -BAR -BAZ

fails

and

!FOO -BAR -BAZ

fails.

Any ideas, or how can I get more info on the failure ?

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

[CMake] cmake - ified libjpeg source code

2016-10-25 Thread Aaron Boxer
Hello,

I am looking for a cmake-ified jpeg library to add to another cmake project.
Any recommendations?

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] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Thanks a lot, Eric.

So, I have two cmake variables, and I want to #define FOO_DEFINE if
one or the other is set, otherwise I don't want FOO_DEFINE defines at all.

Is this possible ?



On Thu, Oct 13, 2016 at 3:27 PM, Eric Noulard <eric.noul...@gmail.com>
wrote:

>
>
> 2016-10-13 21:18 GMT+02:00 Aaron Boxer <boxe...@gmail.com>:
>
>> Hello,
>>
>> I have a foo.h.cmake.in file that I am using to generate a
>> foo_config.hfile.
>>
>> Here is the line in my cmake file that generates the header:
>>
>> configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.h.cmake.in
>>   ${CMAKE_CURRENT_BINARY_DIR}/foo_config.h @ONLY)
>>
>
>
> You specified @ONLY option which means that only @VARNAME@ will be
> processed
> and not ${VARNAME}
>
>
>>
>>
>> I would like to define or undefine DEFINE in the config file
>> based on some cmake variables.
>>
>>
>> Here is my line in the foo.h.cmake.in file:
>>
>> #cmakedefine FOO_DEFINE ${SOME_CMAKE_VARIABLE}
>>
>
> Either you drop the @ONLY option of configure_file or you write
>
> #cmakedefine FOO_DEFINE @SOME_CMAKE_VARIABLE@
>
> and you should get what you want.
> @ONLY is very useful when you configure some kind of shell script template
> where $ shoudn't be interpreted by CMake condigure_file because it's meant
> to kept
> as is in the resulting configured file.
>
>
>
>>
>> However, I only get
>>
>> #define FOO_DEFINE ${SOME_CMAKE_VARIABLE}
>>
>> in the foo_config.h file.
>>
>>
>> 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
>>
>
>
>
> --
> Eric
>
-- 

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] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Eric, thanks, I figured it out.

On Thu, Oct 13, 2016 at 3:27 PM, Eric Noulard <eric.noul...@gmail.com>
wrote:

>
>
> 2016-10-13 21:18 GMT+02:00 Aaron Boxer <boxe...@gmail.com>:
>
>> Hello,
>>
>> I have a foo.h.cmake.in file that I am using to generate a
>> foo_config.hfile.
>>
>> Here is the line in my cmake file that generates the header:
>>
>> configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.h.cmake.in
>>   ${CMAKE_CURRENT_BINARY_DIR}/foo_config.h @ONLY)
>>
>
>
> You specified @ONLY option which means that only @VARNAME@ will be
> processed
> and not ${VARNAME}
>
>
>>
>>
>> I would like to define or undefine DEFINE in the config file
>> based on some cmake variables.
>>
>>
>> Here is my line in the foo.h.cmake.in file:
>>
>> #cmakedefine FOO_DEFINE ${SOME_CMAKE_VARIABLE}
>>
>
> Either you drop the @ONLY option of configure_file or you write
>
> #cmakedefine FOO_DEFINE @SOME_CMAKE_VARIABLE@
>
> and you should get what you want.
> @ONLY is very useful when you configure some kind of shell script template
> where $ shoudn't be interpreted by CMake condigure_file because it's meant
> to kept
> as is in the resulting configured file.
>
>
>
>>
>> However, I only get
>>
>> #define FOO_DEFINE ${SOME_CMAKE_VARIABLE}
>>
>> in the foo_config.h file.
>>
>>
>> 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
>>
>
>
>
> --
> Eric
>
-- 

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] Need help generating a config file

2016-10-13 Thread Aaron Boxer
Hello,

I have a foo.h.cmake.in file that I am using to generate a
foo_config.hfile.

Here is the line in my cmake file that generates the header:

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/foo.h.cmake.in
  ${CMAKE_CURRENT_BINARY_DIR}/foo_config.h @ONLY)


I would like to define or undefine DEFINE in the config file
based on some cmake variables.


Here is my line in the foo.h.cmake.in file:

#cmakedefine FOO_DEFINE ${SOME_CMAKE_VARIABLE}


However, I only get

#define FOO_DEFINE ${SOME_CMAKE_VARIABLE}

in the foo_config.h file.


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] Force copy of files

2016-10-14 Thread Aaron Boxer
Never mind, figured this one out:

use copy_if_different

On Fri, Oct 14, 2016 at 1:34 PM, Aaron Boxer <boxe...@gmail.com> wrote:

> I have the following lines in my cmake file
>
>
> foreach(f ${MyFiles})
>   add_custom_command(TARGET ${OPENJPEG_PLUGIN_NAME} PRE_BUILD
>  COMMAND ${CMAKE_COMMAND} -E
>  copy ${f} $<TARGET_FILE_DIR:${MY_FOLDER}>)
> endforeach()
>
> in order to copy MyFiles to MyFolder.
>
>
> If these files already exist, I would like copy to overwrite the old file.
> Is there a flag to pass to copy to force this to overwrite?
>
> 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

[CMake] Force copy of files

2016-10-14 Thread Aaron Boxer
I have the following lines in my cmake file


foreach(f ${MyFiles})
  add_custom_command(TARGET ${OPENJPEG_PLUGIN_NAME} PRE_BUILD
 COMMAND ${CMAKE_COMMAND} -E
 copy ${f} $)
endforeach()

in order to copy MyFiles to MyFolder.


If these files already exist, I would like copy to overwrite the old file.
Is there a flag to pass to copy to force this to overwrite?

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] Tracing ctest crash on windows

2017-01-05 Thread Aaron Boxer
Thanks, Bill and Jakob.  I did what you suggested and found the problem
Aaron

On Thu, Jan 5, 2017 at 11:51 AM, Bill Hoffman <bill.hoff...@kitware.com>
wrote:

> On 1/5/2017 9:32 AM, Jakob van Bethlehem wrote:
>
>>
>> CTest is not some magical tool that internally runs your test or
>> something like that - instead CTest just fires up your test executable
>> and does clever things with the output. In the same way you can just set
>> your test project as startup-project, and debug it like any other
>> executable.
>>
>> Sincerely,
>> Jakob
>>
>> On Wed, Jan 4, 2017 at 2:43 PM, Aaron Boxer <boxe...@gmail.com
>> <mailto:boxe...@gmail.com>> wrote:
>>
>> Hello,
>> I am on windows, with visual studio 2015.
>> Some of my ctest tests are crashing with exception.
>> Is there a way of debugging these tests ?
>>
>> When I run in debug mode, I get an exception dialog,
>> but can't drop into debugging environment.
>>
> If you run ctest -VV it will show the full command line.  Best way is to
> just run the same command in the debugger.
>
> -Bill
>
>
> --
>
> 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/opensou
> rce/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

[CMake] Tracing ctest crash on windows

2017-01-04 Thread Aaron Boxer
Hello,
I am on windows, with visual studio 2015.
Some of my ctest tests are crashing with exception.
Is there a way of debugging these tests ?

When I run in debug mode, I get an exception dialog,
but can't drop into debugging environment.

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

[CMake] Exception handling warning on windows

2017-07-23 Thread Aaron Boxer
Hello,

I am getting the following warning when building my project on Visual
Studio 14:

warning C4530: C++ exception handler used, but unwind semantics are not
enabled. Specify /EHsc

Is there a cmake option to enable unwind semantics on windows ?

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] Exception handling warning on windows

2017-07-23 Thread Aaron Boxer
Never mind, figured it out :)

IF(MSVC)
SET(CMAKE_CXX_FLAGS "/EHsc")
ENDIF(MSVC)

On Sun, Jul 23, 2017 at 8:35 PM, Aaron Boxer <boxe...@gmail.com> wrote:

> Hello,
>
> I am getting the following warning when building my project on Visual
> Studio 14:
>
> warning C4530: C++ exception handler used, but unwind semantics are not
> enabled. Specify /EHsc
>
> Is there a cmake option to enable unwind semantics on windows ?
>
> 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

[CMake] cmakedefine based on find_package

2017-07-27 Thread Aaron Boxer
Hello,

I am using find_package to find the OpenCL install on my system.
Finding the package sets OPENCL_FOUND to true.
I would like to create a #define in the code that will match this cmake
variable,
so I have set

#cmakedefine HAVE_OPENCL @OPENCL_FOUND@

in my config.h.cmake.in file.

However, I get

/* #undef HAVE_OPENCL */

in the corresponding include file.

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] cmakedefine based on find_package

2017-07-27 Thread Aaron Boxer
Never mind, figured it out :)

#cmakedefine OPENCL_FOUND

On Thu, Jul 27, 2017 at 9:23 AM, Aaron Boxer <boxe...@gmail.com> wrote:

> Hello,
>
> I am using find_package to find the OpenCL install on my system.
> Finding the package sets OPENCL_FOUND to true.
> I would like to create a #define in the code that will match this cmake
> variable,
> so I have set
>
> #cmakedefine HAVE_OPENCL @OPENCL_FOUND@
>
> in my config.h.cmake.in file.
>
> However, I get
>
> /* #undef HAVE_OPENCL */
>
> in the corresponding include file.
>
> 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] Trouble finding libjpeg package on ubuntu

2017-05-29 Thread Aaron Boxer
Damn!!! Unix is case sensitive.

find_package(JPEG) works.



On Sun, May 28, 2017 at 9:37 PM, Aaron Boxer <boxe...@gmail.com> wrote:

> Hello,
> I would like cmake to find the libjpeg installation on my ubuntu system.
>
> I have the
>
> find_package(jpeg) line in my cmake file, and this works on windows, but on
> Ubuntu with libjpeg-turbo installed, it can't find it.
>
> Here is a list of the install directories for the libjpeg-turbo8-dev
> package:
>
> /.
> /usr
> /usr/include
> /usr/include/turbojpeg.h
> /usr/include/jerror.h
> /usr/include/x86_64-linux-gnu
> /usr/include/x86_64-linux-gnu/jconfig.h
> /usr/include/jmorecfg.h
> /usr/include/jpegint.h
> /usr/include/jpeglib.h
> /usr/share
> /usr/share/doc
> /usr/share/doc/libjpeg-turbo8-dev
> /usr/share/doc/libjpeg-turbo8-dev/copyright
> /usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz
> /usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz
> /usr/share/doc/libjpeg-turbo8-dev/README.gz
> /usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz
> /usr/lib
> /usr/lib/x86_64-linux-gnu
> /usr/lib/x86_64-linux-gnu/libturbojpeg.a
> /usr/lib/x86_64-linux-gnu/libjpeg.a
> /usr/lib/x86_64-linux-gnu/pkgconfig
>
>
> Any help would be greatly appreciated.
>
> 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

[CMake] Trouble finding libjpeg package on ubuntu

2017-05-28 Thread Aaron Boxer
Hello,
I would like cmake to find the libjpeg installation on my ubuntu system.

I have the

find_package(jpeg) line in my cmake file, and this works on windows, but on
Ubuntu with libjpeg-turbo installed, it can't find it.

Here is a list of the install directories for the libjpeg-turbo8-dev
package:

/.
/usr
/usr/include
/usr/include/turbojpeg.h
/usr/include/jerror.h
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/jconfig.h
/usr/include/jmorecfg.h
/usr/include/jpegint.h
/usr/include/jpeglib.h
/usr/share
/usr/share/doc
/usr/share/doc/libjpeg-turbo8-dev
/usr/share/doc/libjpeg-turbo8-dev/copyright
/usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz
/usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz
/usr/share/doc/libjpeg-turbo8-dev/README.gz
/usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libturbojpeg.a
/usr/lib/x86_64-linux-gnu/libjpeg.a
/usr/lib/x86_64-linux-gnu/pkgconfig


Any help would be greatly appreciated.

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

[CMake] Fwd: Re: Trouble finding libjpeg package on ubuntu

2017-05-29 Thread Aaron Boxer
-- Forwarded message --
From: "Aaron Boxer" <boxe...@gmail.com>
Date: May 29, 2017 6:42 AM
Subject: Re: [CMake] Trouble finding libjpeg package on ubuntu
To: "Michele Portolan" <michele.porto...@grenoble-inp.fr>
Cc:

Yes, installed dev version.

On May 29, 2017 2:57 AM, "Michele Portolan" <michele.portolan@grenoble-
inp.fr> wrote:

> Did you install the dev version of the library?
>
>
> Michele
>
> On 29/05/17 03:37, Aaron Boxer wrote:
>
> Hello,
> I would like cmake to find the libjpeg installation on my ubuntu system.
>
> I have the
>
> find_package(jpeg) line in my cmake file, and this works on windows, but on
> Ubuntu with libjpeg-turbo installed, it can't find it.
>
> Here is a list of the install directories for the libjpeg-turbo8-dev
> package:
>
> /.
> /usr
> /usr/include
> /usr/include/turbojpeg.h
> /usr/include/jerror.h
> /usr/include/x86_64-linux-gnu
> /usr/include/x86_64-linux-gnu/jconfig.h
> /usr/include/jmorecfg.h
> /usr/include/jpegint.h
> /usr/include/jpeglib.h
> /usr/share
> /usr/share/doc
> /usr/share/doc/libjpeg-turbo8-dev
> /usr/share/doc/libjpeg-turbo8-dev/copyright
> /usr/share/doc/libjpeg-turbo8-dev/libjpeg.txt.gz
> /usr/share/doc/libjpeg-turbo8-dev/structure.txt.gz
> /usr/share/doc/libjpeg-turbo8-dev/README.gz
> /usr/share/doc/libjpeg-turbo8-dev/README-turbo.txt.gz
> /usr/lib
> /usr/lib/x86_64-linux-gnu
> /usr/lib/x86_64-linux-gnu/libturbojpeg.a
> /usr/lib/x86_64-linux-gnu/libjpeg.a
> /usr/lib/x86_64-linux-gnu/pkgconfig
>
>
> Any help would be greatly appreciated.
>
> 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