Re: [CMake] Announcing a (potential) new CMake project!

2015-02-03 Thread jmerkow
I  would love a place to learn more about CMake design patterns and
paradigms.  The CMake documentation is very good, and the Cmake website has 
a good tutorial to get people started with a simple project.  However, there
are a lot of commonly used design patterns out there that aren't explained
anywhere.
As I learned CMake (and continue to), and convert existing projects to
CMake, I studied the big CMake projects' code such as VTK, ITK, Slicer,
CITK, Parview etc to look at what they did.
Having a knowledge base that covers best practices and design patterns would
be fantastic. And incredibly benefical.



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Announcing-a-potential-new-CMake-project-tp7589660p7589667.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] CMake - Error in configuration process, project files may be invalid

2014-11-03 Thread jmerkow
It looks like you don't have a CXX compiler. 
Make sure that visual studio is installed properly, with C++ compilers.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-Error-in-configuration-process-project-files-may-be-invalid-tp7588925p7588930.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


[CMake] ExternalProjectDependency (artichoke) and ctest

2014-11-03 Thread jmerkow
Hello,

My project is using ExternalProjectDependency from [1]. I know that is not a
kitware/cmake project, but I thought Id ask here anyway
I have been using testing (ctest) with it by adding tests in the top level
build with hard-coded directories and names (these targets aren't built
until the non-superbuild project is built).  I wanted to move the tests to
the non-superbuild portion of the code so I can use generator expressions,
but I am having some trouble.

Basically, what I am doing is to include ctest in the non-superbuild portion
then add a custom target.  This works for 'make test' but does not work with
ctest. 

add_custom_target(test)
add_custom_command(TARGET test POST_BUILD
COMMAND ${CMAKE_COMMAND} --build ${${PROJECT_NAME}_BINARY_DIR}/build
--target test)

ExternalProjectDependency added a function to add install:
'ExternalProject_Install_CMake' I don't see a similar function for testing.
Is there another good way to do this?  Im not sure what ctest calls to
initiate testing, using that info, I might be able to get a good work
around.

-Jameson

[1] https://github.com/commontk/Artichoke



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/ExternalProjectDependency-artichoke-and-ctest-tp7588929.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] file(UPLOAD what does it support?

2014-10-22 Thread jmerkow
Sure. I can take this on. Looks like the ifdefs are there and the
cmakedefines are all setup

I believe that libssh2 is standard on linux and osx.  What about windows is
it even available on windows?

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/file-UPLOAD-what-does-it-support-tp7588715p7588791.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] file(UPLOAD what does it support?

2014-10-22 Thread jmerkow
So Im most likely out of luck, unless I want to compile cmake myself with
those flags on...
Is there anyway to know which protocols will work with the standard cmake
packages? Besides systematically trying each one... Basically we have a
linux machine that we want to put nightly files on after ctest, its doesn't
have http or ftp.

I can try to work something out with execute_process and use scp, and find a
decent scp for windows.

-Jameson




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/file-UPLOAD-what-does-it-support-tp7588715p7588788.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] file(UPLOAD what does it support?

2014-10-22 Thread jmerkow
I have tried this on linux using 2.8.12, and on windows 7 with 3.0.2. Both
pre-built from http://cmake.org/
Both give the same error.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/file-UPLOAD-what-does-it-support-tp7588715p7588786.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] file(UPLOAD what does it support?

2014-10-22 Thread jmerkow
Sorry for the delayed response.

Im trying to use sftp.

To test it out, I am doing something like:

file(WRITE  upload.txt "testing upload")
file(UPLOAD upload.txt sftp://user:pass@server:/path/on/server STATUS status
SHOW_PROGRESS)
message("STATUS ${status}")

The status is STATUS 1;"unsupported protocol"

SFTP is definitely supported by cURL.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/file-UPLOAD-what-does-it-support-tp7588715p7588783.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


[CMake] file(UPLOAD what does it support?

2014-10-09 Thread jmerkow
Hello,

I am trying to use file(UPLOAD.  The documentation [1] is a little lacking
on what types of uploading it supports. 

Is there a wiki or example page somewhere that goes over whats supported and
how to use it?

-Jameson

[1] http://www.cmake.org/cmake/help/v3.0/command/file.html?highlight=UPLOAD



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/file-UPLOAD-what-does-it-support-tp7588715.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] CPack DragNDrop, adding an additional file to DMG

2014-09-25 Thread jmerkow
Yes.  

Im actually using the Bundle generator.  We don't use bundle when compiling. 
We only use bundles to launch for the binaries.  DESTINATION "." points to
Contents/Resources/ in this case.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-DragNDrop-adding-an-additional-file-to-DMG-tp7588601p7588605.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


[CMake] CPack DragNDrop, adding an additional file to DMG

2014-09-25 Thread jmerkow
Using CPack is it possible to add an additional file to the DMG?  Many DMGs
accompany their bundles with readme's or other files.  I haven't found
anything in the documentation to accomplish this.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-DragNDrop-adding-an-additional-file-to-DMG-tp7588601.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] CPack WIX examples

2014-09-25 Thread jmerkow
Thanks a lot this worked! Are there any plans to add the functionality for
adding registry entries into the WIX xml directly?  Looking at the source
code, it looks like it would be somewhat painless.  If no one is already
working on this, I'll work on contributing the code myself, in the near
future.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588600.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] CPack WIX examples

