[CMake] CMAKE_OSX_SYSROOT being ignored with frameworks in /Library/Frameworks

2014-04-23 Thread James Bigler
I have CMAKE_OSX_SYSROOT defined as something:

set(CMAKE_OSX_SYSROOT
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"
CACHE LIST "OSX sysroot SDK directory" FORCE)

Then later I do a find_library command and it finds a library framework in
/Library/Frameworks/mylib.framework

The cache entry for mylib has the full path to the library, but later
during linking it removes the full path and instead uses the name directly:

-framework mylib

Unfortunately, because the -isysroot command is invoked the linker no
longer looks in the standard locations.  I have to use -F
/Library/Frameworks -framework mylib.  I can't even use -framework
/Library/Frameworks/mylib.framework

Is there something I can do to make it work right?

Thanks,
James
-- 

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] OSX Bundles and wrapper scripts

2014-04-23 Thread Zaak Beekman
If I want to create an OSX bundle, but I want the main executable to be a
configured wrapper script written in bash, what is the best way to go about
doing that? It seems that the

Also, how do I get the wrapper script to correctly call the compiled
executable so that the app bundle is relocatable? Put another way, when the
app bundle is packaged or installed, how do I fixup the script so that it
will call an executable residing in the local app bundle?

Thanks,
Izaak Beekman
===
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeek...@princeton.edu

UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeek...@umiacs.umd.edu
ibeek...@umd.edu
-- 

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] Are the [Project name]_SOURCE_DIR variables stored in the cache ?

2014-04-23 Thread Glenn Coombs
I'm using cmake version 2.8.12.1 and have just encountered an issue with my
cmake setup where I was using the [Project name]_SOURCE_DIR variable in an
include_directories command and it was being ignored.  In my top level
CMakeLists.txt I had:

project(blah)

add_subdirectory(foo)
add_subdirectory(...)
...
add_subdirectory(bar)

and in the CMakeLists.txt in the foo directory:

include_directories(${bar_SOURCE_DIR})

The project failed to build because the foo project couldn't find header
files located in the bar project source directory.  The fix was to move the
add_subdirectory(bar) before the add_subdirectory(foo) command.  The
interesting thing is that this setup only caused an error when doing a
clean build from scratch.  It looks like it only fails after a clean start
and a single run of the cmake generator.  If you run cmake-gui and
configure more than once, as you may well do if you need to set some
options, then it appears to get the correct value for ${bar_SOURCE_DIR}.

Are the [Project name]_SOURCE_DIR variables being automatically stored in
the cmake cache, as that would explain what I am seeing ?  I would expect
the above scenario to consistently fail every time due to the missing
header files.  Having it only fail the first time and then work after
subsequent configure/generate steps is confusing.  Is this a bug, or are
there occasions when this is desirable behaviour ?

--
Glenn

P.S.  In an ideal world I'd like to see the expansion of the [Project
name]_SOURCE_DIR variables be deferred until after all the CMakeLists.txt
files have been read in so that the order doesn't matter, but I'm guessing
that isn't going to happen :-)
-- 

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] target_include_directories and relative paths inside generator expressions.

2014-04-23 Thread Andrew Fuller
Running CMake 3.0-rc3 and the docs for target_include_directories say the
paths may be absolute or relative.  Indeed the following works as desired:

target_include_directories( MyTarget PRIVATE some/dir )

The docs also mention that generator expressions can be used.  However the
following produces an error:

target_include_directories( MyTarget PRIVATE
$<$:some/dir> )

CMake Error in CMakeLists.txt:
Found relative path while evaluating include directories of
  "foo":
"some/dir"

It seems absolute paths are necessary. eg:

target_include_directories( MyTarget PRIVATE
$<$:${CMAKE_CURRENT_SOURCE_DIR}/some/dir> )

will perform as expected.

Is this behaviour expected (and should be documented) or should I file a
bug?

Thanks,
-Andrew
-- 

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] --find-package option fails with some of the Qt5 components

2014-04-23 Thread Alan W. Irwin

On 2014-04-23 14:30+0200 Stephen Kelly wrote:


Alan W. Irwin wrote:


Hi Steve:

PLplot not only CMake exports its libraries but also provides library
information in pkg-config form for our users that prefer that form.
Therefore, for this component of our install I need to collect
explicit compile and link flags for Qt5, and it appears to me the best
way to do that is to run cmake with the --find-package option.


The cmake --find-package feature is Alex Neundorf's department. I don't
really know anything about it.


