Re: [CMake] CMake fails to find sys/event.h on FreeBSD 10.2

2015-11-15 Thread Rolf Eike Beer
Am Montag, 16. November 2015, 00:34:01 schrieb Klemen Ferjančič:
> FreeBSD 10.2-STABLE
> CMake 3.3.1
> 
> Our projects needs kqueue which means that sys/types.h and sys/event.h
> need to be found. Googling around also revealed that event.h is not self
> inclusive but depends on type.h. Not sure if that has to do with
> anything though.
> 
> CMakeLists.txt:
> check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
> if (HAVE_SYS_TYPES_H)
> check_include_file_cxx(sys/event.h HAVE_SYS_EVENT_H)
> endif()

cmake --help-module CheckIncludeFileCXX

-> CMAKE_REQUIRED_INCLUDES

Eike

signature.asc
Description: This is a digitally signed message part.
-- 

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 fails to find sys/event.h on FreeBSD 10.2

2015-11-15 Thread Klemen Ferjančič
FreeBSD 10.2-STABLE
CMake 3.3.1

Our projects needs kqueue which means that sys/types.h and sys/event.h
need to be found. Googling around also revealed that event.h is not self
inclusive but depends on type.h. Not sure if that has to do with
anything though.

CMakeLists.txt:
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
if (HAVE_SYS_TYPES_H)
check_include_file_cxx(sys/event.h HAVE_SYS_EVENT_H)
endif()

Result:
cmake -G "Unix Makefiles" -H./ -B./build
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include sys/event.h
-- Looking for C++ include sys/event.h - not found

Both files exist in /usr/include/sys. Tried with check_include_file too
but same problem.

Can anyone tell me if I am doing something wrong and any idea why
event.h is not found?
-- 

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] Benchmarking with CMake

2015-11-15 Thread Alexander Neundorf
On Friday, November 13, 2015 14:41:35 Nagy-Egri Máté Ferenc via 
CMake wrote:
> Thank you all for your resonses,
> 
> My use case is that I have a set of executables that function as unit 
tests.
> Currently I use the return value of the .exe as a means of indicating
> success, though I know there is way to match std::cout against a 
regex for
> more complex tests. However, the timings of the tests are not always
> suitable for benchmarking, because I only want the timings of a 
particular
> part of the tests. Their initialization times are comparable to their
> runtimes. While I could tune a parameter so that the init phase is
> negligable, but then benchmarking would take for ages. I want to write
> benchmark executables (similar to unit tests) that write a single 
number to
> the console and nothing else. Run some command (make bench?, 
cbench?) which
> runs, these tests, fetches the sole number from the std::cout and 
prints
> those numbers as output instead of the total run time presented by 
ctest.
> 
> @Peter: I also encountered Google Benchmark. I have already seen 
it’s output
> and is perfectly fine. I am however a bit reluctant to grab another
> dependency that all my consumers would be advised to install. 
CMake is a
> fairly full blown suite and I was hoping to find something that could
> provide similar results.
> 
> @Matt: Seems nice. Python is not much a dependency, but VTK is 
less evident
> to be present on all machines.
> 
> @Alexander: I still have to look into this, because information seems a
> little scarce on doing it. It seems to me, that CDash has to be installed
> somewhere to be able visualize the data. 

Yes.

> Is there a way to generate the
> HTML-r for local consumption instead of submitting somewhere? 
(Ideally
> bypassing a local installation of CDash)

I don't think so.

Alex

-- 

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 build cmake to have http support?

2015-11-15 Thread Cedric Doucet

Yes, I finally managed to do it! :)
This is exactly what I did!

Thank you!