2014-09-24 Thread jmerkow
I forgot to mention that I double checked that this particular code was being
executed.  I started changing the name (and adding a time stamp) to the msi
in the same section of code to double check. Here is it is (its at send of
my code for cpack):

...
if(WIN32)
if(MSVC)
set(CPACK_GENERATOR "WIX")
set(CPACK_WIX_PRODUCT_GUID "---")
set(CPACK_WIX_UPGRADE_GUID "---")
SET(CPACK_PACKAGE_FILE_NAME
"myproj-${myproj_FULL_VERSION}-Win-x64_${TIMESTAMP}_NewTest")
set(CPACK_WIX_PATCH_FILE 
"${CMAKE_CURRENT_SOURCE_DIR}/patch.xml")
endif()
endif()

include(CPack)



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588595.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] CPack WIX examples

2014-09-24 Thread jmerkow
Ok, I've double checked everything and I'm not sure whats going on.

I was looking in files.wxs (in _CPack_Packages/win64/WIX) for the component
ID, and i've tried a few different ones.  I also dropped the config file
step and used your example patch.xml:






Still nothing added when I search file.wxs for FOOBAR or anything else that
should be added with the fragment injection. I am still curious as to why
the component id's look so different between your tests and whats being
generated in my file.wxs.

That seems to leave the older version question
Is this feature new with 3+?  I am using CMake 2.8.12.2

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588594.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] CPack WIX examples

2014-09-24 Thread jmerkow
Ok I'm going the fragment injection route, but having some issues.

So I found the component id for the target that these registry values will
be needed by in files.wxs:

  

In this case its 'CMP_ID_1', using the first cmp id seemed like a safe bet
in general to have it referenced by a feature.

So a configurable patch.xml.in looks something like:




...



There are just a few in there to test the process.

In CMake, i configure and add it the file to CPACK_WIX_PATCH_FILE:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/registry-patch.xml.in
"${TEMP_DIR}/registry-patch.xml" @ONLY)
set(CPACK_WIX_PATCH_FILE "${TEMP_DIR}/registry-patch.xml")

Then I generate the msi using cpack.  However the resulting msi doesn't set
any registry entries, I also don't see any of the entries anywhere in the
resulting xml.  
I did notice that in the documentations [1] and in your example your
component id is more complex..
It looks to be something like (and I'm abusing cmake generator expressions
for brevity)
Id='CM_CP_@cmake_component@.@TARGET_FILE_DIR:tgt@.@TARGET_FILE_DIR:tgt@'.  I
tried an Id of this nature as well (i.e. ) but this also did not work.
Am I obtaining the id wrong? The documentation is a little confusing
compared to whats being generated. so I'm not sure exactly sure if I have
the proper id. Is there a way to get the Id from the in cmake to configure
the file directly?  Maybe there is another issue entirely?