I have just discovered a simple fix for the problem

___
--- Qt5GuiConfigExtras.cmake_orig   2014-04-23 10:03:52.240610724 -0700
+++ Qt5GuiConfigExtras.cmake2014-04-23 10:08:11.187945950 -0700
@@ -47,7 +47,7 @@



-_qt5gui_find_extra_libs(OPENGL "GL" "" "")
+_qt5gui_find_extra_libs(OPENGL "Qt5OpenGL" "" "")



___

After that change to the installed version of Qt5-5.2.1 then I get the
following good find-package result with either CMake-2.8.12.2 or
CMake-3.0.0-rc3:

wine@raven> ~software/cmake/install-3.0.0-rc3/bin/cmake --find-package \
-DNAME:STRING='Qt5Svg' -DCOMPILER_ID:STRING=GNU -DLANGUAGE:STRING=CXX \
-DMODE:STRING=COMPILE
-I/home/wine/newstart/build_script/install-linux/include/
-I/home/wine/newstart/build_script/install-linux/include/QtSvg
-I/home/wine/newstart/build_script/install-linux/include/QtWidgets
-I/home/wine/newstart/build_script/install-linux/include/QtGui
-I/home/wine/newstart/build_script/install-linux/include/QtCore
-I/home/wine/newstart/build_script/install-linux//mkspecs/linux-g++

and similarly for Qt5Gui and Qt5PrintSupport and also for the LINK and
EXIST modes.

Steve, I get the impression you have participated in the development
of at least the CMake aspects of Qt5.  The above Qt5 patch responds to
the fundamental issue that CMake cannot find a library named libGL by
substituting a search for libQt5OpenGL instead which exists in my present
Qt5 installation.  However, I am not sure that is the correct fix so I
would appreciate your review of the above patch and making sure the
correct fix gets into Qt5.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

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] Explanation....

2014-04-23 Thread Matthew Woehlke

On 2014-04-16 06:03, Rolf Eike Beer wrote:

Am 16.04.2014 11:39, schrieb Johannes Zarl:

Instead of ``"${var}" STREQUAL "VALUE"'', write:

IF ( var MATCHES "^VALUE$" )


NO, please don't! I try hard to kill all those as it requires
compiling a regular expression for a simple string match. Just change it
to something that is no valid variable name, i.e. will never get expanded:

if (" ${arg}" STREQUAL " TOTO")


set(" TOTO" "evil")

Admittedly it's much less likely that variable names containing 
non-identifier characters¹ will occur "by accident", the only truly safe 
way to avoid unintended implicit expansion is to either rely on implicit 
expansion (i.e. always assign your operands to variables and give the 
variable names as the literal arguments), or use some other command that 
doesn't perform expansion.


(¹ except for '-', which will often occur in automatically created 
variable names when used in project names, e.g. my-project_SOURCE_DIR.)


See also 
http://permalink.gmane.org/gmane.comp.programming.tools.cmake.devel/9936.


--
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

Re: [CMake] good way to append link flags?

2014-04-23 Thread Nils Gladitz

On 23.04.2014 18:16, Clinton Stimpson wrote:

I am using
set_property(TARGET mytarget APPEND PROPERTY LINK_FLAGS "...")
multiple times to add various link flags.

But when I inspect the actual link command, I see all my flags separated by
semi-colons and no spaces between them, which is not what I want.

Is this correct behavior for cmake?

Clint


Try APPEND_STRING (with explicit space) instead of APPEND.
Some flag variables/properties are interpreted as strings rather than lists.

Nils
--

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] good way to append link flags?

2014-04-23 Thread Clinton Stimpson
On Wednesday, April 23, 2014 06:25:24 PM Nils Gladitz wrote:
> On 23.04.2014 18:16, Clinton Stimpson wrote:
> > I am using
> > set_property(TARGET mytarget APPEND PROPERTY LINK_FLAGS "...")
> > multiple times to add various link flags.
> > 
> > But when I inspect the actual link command, I see all my flags separated
> > by
> > semi-colons and no spaces between them, which is not what I want.
> > 
> > Is this correct behavior for cmake?
> > 
> > Clint
> 
> Try APPEND_STRING (with explicit space) instead of APPEND.
> Some flag variables/properties are interpreted as strings rather than lists.
> 
> Nils

Oh!  Thanks, it works.

Clint
-- 

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] good way to append link flags?

2014-04-23 Thread Clinton Stimpson

