Re: [CMake] Question regarding External Project add and VTK

2014-08-08 Thread jmerkow
Ahh,  I believe I answered my own question.
There seems to be a new function, ExternalProject_Install_CMake,  Im
testing it out now.

Thanks!
-Jameson


On Thu, Aug 7, 2014 at 2:19 PM, jmerkow [via CMake] <
ml-node+s3232098n7588095...@n2.nabble.com> wrote:

> Jc,
>
> I guess I spoke too soon on my 'last question.'  How does make install
> work with this superbuild system.
> Looking at slicer and ctk, they seem to set INSTALL_COMMAND to "" in their
> superbuild.cmake, but presumably these packages still install even with
> superbuild mode on.
>
> Can you offer any advice?
>
> -Jameson
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7588095.html
>  To unsubscribe from Question regarding External Project add and VTK, click
> here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7588100.html
Sent from the CMake mailing list archive at Nabble.com.-- 

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] Question regarding External Project add and VTK

2014-08-07 Thread jmerkow
Jc,

I guess I spoke too soon on my 'last question.'  How does make install work
with this superbuild system.
Looking at slicer and ctk, they seem to set INSTALL_COMMAND to "" in their
superbuild.cmake, but presumably these packages still install even with
superbuild mode on.

Can you offer any advice?

-Jameson




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7588095.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] Question regarding External Project add and VTK

2014-06-19 Thread jmerkow
Jc,

Thank you!  This is what Im looking for.  I've been having some trouble with
these paths in other places too ([1]), but haven't had the time to go back
and redo it.

-Jameson

[1]
http://cmake.3232098.n2.nabble.com/CMAKE-RUNTIME-OUTPUT-DIRECTORY-inconsistent-between-make-and-Xcode-td7586922.html#a7586940



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587722.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] Question regarding External Project add and VTK

2014-06-19 Thread Jean-Christophe Fillion-Robin
Hi Jameson,

There is indeed a recipe, assuming you are using
ExternalProjectDependency.cmake from Artichoke [1], if you pass the
variable to your project using ${CMAKE_CFG_INTDIR} it will be automatically
passed as CMAKE_ARGS (instead of CMAKE_CACHE_ARGS) to external project and
it will be expended appropriately at build time.

For example, see [2] and [3]

For reference, consider also reading [4]

Let me know if you would like me to clarify,
Jc

[1] https://github.com/commontk/Artichoke
[2]
https://github.com/Slicer/Slicer/blob/57f14d0d233ee103e365161cfc0b3962df0bc203/SuperBuild/External_OpenSSL.cmake#L152
[3]
https://github.com/Slicer/Slicer/blob/50281153c57c683106498295ea82472eaa20eee4/SuperBuild/External_VTKv5.cmake#L132
[4]
http://www.cmake.org/cmake/help/git-master/variable/CMAKE_CFG_INTDIR.html


On Sun, Jun 15, 2014 at 1:01 PM, jmerkow  wrote:

> Ok I have one final question.
>
> One of the project is built using CMake but does not contain a config file.
> On unix systems (make file based generators) it works fantastic, but with
> windows (and I presume xcode), the libraries are output to the buildtype
> directory.  i.e. Debug/ or Release/. I can add some find_library logic to
> its externalproject file, and search all the possible build type
> directories.
> But it occurs to me that there might be a recipe for this.
>
> Any advice?
>
> -Jameson
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587690.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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
>



-- 
+1 919 869 8849
-- 

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] Question regarding External Project add and VTK

2014-06-15 Thread jmerkow
Ok I have one final question.

One of the project is built using CMake but does not contain a config file. 
On unix systems (make file based generators) it works fantastic, but with
windows (and I presume xcode), the libraries are output to the buildtype
directory.  i.e. Debug/ or Release/. I can add some find_library logic to
its externalproject file, and search all the possible build type
directories.  
But it occurs to me that there might be a recipe for this.

Any advice?

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587690.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] Question regarding External Project add and VTK

2014-06-09 Thread Jameson Merkow
Jc,


I'm working on an open source project, but we're no quite ready to release it 
to the world yet.  We will likely post it on github or another hosting website 
(publicly) in the coming months and I'll be sure to let you know. We are 
looking at an early fall release date. 





Jameson
—
Sent from Mailbox

On Mon, Jun 9, 2014 at 12:00 AM, Jean-Christophe Fillion-Robin
 wrote:

