Re: [CMake] ExternalProject and redundant update/configure/compile actions.

2013-09-17 Thread Jean-Christophe Fillion-Robin
Hi David, I should have specify the context ... ..for example, in the case you change the SHA1 associated with your external project. If update is disabled, doing a full rebuild will take longer than simply doing an update + incremental build. Especially if other projects depend on the fully re

Re: [CMake] unset(PARENT_SCOPE)

2013-09-17 Thread Matthew Woehlke
On 2013-09-17 14:00, James Bigler wrote: If there is a set(PARENT_SCOPE) why isn't there an unset(PARENT_SCOPE)? It seems like a hole in the API. I noticed this when I was trying to update my push_variable/pop_variable functions. I use set(PARENT_SCOPE) to set the variable outside of the funct

[CMake] ExternalProject_Add - Automatic Incremental Rebuilds + Add Sources to IDE

2013-09-17 Thread Aaron Nowack
Hi, I am trying to figure out how to use externalproject_add to allow my work group to code more rapidly. We have a mercurial repository which builds a set of libraries, and a separate repository which contains applications that use those libraries. It is important for us to keep them separate. C

Re: [CMake] CMake 2.8.12-rc2 FindHDF5 issues

2013-09-17 Thread Orion Poplawski
On 09/16/2013 09:58 PM, clin...@elemtech.com wrote: Same here... and this looks like a regression: A simple CMakeLists.txt like this can reproduce it. set(CMAKE_BUILD_TYPE Debug) find_package(HDF5 COMPONENTS C HL REQUIRED) add_executable(foo foo.cpp) target_link_libraries(foo ${HDF5_LIBRARIES})

Re: [CMake] CMake 2.8.12-rc2 FindHDF5 issues

2013-09-17 Thread Clinton Stimpson
On Tuesday, September 17, 2013 04:01:30 PM Orion Poplawski wrote: > On 09/16/2013 09:58 PM, clin...@elemtech.com wrote: > > Same here... and this looks like a regression: > > > > A simple CMakeLists.txt like this can reproduce it. > > > > set(CMAKE_BUILD_TYPE Debug) > > find_package(HDF5 COMPONEN

Re: [CMake] ExternalProject and redundant update/configure/compile actions.

2013-09-17 Thread David Cole
Some background about the Slicer build system that inspired the NamicExternalProjects system discussed by Kent  ...  Before CMake 2.8.8, we disabled the UPDATE of external project because it was not working well with Visual Studio. While this was working as expected, the overall build time was al

Re: [CMake] ExternalProject and redundant update/configure/compile actions.

2013-09-17 Thread David Cole
OK, yeah, I know about disabling updates. Good. And all of the projects in our Super-Duper-build do get set to specific SVN/GIT/CVS tags. This is the only way to get predictable behavior. Also good. I agree wholeheartedly. And my reasoning was 'if you always request a specific ta

Re: [CMake] What is the prescribed way to link in dependencies for a static library

2013-09-17 Thread Orion Poplawski
On 09/17/2013 12:30 PM, Alexander Neundorf wrote: Yes. Similar to what FindPNG.cmake does, it searches libpng, then searches libz, and adds them both to the result variable. Alex But it should only do that when building statically. -- Orion Poplawski Technical Manager 303

[CMake] view CMake configuration without triggering reonfigure?

2013-09-17 Thread Matthew Woehlke
I find it convenient to view the current CMake configuration (e.g. install prefix, or to copy package locations from one build to another) using ccmake. However, any time I start ccmake, it causes the build to think that it needs to re-run cmake, even if I don't save (or even make!) changes.

Re: [CMake] What is the prescribed way to link in dependencies for a static library

2013-09-17 Thread Alexander Neundorf
On Tuesday 17 September 2013, James Bigler wrote: > On Tue, Sep 17, 2013 at 11:05 AM, Dan Kegel wrote: > > On Tue, Sep 17, 2013 at 9:41 AM, James Bigler > > > > wrote: > > > I have a static library I found using find_library. Typically with > > > > shared > > > > > libraries I just link again

[CMake] unset(PARENT_SCOPE)

2013-09-17 Thread James Bigler
If there is a set(PARENT_SCOPE) why isn't there an unset(PARENT_SCOPE)? It seems like a hole in the API. I noticed this when I was trying to update my push_variable/pop_variable functions. I use set(PARENT_SCOPE) to set the variable outside of the function, but when doing pop_variable I want to

Re: [CMake] What is the prescribed way to link in dependencies for a static library

2013-09-17 Thread James Bigler
On Tue, Sep 17, 2013 at 11:05 AM, Dan Kegel wrote: > On Tue, Sep 17, 2013 at 9:41 AM, James Bigler > wrote: > > I have a static library I found using find_library. Typically with > shared > > libraries I just link against the library and the dependencies come along > > for the ride. > > > > Wha

Re: [CMake] What is the prescribed way to link in dependencies for a static library

2013-09-17 Thread Dan Kegel
On Tue, Sep 17, 2013 at 9:41 AM, James Bigler wrote: > I have a static library I found using find_library. Typically with shared > libraries I just link against the library and the dependencies come along > for the ride. > > What is the prescribed way of doing this for static libraries? How stat

[CMake] What is the prescribed way to link in dependencies for a static library

2013-09-17 Thread James Bigler
I have a static library I found using find_library. Typically with shared libraries I just link against the library and the dependencies come along for the ride. What is the prescribed way of doing this for static libraries? I don't think I want to do create an imported target, as this isn't a t

[CMake] Documentation Web Page Titles

2013-09-17 Thread Stewart, Robert
The titles of the various documentation web pages are non-distinct. Compare http://www.cmake.org/cmake/help/v2.8.11/cmake.html and http://www.cmake.org/cmake/help/v2.8.11/cpack.html. Both have the same title, yet one's for CMake and the other for CPack. With multiple tabs open in a browser,

Re: [CMake] Set CMAKE__FLAGS_* and overriding

2013-09-17 Thread Williams, Norman K
It occurs to me that if your project requires C++11, you need something more flexible and intelligent. I don't remember what mailing list I saw it on (ITK?) but there is some discussion about detecting C++-11 and what the most portable way to do that is. You can check for specific compilers and se

Re: [CMake] Set CMAKE__FLAGS_* and overriding

2013-09-17 Thread Cristian Bidea
Hi David You have a number of options here: 1. You can pass the additional compile flag trough another variable instead of trying to override CMAKE_CXX_FLAGS. cmake .. -DFREEBSD_FLAG="-stdlib=libc++" ... then in CMakeLists.txt you can set the compile flags as follows: set (CMAKE_CXX_FLAGS "

[CMake] Set CMAKE__FLAGS_* and overriding

2013-09-17 Thread David Demelier
Hello, I'm writing a C++11 project. To enable C++11 it requires some switches, such as -std=c++11. So for the moment, I have in my CMakeLists.txt: set(CMAKE_CXX_FLAGS "-std=c++11") So with that, I'm sure that any build configuration will add this. However, with clang++, you need to pass an addi