- Mail original -
> De: "Nicholas Braden" 
> À: "Cedric Doucet" 
> Cc: cmake@cmake.org
> Envoyé: Dimanche 15 Novembre 2015 21:21:35
> Objet: Re: [CMake] How to build cmake to have http support?
> 
> Have you tried installing the required parts locally (e.g. in your
> home directory) and just telling CMake to look there instead of the
> default system locations?
> 
> On Sun, Nov 15, 2015 at 9:52 AM, Cedric Doucet 
> wrote:
> >
> > Thank you Gregor!
> >
> > As I feared, this solution does not work in my particular case.
> > This is because something is missing in the system and I can't installed it
> > since I'm not an administrator of the cluster:
> >
> > -- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
> > CMake Error at CMakeLists.txt:279 (message):
> >   CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!
> > Call Stack (most recent call first):
> >   CMakeLists.txt:546 (CMAKE_BUILD_UTILITIES)
> >
> >
> > -- Configuring incomplete, errors occurred!
> > See also "/home/doucetc/logiciels/cmake-3.4.0/CMakeFiles/CMakeOutput.log".
> > See also "/home/doucetc/logiciels/cmake-3.4.0/CMakeFiles/CMakeError.log".
> > -
> > Error when bootstrapping CMake:
> > Problem while running initial CMake
> > -
> >
> > I know it's possible to overcome this problem by installing openssl and
> > telling cmake to use it, because it worked for me before.
> > I will try again to find how I did that.
> >
> > Best,
> >
> > Cédric
> >
> >
> >
> > - Mail original -
> >> De: "Gregor Jasny" 
> >> À: cmake@cmake.org, "cedric doucet" 
> >> Envoyé: Dimanche 15 Novembre 2015 15:25:37
> >> Objet: Re: [CMake] How to build cmake to have http support?
> >>
> >> Hello,
> >>
> >> On 14/11/15 20:23, Cedric Doucet wrote:
> >> > I managed to compile cmake such that it support https by the past, but I
> >> > can't remember how I did it.
> >> > I remember I installed openssl and pass some flags to cmake.
> >> >
> >> > Could anyone remember me how to do it?
> >>
> >> HTTPS support worked for me after passing --system-curl to configure.
> >>
> >> Thanks,
> >> Gregor
> >>
> > --
> >
> > 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] How to build cmake to have http support?

2015-11-15 Thread Nicholas Braden
Have you tried installing the required parts locally (e.g. in your
home directory) and just telling CMake to look there instead of the
default system locations?

On Sun, Nov 15, 2015 at 9:52 AM, Cedric Doucet  wrote:
>
> Thank you Gregor!
>
> As I feared, this solution does not work in my particular case.
> This is because something is missing in the system and I can't installed it 
> since I'm not an administrator of the cluster:
>
> -- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
> CMake Error at CMakeLists.txt:279 (message):
>   CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!
> Call Stack (most recent call first):
>   CMakeLists.txt:546 (CMAKE_BUILD_UTILITIES)
>
>
> -- Configuring incomplete, errors occurred!
> See also "/home/doucetc/logiciels/cmake-3.4.0/CMakeFiles/CMakeOutput.log".
> See also "/home/doucetc/logiciels/cmake-3.4.0/CMakeFiles/CMakeError.log".
> -
> Error when bootstrapping CMake:
> Problem while running initial CMake
> -
>
> I know it's possible to overcome this problem by installing openssl and 
> telling cmake to use it, because it worked for me before.
> I will try again to find how I did that.
>
> Best,
>
> Cédric
>
>
>
> - Mail original -
>> De: "Gregor Jasny" 
>> À: cmake@cmake.org, "cedric doucet" 
>> Envoyé: Dimanche 15 Novembre 2015 15:25:37
>> Objet: Re: [CMake] How to build cmake to have http support?
>>
>> Hello,
>>
>> On 14/11/15 20:23, Cedric Doucet wrote:
>> > I managed to compile cmake such that it support https by the past, but I
>> > can't remember how I did it.
>> > I remember I installed openssl and pass some flags to cmake.
>> >
>> > Could anyone remember me how to do it?
>>
>> HTTPS support worked for me after passing --system-curl to configure.
>>
>> Thanks,
>> Gregor
>>
> --
>
> 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] target_include_directories SYSTEM adds -isystem to Clang, but not GCC

