Re: [CMake] Build, Make Install for multiple machines - Guidelines for Success

2016-06-07 Thread Roger Leigh

On 07/06/2016 12:10, B00083603 Michael O Brien wrote:

Hi all,

I have to build OpenCV on multiple machines and I was wondering if the
following was possible and advisable or should I use a different method?
I'm still learning about the cmake,make, make install way of software
installation

*Environment*

All the machines (vms) have access to the same shared storage and are
all are Ubuntu 14.04

*On vm1:* run "cmake" on the files stored on the shared storage with the
configuration I need then run "make -j$(nproc)" before using "make
install" to install OpenCV

*On vm 2 to vm n*: Can I just run make install (assuming all the
required software is already installed) or would I be advised to run
"cmake" and "make -j" commands again?


Also is there any issues (file locks for example) about running the
required commands in parallel on multple vms pointing to the same source
or would I be advised to run the commands in serial (vm by vm)?

Finally can I point "make install" to the directory where cmake created
the makefile (apologies if this isn't the correct term, but where cmake
did its work) so I can script the" make install" from outside the build
directory for a slightly cleaner script


So, I also use NFS (v4) mounted storage with all the sources on there, 
be it git repositories, unpacked source archives etc.  However, the 
difference is that I don't *build* on NFS.  I do it in /tmp, or some 
other local scratch space:


cd /tmp
mkdir build
cd build
cmake [options] /path/to/sources
make
[sudo] make install

This will have the following benefits:
- solves all your root-on-nfs permissions issues
- the builds will be vastly faster
- there won't be any timestamp clock skew issues to confound make
- there won't be any NFSv3 locking issues
- you can have a separate build tree per VM, so the source tree stays 
nice and pristine while you build on as many platforms as you desire; I 
do this with Linux, BSD and Windows VMs all building the same git repo 
branches


For the install, can't you just
  (cd "$builddir" && make install)
i.e. in a subshell?  Or
  cmake --build "$builddir" --target install
to be generator-agnostic?


Regards,
Roger
--

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] Freetype on linux systems in non-standard directories

2016-06-07 Thread Kristian
Hey Andreas,

thanks for your answer. Yes, that also works :)

2016-06-07 16:58 GMT-04:00 Andreas Naumann :

> Hey Kristian,
>
> as the documentation
> https://github.com/Kitware/CMake/blob/master/Modules/FindFreetype.cmake
> at line 21 states, FREETYPE_DIR is an environment variable.
> So, if you change your line
> set(FREETYPE_DIR "/home/kristian/Documents/freetype/freetype")
> to
> set(ENV{FREETYPE_DIR} "/home/kristian/Documents/freetype/freetype")
> I would assume, your script will work.
>
> Hth,
> Andreas
>
> Am 07.06.2016 um 22:47 schrieb Kristian:
>
>> Hey guys,
>>
>> I wanted to try something out with CMake and latest version of freetype
>> (2.6.3). So I downloaded freetype, compiled it with the commands
>>
>> > ./configure --prefix=/home/kristian/Documents/freetype/freetype
>> > make
>> > make install
>>
>> After that, I created a small C++-file and a CMakeLists.txt. The C++-file
>> depends on freetype, so my CMakeLists.txt looks like this:
>>
>> =
>>
>> > cmake_minimum_required(VERSION 3.5)
>> > project(freetype_ex)
>> >
>> > set(FREETYPE_DIR "/home/kristian/Documents/freetype/freetype")
>> > find_package(Freetype)
>> >
>> > set(SOURCES main.cpp)
>> >
>> > include_directories(${FREETYPE_INCLUDE_DIRS})
>> >
>> > add_executable(${PROJECT_NAME} ${SOURCES})
>> > target_link_libraries(${PROJECT_NAME} ${FREETYPE_LIBRARIES})
>>
>> =
>>
>> But when calling cmake, I am getting this error:
>> =
>>
>> > -- Could NOT find Freetype (missing: FREETYPE_LIBRARY
>> FREETYPE_INCLUDE_DIRS)
>> > CMake Error: The following variables are used in this project, but they
>> are set to NOTFOUND.
>> > Please set them or make sure they are set and tested correctly in the
>> CMake files:
>> > FREETYPE_LIBRARY (ADVANCED)
>> > linked by target "freetype_ex" in directory
>> /home/kristian/Documents/freetype/cmake
>> >
>> > -- Configuring incomplete, errors occurred!
>> > See also
>> "/home/kristian/Documents/freetype/cmake/CMakeFiles/CMakeOutput.log".
>>
>> =
>>
>> This sort of error seems for me to be a bug, because I would assume, that
>> when I set the variable FREETYPE_DIR, then CMake would also look at this
>> dir.
>>
>> I looked at the FindFreetype.cmake file (
>> https://github.com/Kitware/CMake/blob/master/Modules/FindFreetype.cmake)
>> and my first assumption is, that it would help, to add something like
>> ${FREETYPE_DIR} the the find_path calls.
>>
>> What do you think of this? Another idea is, to add another variable
>> instead of FREETYPE_DIR, e.g. FREETYPE_ROOT_DIR...
>>
>>
>>
> --
>
> 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] Get ctest -S script to pull from git branch other than 'master'?