> Hi Jameson,
> Glad to know you sorted out the issue.
> By any chance, do you think you could share a link to a github repository
> with your project ? That would allow us to review how you integrated
> "ExternalProjectDependency" and improve it.
> Thanks
> Jc
> On Sun, Jun 8, 2014 at 9:39 PM, jmerkow  wrote:
>> Ok, So I've converted my project to a super build system with
>> ExternalProjectDependency.  I ended up going through and re writing most of
>> my project (most of it was written while I was learning CMake and was
>> pretty
>> ugly). It is extremely useful.  It seems that superbuilds are very popular,
>> it seems like a great addition to the general CMake project.
>> If it gets popular enough, it may be worth it to replace the
>> ExternalProject_Add function when referring to the normal project, since
>> its
>> not truly a external project.
>>
>> Anyway, once you get the hang of the double loop, it works fantastic
>>
>> Jameson
>>
>>
>>
>> --
>> View this message in context:
>> http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587601.html
>> Sent from the CMake mailing list archive at Nabble.com.
>> --
>>
>> 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
>>
> -- 
> +1 919 869 8849-- 

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] Question regarding External Project add and VTK

2014-06-09 Thread Jean-Christophe Fillion-Robin
Hi Jameson,

Glad to know you sorted out the issue.

By any chance, do you think you could share a link to a github repository
with your project ? That would allow us to review how you integrated
"ExternalProjectDependency" and improve it.

Thanks
Jc


On Sun, Jun 8, 2014 at 9:39 PM, jmerkow  wrote:

> Ok, So I've converted my project to a super build system with
> ExternalProjectDependency.  I ended up going through and re writing most of
> my project (most of it was written while I was learning CMake and was
> pretty
> ugly). It is extremely useful.  It seems that superbuilds are very popular,
> it seems like a great addition to the general CMake project.
> If it gets popular enough, it may be worth it to replace the
> ExternalProject_Add function when referring to the normal project, since
> its
> not truly a external project.
>
> Anyway, once you get the hang of the double loop, it works fantastic
>
> Jameson
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587601.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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
>



-- 
+1 919 869 8849
-- 

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] Question regarding External Project add and VTK

2014-06-08 Thread jmerkow
Ok, So I've converted my project to a super build system with
ExternalProjectDependency.  I ended up going through and re writing most of
my project (most of it was written while I was learning CMake and was pretty
ugly). It is extremely useful.  It seems that superbuilds are very popular,
it seems like a great addition to the general CMake project. 
If it gets popular enough, it may be worth it to replace the
ExternalProject_Add function when referring to the normal project, since its
not truly a external project. 

Anyway, once you get the hang of the double loop, it works fantastic

Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587601.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] Question regarding External Project add and VTK

2014-06-04 Thread David Cole

P.S. I'm thinking we may want to move this off the CMake mailing list?


Some of us are lurking and reading this thread with interest... It 
would be ok to keep it on the CMake mailing list unless it goes on an 
entirely non-ExternalProject tangent. :-)



David C.

--

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] Question regarding External Project add and VTK

2014-06-03 Thread jmerkow
Jc,


Im been updating my CMakeLists.txt to do this superbuild.  But I am running
into an error.  Im not sure why...

My project is something like the following:

cmake_minimum_required(VERSION 2.8.8)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" 
  
"${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild" 
   "${CMAKE_MODULE_PATH}")  
   
set(EXTERNAL_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CMakeExternals)
set(EXTERNAL_PROJECT_FILE_PREFIX "")
include(ExternalProject)
include(ExternalProjectDependency)
project(myproj)
option(SuperBuild_${PROJECT_NAME} 
"Build ${PROJECT_NAME} and the projects it depends on.
This must be turn on if your wish to download any packages." ON)



ExternalProject_Include_Dependencies(${PROJECT_NAME} PROJECT_VAR
PROJECT_NAME)
if(SuperBuild_${PROJECT_NAME})  
  include(Superbuild)
  RETURN()
endif()

SuperBuild/Superbuild.cmake:
set(${PROJECT_NAME}_DEPENDS "")
set(${PROJECT_NAME}_DEPENDS ${${PROJECT_NAME}_DEPENDS} VTK)
set(proj ${PROJECT_NAME})

ExternalProject_Add(${proj}
  ${${proj}_EP_ARGS}
  DEPENDS ${${PROJECT_NAME}_DEPENDS}
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
  BINARY_DIR ${SimVascular_BINARY_DIR}
  DOWNLOAD_COMMAND ""
  UPDATE_COMMAND ""
  CMAKE_CACHE_ARGS
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
-DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
-DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
-DSuperBuild_${PROJECT_NAME}:BOOL=OFF
${EXTERNAL_PROJECT_OPTIONAL_ARGS}
  INSTALL_COMMAND ""
  )


and CMakeExternals/VTK.cmake is basically a copy of [1], with proj set to
VTK, and all slicer references removed.

I am getting this error:
CMake Error at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:1580
(get_property):
  get_property could not find TARGET VTK.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/ExternalProject.cmake:1808
(_ep_add_configure_command)
  SuperBuild/Superbuild.cmake:51 (ExternalProject_Add)
  CMakeLists.txt:659 (include)

Im not sure whats going wrong, it seems like it should pick up my VTK.cmake
in the CMakeExternals directory automatically, correct?

Thanks a lot for your help!
-Jameson

P.S. I'm thinking we may want to move this off the CMake mailing list?

[1]
https://github.com/Slicer/Slicer/blob/master/SuperBuild/External_VTKv6.cmake




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587571.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] Question regarding External Project add and VTK