2015-11-15 Thread digitalriptide
Did this fix make it into 3.4? After upgrading to 3.4, GCC still seems to
lack -isystem flags on OS X. Is there anything extra I need to do?

Thank you!!

On Thu, Aug 20, 2015 at 8:12 AM, Gregor Jasny  wrote:

> Hello,
>
> On 17/08/15 01:01, digitalriptide wrote:
>
>> When I add SYSTEM to target_include_directories, for example using
>> target_include_directories( my_target SYSTEM PUBLIC ${MY_LIBRARIES} )
>> in Clang, CMake prepends -isystem to the relavent -I/my/library/path
>> type flags. With GCC, however, I see no -isystem added.
>>
>> For reference, this is CMake 3.2.3 on OS X with Apple LLVM version 6.0
>> and GCC 5 provided via MacPorts.
>>
>> Should SYSTEM add -isystem with GCC?
>>
>
> this is a know bug: http://www.cmake.org/Bug/view.php?id=15687
>
> I plan to work on it during the next days so that it may be fixed with
> CMake 3.4.
>
> Thanks,
> Gregor
>
-- 

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 build cmake to have http support?

2015-11-15 Thread Cedric Doucet

Thank you Gregor!

As I feared, this solution does not work in my particular case.
This is because something is missing in the system and I can't installed it 
since I'm not an administrator of the cluster:

-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
CMake Error at CMakeLists.txt:279 (message):
  CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!
Call Stack (most recent call first):
  CMakeLists.txt:546 (CMAKE_BUILD_UTILITIES)


-- Configuring incomplete, errors occurred!
See also "/home/doucetc/logiciels/cmake-3.4.0/CMakeFiles/CMakeOutput.log".
See also "/home/doucetc/logiciels/cmake-3.4.0/CMakeFiles/CMakeError.log".
-
Error when bootstrapping CMake:
Problem while running initial CMake
-

I know it's possible to overcome this problem by installing openssl and telling 
cmake to use it, because it worked for me before.
I will try again to find how I did that.

Best,

Cédric



- Mail original -
> De: "Gregor Jasny" 
> À: cmake@cmake.org, "cedric doucet" 
> Envoyé: Dimanche 15 Novembre 2015 15:25:37
> Objet: Re: [CMake] How to build cmake to have http support?
> 
> Hello,
> 
> On 14/11/15 20:23, Cedric Doucet wrote:
> > I managed to compile cmake such that it support https by the past, but I
> > can't remember how I did it.
> > I remember I installed openssl and pass some flags to cmake.
> > 
> > Could anyone remember me how to do it?
> 
> HTTPS support worked for me after passing --system-curl to configure.
> 
> Thanks,
> Gregor
> 
-- 

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 build cmake to have http support?

2015-11-15 Thread Gregor Jasny
Hello,

On 14/11/15 20:23, Cedric Doucet wrote:
> I managed to compile cmake such that it support https by the past, but I 
> can't remember how I did it. 
> I remember I installed openssl and pass some flags to cmake. 
> 
> Could anyone remember me how to do it? 

HTTPS support worked for me after passing --system-curl to configure.

Thanks,
Gregor
-- 

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] Running a C source file through the pre-processor

2015-11-15 Thread Magnus Therning
I have a tool that, given a C source file, spits out some linker flags
that's necessary to link the file into the final target.  Now the C
source file has grown rather large and I'd like to split some of it into
a header file (those things are also useful in other files to reducing
duplication of code is another reason to do this).  This however means
that it's not enough to pass the C source file through the tool, I need
to pass the pre-processed source to the tool!

The question is then if I can do this easily in some way?

I was thinking of doing it manually so to speak, but then I quickly ran
into the problem of finding the effective CFLAGS used for a
source/target.

/M

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

Finagle's Sixth Law:
Don't believe in miracles -- rely on them.


signature.asc
Description: PGP signature
-- 

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