2016-06-07 Thread Bartlett, Roscoe A
Hello,

Is there a built-in way to get a ctest -S script to checkout and pull from a 
git branch other than 'master'?  I can't seem to find a way to so this and 
there is no mention of branches at all in the official documentation:


https://cmake.org/cmake/help/v3.6/command/ctest_update.html?highlight=ctest_update

and there is no mention of "branch" at:

https://cmake.org/Wiki/CMake/Testing_With_CTest

Currently, I see code that people have written which is explicitly checking out 
and updating the desired branch after ctest_update() is called (e.g. this what 
TribitsCTestDriverCore.cmake does).  Therefore, this CTest code is really just 
using ctest_update() to do a `git fetch` on the external repo.  In this case, 
if the local branch is changed to a tracking branch, then will ctest_update() 
leave that tracking branch as is and just pull from the tracking branch the 
next time the ctest -S script is called?  If that is the case, then I would 
expect CTest to report the correct list of "updated files".  But if 
ctest_update() instead switches back to the 'master' branch and then does the 
pull, then it will likely report the wrong list of "updated files".

I can dig into the source code for CTest to see what it actually does but it 
would be nice to have direct support for choosing the branch or at the very 
least just documenting the current behavior and describe the best way to work 
around the issue.

Thanks,

-Ross


Dr. Roscoe A. Bartlett, PhD
Sandia National Laboratories
Trilinos Software Engineering and Integration Technologies Lead
Consortium for the Advanced Simulation of Light Water Reactors (CASL) Physics 
Integration Infrastructure Lead

-- 

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] Freetype on linux systems in non-standard directories

2016-06-07 Thread Andreas Naumann

Hey Kristian,

as the documentation 
https://github.com/Kitware/CMake/blob/master/Modules/FindFreetype.cmake 
at line 21 states, FREETYPE_DIR is an environment variable.

So, if you change your line
set(FREETYPE_DIR "/home/kristian/Documents/freetype/freetype")
to
set(ENV{FREETYPE_DIR} "/home/kristian/Documents/freetype/freetype")
I would assume, your script will work.

Hth,
Andreas

Am 07.06.2016 um 22:47 schrieb Kristian:

Hey guys,

I wanted to try something out with CMake and latest version of 
freetype (2.6.3). So I downloaded freetype, compiled it with the commands


> ./configure --prefix=/home/kristian/Documents/freetype/freetype
> make
> make install

After that, I created a small C++-file and a CMakeLists.txt. The 
C++-file depends on freetype, so my CMakeLists.txt looks like this:


=

> cmake_minimum_required(VERSION 3.5)
> project(freetype_ex)
>
> set(FREETYPE_DIR "/home/kristian/Documents/freetype/freetype")
> find_package(Freetype)
>
> set(SOURCES main.cpp)
>
> include_directories(${FREETYPE_INCLUDE_DIRS})
>
> add_executable(${PROJECT_NAME} ${SOURCES})
> target_link_libraries(${PROJECT_NAME} ${FREETYPE_LIBRARIES})

=

But when calling cmake, I am getting this error:
=