I am using 
set_property(TARGET mytarget APPEND PROPERTY LINK_FLAGS "...")
multiple times to add various link flags.

But when I inspect the actual link command, I see all my flags separated by 
semi-colons and no spaces between them, which is not what I want.

Is this correct behavior for cmake?

Clint
-- 

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] --find-package option fails with some of the Qt5 components

2014-04-23 Thread Stephen Kelly
Alan W. Irwin wrote:

> Hi Steve:
> 
> PLplot not only CMake exports its libraries but also provides library
> information in pkg-config form for our users that prefer that form.
> Therefore, for this component of our install I need to collect
> explicit compile and link flags for Qt5, and it appears to me the best
> way to do that is to run cmake with the --find-package option.

The cmake --find-package feature is Alex Neundorf's department. I don't 
really know anything about it.

Thanks,

Steve.




-- 

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] CDash questions

2014-04-23 Thread David Cole
> The way I’m doing this now is the following:
>
> a) I edit the CMakeList.txt file(s) and follow
>   the procedure to create an Xcode IDE project.
>   This project contains a bunch of targets
>   including ALL_BUILD, RUN_TESTS, and
>  Experimental - among others

You should not have to edit the CMakeLists file to create an Xcode IDE
project... The CMakeLists file should be written so that it may be used
with any CMake generator, and then, to create an Xcode project, you
would simply run:

  cd /path/to/build
  cmake -G Xcode /path/to/source


> a) I expect to see a list of all the test runs - or
> at least the the last run from each site.
> ...
> What do I have to do to get a list of all test
> runs from all sites for all dates.

By default, the main CDash page shows only results that have been
submitted since the most recently past nightly start time. To show
other days, you click on previous and next. To show multiple days, you
have to use a filtered view with a "Build Time" field.

Click on "Show Filters"
Use a filter of "Build Time" "is before" "now"
Click "Apply"
Click "Create Hyperlink" to create a link to this filtered view

(Yields something like this:
http://my.cdash.org/index.php?project=Safe+Numerics&filtercount=1&showfilters=1&field1=buildstarttime/date&compare1=84&value1=now
)

You won't want to see *everything* after you have more than a few
hundred submissions to your project's CDash page... it will be too slow
to retrieve and render all the results unless you use a limit.

Use "Build Time" "is after" "2 weeks ago" to see everything from the
last two weeks.


> b) The whole setup is quite confusing.
> I would like to think that if if users of
> this library include the CTestConfig.cmake
> file that I give them
> ...
> They will be able to submit their test
> results in the same way I just did.
> Am I correct in my understanding of this?

Yes, that's correct. They don't have to "include" anything -- you can
just have the CTestConfig file next to the CMakeLists file, and
"include(CTest)" in your CMakeLists file.


> Also I have some other questions which are
> not really related to my specific problem but
> rather to what the purpose of CDash actually is.
>
> a) Is it a system for gathering and recording
>   the results of test runs made from
>   different client configurations
> b) or is it a system for running tests on the
>   actual server hardware
> c) or is it a system for automatically
>   downloading projects to a client machine
>   and running the tests and posting the results.  

Alas, it is "only" "a)" -- none of your code is run on the CDash server.
CDash simply stores, organizes and presents the results you send it
from a
machine that does the building and testing. You can set up a
"CDash@home" client machine... a machine that connects to the cdash
server and requests a job. But then you also have to run something that
schedules builds for these client machines, or ping the server through
a CDash api call to instruct it to farm out a job to a waiting client.


> It seems that it’s all three - but this is not at all
> clear from the documentation.

Do you mean the wiki pages? Or something on cdash.org?


> I sort of conclude this from the information that the
> myCDash server requests regarding how to run the
> tests, where is the code repository, etc.

The code repository info is so CDash can show links to changes (on the
viewUpdates and viewChanges pages) if there's a web viewer for the
repo. It's also used when constructing scripts to send to the
CDash@home clients.


> a) I have a programming library for Safe integegers
>   see http://rrsd.com/blincubator.com/bi_library/safe-numerics/
> b) I want users to be able to download the library, run
>   the tests, check the results, if they want, submit
>   them to the my.cdash server
> c) I want all other users to see these results so we
>   can get an idea of the variety of platforms the
>   tests have been run and where they might
>   have failed.
>
> Am I doing this right? Am I missing anything?

Seems reasoanble to me. You're on the right track... Let us know if you
have further questions.

HTH,
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