2014-06-02 Thread Jean-Christophe Fillion-Robin
Hi Jameson,

That is indeed the idea.


To clarify even further,

1) the call to

   ExternalProject_Include_Dependencies [1]

should be added before "ExternalProject_Add".  It  will recursively include
the needed dependencies.


2) By simply adding an additional parameter:

by default ${_EP_ARGS}

to ExternalProject_Add, the required argument will be automatically set.
These includes CMAKE_CACHE_ARGS, CMAKE_ARGS, CMAKE_GENERATOR,
LIST_SEPARATOR. See [2] for an example. Note that doesn't prevent you to
explicitly pass additional CMAKE(_CACHE)_ARGS.


3) The name of the variable  to pass to ExternalProject_Add can explicitly
be specified by passing the EP_ARGS_VAR variable. See [3] for full
signature.


4) Using this module implies that each external project will be specified
in a separate file. This is currently needed because the "return()" command
is called in case the external project has already been included by an
other project.


5) To debug, it is possible to uncomment line referenced in [4]


6) The yet to be integrated module "ExternalProjectForNonCMakeProject"
could also be useful. See [5]


7) Finally, the best way to contribute, propose API change to support more
use case or ask question is pull requests :) The list issue is available
here: https://github.com/commontk/Artichoke/issues

Hth
Jc

[1]
https://github.com/Slicer/Slicer/blob/45bba0632e37239be3ae3d2ca4b5cf0833dbe4fc/SuperBuild/External_VTKv6.cmake#L11

[2]
https://github.com/Slicer/Slicer/blob/45bba0632e37239be3ae3d2ca4b5cf0833dbe4fc/SuperBuild/External_VTKv6.cmake#L100

[3]
http://cmake-artichoke.readthedocs.org/en/latest/ExternalProjectDependency.html#function:ExternalProject_Include_Dependencies

[4]
https://github.com/commontk/Artichoke/blob/b0cf6fc85d5a490dc5a10a8f4a319678151722d2/ExternalProjectDependency.cmake#L671-675

[5] https://github.com/commontk/Artichoke/issues/7


On Tue, Jun 3, 2014 at 1:49 AM, jmerkow  wrote:

> Jc,
>
> Thanks a lot this may be exactly what I am looking for.
>
> Basically I include ExternalProjectDependency in my project, then
> mark_as_superbuild() options/vars that I want to pass back to the 'normal'
> build.  Add the external project with 'CMAKE_CACHE_ARGS' and this will pass
> those variables to the build (assuming that it has the same name).  Then as
> long as a lib is contained in '${${PROJECT_NAME}_DEPENDS}' it will be
> loaded
> from the Externals dir (set(EXTERNAL_PROJECT_DIR
> ${CMAKE_CURRENT_SOURCE_DIR}/TheExternals)), similar to the FindPackage(lib)
> mechanic.
> Does this sum it up?
>
> I've added a few mark_as_superbuild to my project is there an easy way to
> list out what variables will me passed?
>

See remark (5) above.


>
> -Jameson
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587563.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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
>



-- 
+1 919 869 8849
-- 

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] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
Jc,

Thanks a lot this may be exactly what I am looking for. 

Basically I include ExternalProjectDependency in my project, then
mark_as_superbuild() options/vars that I want to pass back to the 'normal'
build.  Add the external project with 'CMAKE_CACHE_ARGS' and this will pass
those variables to the build (assuming that it has the same name).  Then as
long as a lib is contained in '${${PROJECT_NAME}_DEPENDS}' it will be loaded
from the Externals dir (set(EXTERNAL_PROJECT_DIR
${CMAKE_CURRENT_SOURCE_DIR}/TheExternals)), similar to the FindPackage(lib)
mechanic.  
Does this sum it up? 