> -- Could NOT find Freetype (missing: FREETYPE_LIBRARY 
FREETYPE_INCLUDE_DIRS)
> CMake Error: The following variables are used in this project, but 
they are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in 
the CMake files:

> FREETYPE_LIBRARY (ADVANCED)
> linked by target "freetype_ex" in directory 
/home/kristian/Documents/freetype/cmake

>
> -- Configuring incomplete, errors occurred!
> See also 
"/home/kristian/Documents/freetype/cmake/CMakeFiles/CMakeOutput.log".


=

This sort of error seems for me to be a bug, because I would assume, 
that when I set the variable FREETYPE_DIR, then CMake would also look 
at this dir.


I looked at the FindFreetype.cmake file 
(https://github.com/Kitware/CMake/blob/master/Modules/FindFreetype.cmake) 
and my first assumption is, that it would help, to add something like 
${FREETYPE_DIR} the the find_path calls.


What do you think of this? Another idea is, to add another variable 
instead of FREETYPE_DIR, e.g. FREETYPE_ROOT_DIR...





--

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] Freetype on linux systems in non-standard directories

2016-06-07 Thread Rolf Eike Beer
Am Dienstag, 7. Juni 2016, 16:47:42 schrieb Kristian:
> Hey guys,
> 
> I wanted to try something out with CMake and latest version of freetype
> (2.6.3). So I downloaded freetype, compiled it with the commands
> 
> > ./configure --prefix=/home/kristian/Documents/freetype/freetype
> > make
> > make install

[…]

> What do you think of this? Another idea is, to add another variable instead
> of FREETYPE_DIR, e.g. FREETYPE_ROOT_DIR...

That variable is called CMAKE_PREFIX_PATH and already exists.

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] Freetype on linux systems in non-standard directories

2016-06-07 Thread Kristian
Hey guys,

I wanted to try something out with CMake and latest version of freetype
(2.6.3). So I downloaded freetype, compiled it with the commands

> ./configure --prefix=/home/kristian/Documents/freetype/freetype
> make
> make install

After that, I created a small C++-file and a CMakeLists.txt. The C++-file
depends on freetype, so my CMakeLists.txt looks like this:

=

> cmake_minimum_required(VERSION 3.5)
> project(freetype_ex)
>
> set(FREETYPE_DIR "/home/kristian/Documents/freetype/freetype")
> find_package(Freetype)
>
> set(SOURCES main.cpp)
>
> include_directories(${FREETYPE_INCLUDE_DIRS})
>
> add_executable(${PROJECT_NAME} ${SOURCES})
> target_link_libraries(${PROJECT_NAME} ${FREETYPE_LIBRARIES})

=

But when calling cmake, I am getting this error:
=

> -- Could NOT find Freetype (missing:  FREETYPE_LIBRARY
FREETYPE_INCLUDE_DIRS)
> CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the
CMake files:
> FREETYPE_LIBRARY (ADVANCED)
> linked by target "freetype_ex" in directory
/home/kristian/Documents/freetype/cmake
>
> -- Configuring incomplete, errors occurred!
> See also
"/home/kristian/Documents/freetype/cmake/CMakeFiles/CMakeOutput.log".

=

This sort of error seems for me to be a bug, because I would assume, that
when I set the variable FREETYPE_DIR, then CMake would also look at this
dir.