-Jameson
[1]
http://www.cmake.org/cmake/help/v3.0/module/CPackWIX.html?highlight=cpack_wix_patch
[2]
https://github.com/ngladitz/cmake-wix-testsuite/tree/master/fragment_injection



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588591.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] CPack WIX examples

2014-09-23 Thread jmerkow
Thanks a lot for your help! Those examples are excellent.

I have a follow up questions for creating the installer, though.  We have a
number of registry entries that need to be created for the software to run
in 'release mode'.  In our current system we add registry entries into the
wxs, but I don't see a way to do that with cmake/cpack easily.
We add a few lines, such as:

We use these registry entries as anchors for the locations for software
assets.

It seems the best way to do this would be to override the template with a
number of configurable entries?
So I could add something like (there's about 15 of em):


I wanted to check to see if there was a way to handle this directly from
CMake.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588576.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


[CMake] CPack WIX examples

2014-09-23 Thread jmerkow
Hello

I am working on creating an msi installer using cpack with the WIX installer
(converting from old system).  Im having some trouble finding some good
resources to do this. 
My project needs to set a number of registry entries. We have a few
components, and licenses that are installed along with our software. I also
don't completely understand the example for CPACK_WIX_PATCH_FILE in the
documentation for adding components, etc.
I thought it would be helpful to see some of this in action and I was hoping
someone could point me to an example or two of a project that uses CPack WIX
generators to get me going. I searched github and around the CMake website,
and couldn't find any projects that use WIX.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561.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-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
> <http://cmake.3232098.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7587557&code=am1lcmtvd0BnbWFpbC5jb218NzU4NzU1N3wyMDA3ODE1MjA4>
> .
> NAML
> <http://cmake.3232098.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.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] Confusion regarding usage of find_package and PATHS or HINTS

2014-06-19 Thread jmerkow
Jc,

That is precisely what I do for superbuild.  This applies to non
superbuilds, its also helpful if we are running on a cluster, supercomputers
or machines that it is difficult to access the web (though superbuild URLs
can be local paths too). Its also helpful for people running multiple
versions (i.e. developers).  Lastly, it meshes well with our legacy makefile
system. Some packages cannot be integrated with superbuild as easily because
of license restrictions, so we need a way to search for these packages.

Im wondering why there isn't a way to pass paths to find_package in module
mode already.  If this would be a good feature, I would consider
contributing a patch myself to add this in.  Either making find_package(FOO
HINTS path/to/something) not force config mode and pass the hint to FindFoo,
or adding a new argument as find_package(Foo MODULE_HINTS
/path/to/something), or similar. Thoughts?

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Confusion-regarding-usage-of-find-package-and-PATHS-or-HINTS-tp7587611p7587721.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-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] Confusion regarding usage of find_package and PATHS or HINTS