I've added a few mark_as_superbuild to my project is there an easy way to
list out what variables will me passed?

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587563.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] Question regarding External Project add and VTK

2014-06-02 Thread Jean-Christophe Fillion-Robin
Hi Jameson,

To specifically address the issue you described, I started to develop an
(experimental) module extending ExternalProject and providing some
convenience function.

Documentation is far from being perfect but looking at

  (1) the tests: https://github.com/commontk/Artichoke/tree/master/Tests
  (2) the "to be extended/improved" documentation:
http://cmake-artichoke.readthedocs.org/en/latest/
  (3) example of usage in 3DSlicer: https://github.com/Slicer/Slicer

... you should be able to get the idea.


It basically provide to convenience function:

  make_as_superbuild

  ExternalProject_Include_Dependencies

allowing to

automatically generate the value to pass to either CMAKE_CACHE_ARGS
(or CMAKE_ARGS if needed)



Ultimately, if the module API stabilizes and turns out to be of general
use, it could be integrate into CMake ...

Hth
Jc



On Mon, Jun 2, 2014 at 9:00 PM, jmerkow  wrote:

> I see, that makes a lot of sense.   And in order to pass options from the
> 'superbuild' build to the 'normal' build you make them options as command
> line args in your ExternalProhect_Add command?  i.e.:
>
> set( proj my_prog )
>   ExternalProject_Add( ${proj}
> DOWNLOAD_COMMAND ""
> SOURCE_DIR "${${proj}_Source_Dir}"
> BINARY_DIR "${${proj}_Binary_Dir}"
> CMAKE_GENERATOR ${gen}
> CMAKE_ARGS
> -D${proj}_option1:BOOL=${proj}_option1
> -D${proj}_some_LIBRARY:FILEPATH=${proj}_some_LIBRARY
> ...
> INSTALL_DIR ${proj}/path/
> DEPENDSsd
> ${proj_DEPENDS})
>
> Is there an easier way to pass all the options to the 'normal' build?
>
> -Jameson
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587560.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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
>



-- 
+1 919 869 8849
-- 

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] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
I see, that makes a lot of sense.   And in order to pass options from the
'superbuild' build to the 'normal' build you make them options as command
line args in your ExternalProhect_Add command?  i.e.:

set( proj my_prog )
  ExternalProject_Add( ${proj}
DOWNLOAD_COMMAND ""
SOURCE_DIR "${${proj}_Source_Dir}"
BINARY_DIR "${${proj}_Binary_Dir}"
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
-D${proj}_option1:BOOL=${proj}_option1
-D${proj}_some_LIBRARY:FILEPATH=${proj}_some_LIBRARY
...
INSTALL_DIR ${proj}/path/
DEPENDSsd
${proj_DEPENDS})

Is there an easier way to pass all the options to the 'normal' build? 

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557p7587560.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] Question regarding External Project add and VTK

2014-06-02 Thread Matthew Woehlke
On 2014-06-02 17:48, jmerkow wrote:
> I want to add VTK as an external project, but I have a few questions.
> 
> Looking online at examples of other projects using vtk as an
> external project, many of them use a 'superbuild' style technique
> [...] they have some option to enable SuperBuild (or a seperate
> CMakeLists.txt file) then that adds all the external projects (i.e. 
> vtk or itk), and finally they add their own project as an external
> project (obv with superbuild turned off).  I am wondering why this is
> done this way..

I think the answer is that you otherwise get into a chicken-and-egg
situation. Basically, your own project can't configure until VTK is
available; therefore, it is necessary to make configuration of your own
project be done as a build step that can depend on the build of VTK,
which is what the above pattern achieves.

-- 
Matthew

-- 

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] Question regarding External Project add and VTK

2014-06-02 Thread jmerkow
Hello,

I want to add VTK as an external project, but I have a few questions.

Looking online at examples of other projects using vtk as an external
project, many of them use a 'superbuild' style technique (example here from
the archives: [1]).  
By that I mean that they have some option to enable SuperBuild (or a
seperate CMakeLists.txt file) then that adds all the external projects (i.e.
vtk or itk), and finally they add their own project as an external project
(obv with superbuild turned off).  I am wondering why this is done this
way..

What I would like to do it have options for these libraries (starting with
VTK) to download and build it if they wish. Doing it this way, all of the
other options are available to the user.

-Jameson

[1]
http://cmake.3232098.n2.nabble.com/How-to-use-VTK-as-an-ExternalProject-td6002193.html



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Question-regarding-External-Project-add-and-VTK-tp7587557.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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