I looked at the FindFreetype.cmake file (
https://github.com/Kitware/CMake/blob/master/Modules/FindFreetype.cmake)
and my first assumption is, that it would help, to add something like
${FREETYPE_DIR} the the find_path calls.

What do you think of this? Another idea is, to add another variable instead
of FREETYPE_DIR, e.g. FREETYPE_ROOT_DIR...
-- 

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 do you handle recursive dependencies in CMake

2016-06-07 Thread Baars, S.
Hey everyone,

I posted a question on StackOverflow a while ago, but got no real answer
to my question there. I posted an answer there by myself, but this
solution does not work on every system. Since it also involves some
possible inconsistencies in the CMake documentation, I decided to ask
the question here as well.

Say I have packages A, B, and C. Package B uses package A and package C
uses package B. I create shared libraries.

So in package B I do something like

find_package(A)
...
if(${A_FOUND})
target_link_libraries(B ${A_LIBRARIES})
endif()

and in package C I do

find_package(B)
...
if(${B_FOUND})
target_link_libraries(C ${B_LIBRARIES})
endif()

add_executable(main main.cpp)
target_link_libraries(main C)

where ${B_LIBRARIES} contains only B. The compiler will now complain

/usr/bin/ld: cannot find -lA
collect2: error: ld returned 1 exit status

as long as A is installed in a place that is not in the default
directories. I was wondering what is the correct way of handling this.
For me using find_package(A) in C (which would work) doesn't seem to be
the nice. For me especially, because I don't know in advance if B
depends on A or not. It might also depend on a different package.

According to the documentation

https://cmake.org/cmake/help/v3.0/command/link_directories.html

"Library locations returned by find_package() and find_library() are
absolute paths.". This is true for system libraries like
/usr/lib/libmpi.so. However, this seems not to be true for most other
packages that I use. A reason for this might be that I use the
FooBarConfig.cmake file for finding the package (not a FindFooBar.cmake
file, since that's not always available). I myself create those
following this example:

https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file

Here we have the line

set(FOOBAR_LIBRARIES foo)

which in the end will not use absolute paths. You can, however, use this
file for the find_package function, so according to the documentation it
should return absolute paths, which it apparently does not. So this
results in the error I described above when I compile C (where it links
to -lA instead of /custompath/A.so). So what is the correct way of
handling this?

Thanks in advance and best regards,
Sven
-- 

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] Problem building CMake with system OPENSSL

2016-06-07 Thread Brad King
On 06/07/2016 04:00 PM, Kristian wrote:
> What's the meaning of the bootstrap executable? I thought, when
> compiling CMake, it is sufficient to call ./configure and then make...

The bootstrap script is the way to bootstrap CMake.  The `configure`
script is just a thin wrapper around `bootstrap` for those that expect
`./configure` to work.

-Brad

-- 

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] Problem building CMake with system OPENSSL

2016-06-07 Thread Kristian
What's the meaning of the bootstrap executable? I thought, when compiling
CMake, it is sufficient to call ./configure and then make...



2016-06-07 15:13 GMT-04:00 Brad King :

> On 06/07/2016 10:58 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote:
> > I tried out the 3.6.0-rc1 and my problem building CMake still exists.
>
> Thanks for testing it.
>
> > (cd /tmp/cmake-build && \
> > ../cmake-3.6.0-rc1/bootstrap && \
> > make -j 10 && \
> > ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release
> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl  . && \
> > make -j${NPROC} && \
> > make install)
>
> That script causes CMake to be configured with itself the second time
> instead of the bootstrap script.  You should be able to pass the config
> options directly to bootstrap:
>
>   ../cmake-3.6.0-rc1/bootstrap --parallel=${NPROC} -- \
> -DCMAKE_BUILD_TYPE:STRING=Release \
> -DCMAKE_USE_OPENSSL:BOOL=ON \
> -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl &&
>   make -j ${NPROC} &&
>   make install
>
> > In file included from
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c:58:0:
> >
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
> fatal error: openssl/evp.h: No such file or directory
>
> This should fix it:
>
>  libarchive: Restore OpenSSL include directory from upstream
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbc9f73d
>
> I've queued this for merge to 'release' for 3.6.0-rc2.
>
> -Brad K
>
> --
>
> 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] Problem building CMake with system OPENSSL

2016-06-07 Thread Brad King
On 06/07/2016 10:58 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote:
> I tried out the 3.6.0-rc1 and my problem building CMake still exists.

Thanks for testing it.

> (cd /tmp/cmake-build && \
> ../cmake-3.6.0-rc1/bootstrap && \
> make -j 10 && \
> ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release 
> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl  . && \
> make -j${NPROC} && \
> make install)

That script causes CMake to be configured with itself the second time
instead of the bootstrap script.  You should be able to pass the config
options directly to bootstrap:

  ../cmake-3.6.0-rc1/bootstrap --parallel=${NPROC} -- \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_USE_OPENSSL:BOOL=ON \
-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl &&
  make -j ${NPROC} &&
  make install

> In file included from 
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c:58:0:
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
>  fatal error: openssl/evp.h: No such file or directory