2014-06-10 Thread jmerkow
I'm not the author of the libraries, and none of them are cmake friendly. So
it doesn't make sense to create FOOconfig.cmake files for them. Using the
command line -D  or adding env variables to add new search directories,
seems like an unnecessary headache for the user (our windows users esp
wouldn't enjoy it). Right now, they configure, specify the location of the
externals directory (if it's not in one of the pre-subscribed location) and
the libraries are found.

Some do come with installation packages (commercial libs), but these are
often unused, in favor of placing the libraries in some location. So using
this method allows us to search in the externals directory, search in
default locations, and specify specific locations (full path) to search for
the libraries. I should also mention that many of these libraries have
multiple libs files, not all of which are always needed, and can have
interdependencies between packages. So if I have pacakageA and packageB, I
need different libraries and headers from both packages them if I were to
just have one.  All this logic is obv handled by the main project, and
COMPONENTS arg is used indicate that a particular extra library/header is
needed. 

Essentially, what I'm doing is using the same behavior for finding config
files by adding HINTS/PATHS but looking for libraries instead of
FOOConfig.cmake. 





--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Confusion-regarding-usage-of-find-package-and-PATHS-or-HINTS-tp7587611p7587620.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] Confusion regarding usage of find_package and PATHS or HINTS

2014-06-10 Thread jmerkow
Basically, the scenario I'm using this is when libraries are in some unknown
location, but the location can be set during the configure step. 
In our case we have a number of external libraries that aren't  (and
shouldn't be) installed, so there not going to be in any of the standard
locations (I.e they won't be in /usr/bin etc).  We provide precompiled
versions of these libraries for convenience, or the user can compile them.
In the case where they use our precompiled libs, we have a standard
directory structure for the externals.  I.e,
externals/bin/lib-name/sub-dir-structure/. The externals directory can be
anywhere, and we provide FindXxx.cmake files to locate them (given the
location of the external dir).  So, with this, as long as the external dir
location is known (and the follow the structure), we can find the libraries
easily. We do it this way so the FindXxx.cmake files can be edited easily if
we want to update them, or use fallback locations for some of the libraries. 





--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Confusion-regarding-usage-of-find-package-and-PATHS-or-HINTS-tp7587611p7587618.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] Confusion regarding usage of find_package and PATHS or HINTS

2014-06-10 Thread jmerkow
Is there a generally accepted method to pass extra paths to find_package in
module mode? To get around this,  I have been doing something like this:

set(FOO_EXTRA_PATHS path1 path2)
Find_package(FOO)


In FindFOO.cmake:
...
set(FOO_LIB_POSSIBLE_PATHS ${FOO_EXTRA_PATHS} /path3/)
...
(Use the possible paths in find_library/find_file/etc)


Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Confusion-regarding-usage-of-find-package-and-PATHS-or-HINTS-tp7587611p7587615.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-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-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 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 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


[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


Re: [CMake] CMAKE_RUNTIME_OUTPUT_DIRECTORY inconsistent between make and Xcode

2014-03-09 Thread jmerkow
I am having a similar issue. 

I generate a number of scripts I configure with the path to the executables. 
This path is the same when using make, but with XCode or MSVSC they append
the build type (Debug, Release, RelWithDebInfo, etc). 
Bascially, this script sets a number of env variables, and adds the the PATH
so the application can run.

I'm betting this is a common use of configure file, how is it generally
solved?  I supposed some post build command could be used?

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMAKE-RUNTIME-OUTPUT-DIRECTORY-inconsistent-between-make-and-Xcode-tp7586922p7586940.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


[CMake] Linking intel (icpc/icc) compiled libraries with gnu (g++/gcc/ar) compiled targets

2014-01-27 Thread jmerkow
Hello,

I am working on migrating from for an established project make to cmake, and
I have an interesting problem. 

Some of the precompiled libraries are compiled using intel compilers and
some are compiled using g++. Since icc is licensed and harder to get we have
been using g++ and linking with the intel libraries (build using makefiles).

Now, we are moving to CMake I am trying to accomplish the same thing. To
test this, I am trying to compile the project using the an intel compiled
VTK library (i.e. VTK was compiled with icc/icpc) and while linking and
compiling the rest of the application using gnu, (ar, g++, etc). The intel
libraries need for this are libirc, libimf, libsvml.  I have these
libraries, but they do not seem to be linking properly, or I am missing a
step in this process.

I am doing this with a loop which finds the path for each of the libraries,
adds them and concatenates them to the libraries list.  This what a single
iteration looks like (I pulled it out of the loop for readability)

set(lib "irc") #(this is actually set by a loop)
set(IntelCompilerLibrary_LIBRARY "/full/path/to/libirc.so") #(this is
actually set by a loop)

add_library(${lib} UNKNOWN IMPORTED)
set_property(TARGET ${lib} PROPERTY IMPORTED_LOCATION
"${IntelCompilerLibrary_LIBRARY}")

SET(IntelCompilerLibrary_LIBRARIES ${IntelCompilerLibrary_LIBRARIES}
"${lib}")

I believe that I am adding the precompiled libraries correctly according to
the wiki
(http://www.cmake.org/Wiki/CMake/Tutorials/Exporting_and_Importing_Targets),
but I continue to get undefined references to the intel methods.

Any help is much appreciated!!





--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Linking-intel-icpc-icc-compiled-libraries-with-gnu-g-gcc-ar-compiled-targets-tp7586615.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


[CMake] Linking with intel (icc/icpc) VTK libraries using gnu (g++/ar)

2014-01-27 Thread jmerkow
Hello,

I am working on migrating from for an established project make to cmake, and
I have an interesting problem. 

Some of the precompiled libraries are compiled using intel compilers and
some are compiled using g++. Since icc is licensed and harder to get we have
been using g++ and linking with the intel libraries (build using makefiles).

Now, we are moving to CMake I am trying to accomplish the same thing. To
test this, I am trying to compile the project using the an intel compiled
VTK library (i.e. VTK was compiled with icc/icpc) and while linking and
compiling the rest of the application using gnu, (ar, g++, etc). The intel
libraries need for this are libirc, libimf, libsvml.  I have these
libraries, but they do not seem to be linking properly, or I am missing a
step in this process.

I am doing this with a loop which finds the path for each of the libraries,
adds them and concatenates them to the libraries list.  This what a single
iteration looks like (I pulled it out of the loop for readability)

set(lib "irc") #(this is actually set by a loop)
set(IntelCompilerLibrary_LIBRARY "/full/path/to/libirc.so") #(this is
actually set by a loop)

add_library(${lib} UNKNOWN IMPORTED)
set_property(TARGET ${lib} PROPERTY IMPORTED_LOCATION
"${IntelCompilerLibrary_LIBRARY}")

SET(IntelCompilerLibrary_LIBRARIES ${IntelCompilerLibrary_LIBRARIES}
"${lib}")

I believe that I am adding the precompiled libraries correctly according to
the wiki
(http://www.cmake.org/Wiki/CMake/Tutorials/Exporting_and_Importing_Targets),
but I continue to get undefined references to the intel methods.

Any help is much appreciated!!






--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Linking-with-intel-icc-icpc-VTK-libraries-using-gnu-g-ar-tp7586614.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


[CMake] Configure_file, permission denied

2014-01-23 Thread jmerkow
I am trying to use configure_file but I get a permissions denied error.

Code:
configure_file(${TestProj_SOURCE_DIR}/CMake/developer-core-script.in
${TestProj_BIN_DIR}/mysim)

Error:
CMake Error: Could not open file for write in copy operation /mysim.tmp
CMake Error: : System Error: Permission denied
CMake Error at CMakeLists.txt:475 (configure_file):
  configure_file Problem configuring file

it seems to be related to this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7195aca54f40778f41894c9e62649afe09e71d6c;ds=inline

I tried setting my CMAKE_PLATFORM_ROOT_BIN to the INFO_DIR
SET(CMAKE_PLATFORM_ROOT_BIN "${CMAKE_PLATFORM_INFO_DIR}")

This did not solve the problem.  I'd rather not update CMake right now if
there is an easy workaround.



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Configure-file-permission-denied-tp7586595.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] CMAKE OS X fortran bug?

2014-01-17 Thread jmerkow
Yes, that works.  
It just seemed a little funky that CMake would generate names based on a
predefined capitalization (i.e. CXX, Fortran, C etc), then check using the
capitalization in the parameter(I texted cxx as well). I figured I would
bring this to the mailing list attention, maybe save some headaches.

Jameson




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMAKE-OS-X-fortran-bug-tp7586540p7586542.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


[CMake] CMAKE OS X fortran bug?

2014-01-17 Thread jmerkow
Hello,

I am working on converting an older project to CMake.  Right now, I am
getting all the variables and flags in order from the Makefiles to make sure
that CMake will work for our project. And I ran across something that maybe
a bug.

I am using fortran in this project, so I wanted to enable that language
with:

ENABLE_LANGUAGE(FORTRAN)

I get the following error:

CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMAKE_FORTRAN_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMAKE_FORTRAN_COMPILER
CMake Error: CMAKE_FORTRAN_COMPILER not set, after EnableLanguage

However, CMAKE_Fortran_COMPILER is set (to /usr/local/bin/gfortran in this
case).  It seems to be that error is being generated because of the improper
lowercase (CMAKE_FORTRAN_COMPILER vs CMAKE_Fortran_COMPILER)
The rest of the variables regarding fortran have the same improper
captialization (in the gui)
I am running CMake 2.8.12.1 on OS X 10.8.5. 

Is this a bug or am I doing something wrong?

Jameson




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMAKE-OS-X-fortran-bug-tp7586540.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


[CMake] simple program, os x library archive error, linux no issues

2013-11-11 Thread jmerkow
Hello

I am developing a few simple programs that use ITK/VTK.  I am making a few
image filters for ITK and I have some test .cxx files to test them out. 
This process is going smoothly except that 'make' returns an error when I
use it on OS X.

here is the error:
Scanning dependencies of target LevelSetNormals
Linking CXX static library libLevelSetNormals.a
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...

make[2]: *** [lib/libLevelSetNormals.a] Error 1
make[1]: *** [lib/CMakeFiles/LevelSetNormals.dir/all] Error 2
make: *** [all] Error 2

./src/CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project(itkNormals)
FIND_PACKAGE (ITK REQUIRED)
IF( ITK_FOUND )
  include( ${ITK_USE_FILE} )
ENDIF( ITK_FOUND )

add_subdirectory(test)
add_subdirectory(lib)


./src/test/CMakeLists.txt:

include_directories(${PROJECT_SOURCE_DIR}/lib)

add_executable(itkNormalsMain itkNormals.cxx)
TARGET_LINK_LIBRARIES(itkNormalsMain ${ITK_LIBRARIES})
#TARGET_LINK_LIBRARIES(itkNormalsMain ImageFilter)
#TARGET_LINK_LIBRARIES(itkNormalsMain DotImageFilter)

#itkDotNormals.cxx
add_executable(dotImageTest itkDotNormals.cxx)
TARGET_LINK_LIBRARIES(dotImageTest ${ITK_LIBRARIES})
#TARGET_LINK_LIBRARIES(dotImageTest ImageFilter)
TARGET_LINK_LIBRARIES(dotImageTest DotImageFilter)

add_executable(dotTest DotProductImageFilterTest.cxx)
TARGET_LINK_LIBRARIES(dotTest ${ITK_LIBRARIES})
TARGET_LINK_LIBRARIES(dotTest ImageFilter)
TARGET_LINK_LIBRARIES(dotTest DotImageFilter)
TARGET_LINK_LIBRARIES(dotTest Utils)

add_executable(LST LevelSetTest.cxx)
TARGET_LINK_LIBRARIES(LST ${ITK_LIBRARIES})
TARGET_LINK_LIBRARIES(LST ImageFilter)
TARGET_LINK_LIBRARIES(LST DotImageFilter)
TARGET_LINK_LIBRARIES(LST LevelSetNormals)


./src/lib/CMakeLists.txt

add_library(DotImageFilter itkDotImageFilter.h)
SET_TARGET_PROPERTIES(DotImageFilter PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(DotImageFilter ${ITK_LIBRARIES})

add_library(ImageFilter itkImageFilter.h)
SET_TARGET_PROPERTIES(ImageFilter PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(ImageFilter ${ITK_LIBRARIES})

add_library(Utils utils.hxx)
SET_TARGET_PROPERTIES(Utils PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(Utils ${ITK_LIBRARIES})

add_library(LevelSetNormals itkLevelSetNormals.h)
SET_TARGET_PROPERTIES(LevelSetNormals PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(LevelSetNormals ${ITK_LIBRARIES})



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/simple-program-os-x-library-archive-error-linux-no-issues-tp7586040.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