This should fix it:

 libarchive: Restore OpenSSL include directory from upstream
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbc9f73d

I've queued this for merge to 'release' for 3.6.0-rc2.

-Brad K

-- 

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] cpack ppc64le rhel7.2 CPACK_RPM_PACKAGE_ARCHITECTURE

2016-06-07 Thread M Kelly
Hi,

I am working on an IBM Power8 RHEL7.2 system and we installed cmake 3.6
(default cmake from repo was 2.8.12?) but it seems when making a package
the arch is set incorrectly to x86_64 instead of ppc64le.

Anyone have a clue if this cpack on this dist could get its arch wrong ?
cmake 3.5.1 on Ubuntu works perfectly.

cmake --system-information does print the correct arch, so this happens only 
during rpm building.

thank you,
mark


-- 

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] Problem building CMake with system OPENSSL

2016-06-07 Thread Lowekamp, Bradley (NIH/NLM/LHC) [C]
Hello,


I tried out the 3.6.0-rc1 and my problem building CMake still exists.

I created a Dockerfile to reproduce my problem:

===Dockerfile===

ROM debian:8
MAINTAINER Bradley Lowekamp 

RUN apt-get update && apt-get install -y \
  build-essential \
  curl \
  libncurses-dev \
  emacs

# Install the latest CMake release
WORKDIR /tmp/
ADD  https://www.openssl.org/source/openssl-1.0.2h.tar.gz \
 https://cmake.org/files/v3.6/cmake-3.6.0-rc1.tar.gz /tmp/

RUN tar zxvf openssl-1.0.2h.tar.gz && \
( cd openssl-1.0.2h && \
./config no-ssl2 no-shared -fPIC --prefix=/usr/local/ssl && \
make install ) && \
rm -rf openssl-1.0.2h

RUN tar xvzf cmake-3.6.0-rc1.tar.gz && \
mkdir /tmp/cmake-build && \
(cd /tmp/cmake-build && \
../cmake-3.6.0-rc1/bootstrap && \
make -j 10 && \
./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release 
-DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl  . && \
make -j${NPROC} && \
make install)


CMD ["/bin/bash”]

Build Error:

In file included from 
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c:58:0:
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
 fatal error: openssl/evp.h: No such file or directory
 #include 
 ^
compilation terminated.
In file included from 
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_write_set_format_zip.c:52:0:
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
 fatal error: openssl/evp.h: No such file or directory
 #include 
 ^
compilation terminated.


Thanks for the help!
Brad

> On Jun 6, 2016, at 8:52 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] 
>  wrote:
> 
> Hi,
> 
> Just to clarify this is a problem building CMake itself not a project with 
> CMake.
> 
> Brad
> 
>> On Jun 5, 2016, at 1:49 PM, Kristian  wrote:
>> 
>> Maybe you should add something like
>> 
>>> include_directories(${OPENSSL_INCLUDE_DIR})
>> 
>> to your CMakeLists.txt ?
>> 
>> 2016-06-03 10:27 GMT-04:00 Lowekamp, Bradley (NIH/NLM/LHC) [C]
>> :
>>> Hello,
>>> 
>>> I am trying to build CMake on an old system with a new version of openssl.
>>> My build script was working with CMake 3.4 but is not working with 3.5.2 or
>>> current master. Here is how I am building cmake:
>>> 
>>> 
>>> cd /tmp/cmake-build &&
>>>   ../${CMAKE_ROOT}/bootstrap &&
>>>   make -j ${NPROC} &&
>>>   ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release
>>> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl
>>> -DCMAKE_USE_SYSTEM_CURL:BOOL=OFF  . &&
>>>   make -j${NPROC}
>>> 
>>> ERROR MESSAGE:
>>> 41%] Building C object
>>> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
>>> cd /tmp/cmake-build/Utilities/cmlibarchive/libarchive &&
>>> /opt/rh/devtoolset-2/root/usr/bin/gcc  -DCURL_STATICLIB -DHAVE_CONFIG_H
>>> -DLIBARCHIVE_STATIC -DLZMA_API_STATIC
>>> -I/tmp/cmake/Utilities/cmlibarchive/libarchive
>>> -I/tmp/cmake-build/Utilities/cmlibarchive -I/tmp/cmake-build/Utilities
>>> -I/tmp/cmake/Utilities -I/tmp/cmake/Utilities/cmbzip2
>>> -I/tmp/cmake/Utilities/cmliblzma/liblzma/api  -w -O3 -DNDEBUG   -std=gnu99
>>> -o CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o   -c
>>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c
>>> In file included from
>>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
>>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
>>> fatal error: openssl/evp.h: No such file or directory
>>> #include 
>>> 
>>> My work around it just to add "-I/usr/local/ssl/include/“ to the
>>> CMAKE_C_FLAGS.
>>> 
>>> 
>>> Thanks!
>>> Brad
>>> 
>>> --
>>> 
>>> 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/opensour

[CMake] Build, Make Install for multiple machines - Guidelines for Success

2016-06-07 Thread B00083603 Michael O Brien
Hi all,


I have to build OpenCV on multiple machines and I was wondering if the 
following was possible and advisable or should I use a different method? I'm 
still learning about the cmake,make, make install way of software installation


Environment

All the machines (vms) have access to the same shared storage and are all are 
Ubuntu 14.04

On vm1: run "cmake" on the files stored on the shared storage with the 
configuration I need then run "make -j$(nproc)" before using "make install" to 
install OpenCV

On vm 2 to vm n: Can I just run make install (assuming all the required 
software is already installed) or would I be advised to run "cmake" and "make 
-j" commands again?


Also is there any issues (file locks for example) about running the required 
commands in parallel on multple vms pointing to the same source or would I be 
advised to run the commands in serial (vm by vm)?


Finally can I point "make install" to the directory where cmake created the 
makefile (apologies if this isn't the correct term, but where cmake did its 
work) so I can script the" make install" from outside the build directory for a 
slightly cleaner script


Michael


ITB Email Disclaimer This is a confidential communication and is intended only 
for the addressee indicated in the message (or duly authorised to be 
responsible for the delivery of the message to such person). You are 
specifically prohibited from copying this message or delivering the same, or 
any part thereof, to any other person, whomsoever or howsoever, unless you 
receive written authorisation from us to do. If you are anyone other than the 
intended addressee, or person duly authorised and responsible for the delivery 
of this message to the intended addressee, you should destroy this message and 
notify us immediately.
-- 

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] Build a program and get its output during "cmake" run

2016-06-07 Thread Yaron Cohen-Tal
For some reason I was looking for it in the cmake modules, where
"CHECK_CXX_SOURCE_RUNS" was..

Thanx!

On Tue, Jun 7, 2016 at 10:23 AM, Petr Kmoch  wrote:

> Hi Yaron,
>
> I believe you're looking for CMake's try_run() command:
> https://cmake.org/cmake/help/latest/command/try_run.html
>
> Petr
>
> On 7 June 2016 at 09:15, Yaron Cohen-Tal  wrote:
>
>> Hi,
>>
>> I'd like to build a C++ program and get its output during "cmake" run,
>> not during the project build. "CHECK_CXX_SOURCE_RUNS" only gives me the
>> exit code, but I need the output from the program. Anyway to do it?
>>
>> Thanx,
>> Yaron
>>
>> --
>>
>> 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] Build a program and get its output during "cmake" run

2016-06-07 Thread Petr Kmoch
Hi Yaron,

I believe you're looking for CMake's try_run() command:
https://cmake.org/cmake/help/latest/command/try_run.html

Petr

On 7 June 2016 at 09:15, Yaron Cohen-Tal  wrote:

> Hi,
>
> I'd like to build a C++ program and get its output during "cmake" run, not
> during the project build. "CHECK_CXX_SOURCE_RUNS" only gives me the exit
> code, but I need the output from the program. Anyway to do it?
>
> Thanx,
> Yaron
>
> --
>
> 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] Build a program and get its output during "cmake" run

2016-06-07 Thread Yaron Cohen-Tal
Hi,

I'd like to build a C++ program and get its output during "cmake" run, not
during the project build. "CHECK_CXX_SOURCE_RUNS" only gives me the exit
code, but I need the output from the program. Anyway to do it?

Thanx,
Yaron
-- 

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