Re: [CMake] Install on Ubuntu

2013-02-20 Thread Eric Noulard
2013/2/20 Alain Aupeix :
> Le 20/02/2013 21:35, Jean-Christophe Fillion-Robin a écrit :
>
> Hi Alain,
>
> Instead, in a terminal you could simply do the following:
>
>  cd && mkdir Support && cd Support && \
>  wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Linux-i386.tar.gz && \
>  tar -xzvf cmake-2.8.10.2-Linux-i386.tar.gz && \
> ./cmake-2.8.10.2-Linux-i386/bin/cmake -version
>
> This will create a directory named "Support" in your home folder, download
> and extract CMake 2.8.10. Finally it invokes cmake with the "-version" param
> to check that cmake run.
>
> You can then create symlinks into your /usr/local/bin folder to ensure you
> could simply call cmake, ctest, ...  without having to specify the full
> path.
>
> sudo ln -s ~/Support/cmake-2.8.10.2-Linux-i386/bin/cmake
> /usr/local/bin/cmake && \
> sudo ln -s ~/Support/cmake-2.8.10.2-Linux-i386/bin/ccmake
> /usr/local/bin/ccmake && \
> sudo ln -s ~/Support/cmake-2.8.10.2-Linux-i386/bin/cpack
> /usr/local/bin/cpack && \
> sudo ln -s ~/Support/cmake-2.8.10.2-Linux-i386/bin/ctest
> /usr/local/bin/ctest
>
> Hth
> Jc
>
> Thanks, I see what you want me to do, but I have another question:
>
> Actually, cmake is in /usr/bin
> If I put my symlink in /usr/local/bin, which version will be used ?
> Is there an order to execute programs in path ? /usr/local/bin before
> /usr/bin ?

If you want to only use the cmake version you've just compiled/downloaded
you may simply remove the one installed by Ubuntu:

sudo aptitude remove cmake

should be fine.

If you want to install both because you may sometimes use both then the symlink
to /usr/local is fine but I'd rather use update-alternatives(8)
command to do that.

You'll find attached a script which does just that.

sudo cmake-alternatives-VerkHEAD.sh on
sets up the links,

then
sudo cmake-alternatives-VerkHEAD.sh off
removes the links.

 you can check with:
update-alternatives --display cmake

You'll have to change the "CMAKE_HOME" inside that script.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


cmake-alternatives-VerkHEAD.sh
Description: Bourne shell script
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Install on Ubuntu

2013-02-20 Thread Jean-Christophe Fillion-Robin
Hi,

/usr/local/bin being before /usr/bin in the path, the cmake located locate
there will be used.
See also:

http://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux


The use of "which" can also be helpful. See
http://unixhelp.ed.ac.uk/CGI/man-cgi?which


Hth
Jc



On Wed, Feb 20, 2013 at 3:58 PM, Alain Aupeix wrote:

>  Le 20/02/2013 21:35, Jean-Christophe Fillion-Robin a écrit :
>
> Hi Alain,
>
>  Instead, in a terminal you could simply do the following:
>
>   cd && mkdir Support && cd Support && \
>  wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Linux-i386.tar.gz &&
> \
>  tar -xzvf cmake-2.8.10.2-Linux-i386.tar.gz && \
> ./cmake-2.8.10.2-Linux-i386/bin/cmake -version
>
>  This will create a directory named "Support" in your home folder,
> download and extract CMake 2.8.10. Finally it invokes cmake with the
> "-version" param to check that cmake run.
>
>  You can then create symlinks into your /usr/local/bin folder to ensure
> you could simply call cmake, ctest, ...  without having to specify the full
> path.
>
>  sudo ln -s ~/Support/cmake-2.8.10.2-Linux-i386/bin/cmake
> /usr/local/bin/cmake && \
> sudo ln -s
> ~/Support/cmake-2.8.10.2-Linux-i386/bin/ccmake /usr/local/bin/ccmake && \
>  sudo ln -s
> ~/Support/cmake-2.8.10.2-Linux-i386/bin/cpack /usr/local/bin/cpack && \
>  sudo ln -s
> ~/Support/cmake-2.8.10.2-Linux-i386/bin/ctest /usr/local/bin/ctest
>
>  Hth
> Jc
>
>  Thanks, I see what you want me to do, but I have another question:
>
> Actually, cmake is in /usr/bin
> If I put my symlink in /usr/local/bin, which version will be used ?
> Is there an order to execute programs in path ? /usr/local/bin before
> /usr/bin ?
>
>
> A+
> --
> --
> Alain Aupeix
> http://jujuland.pagesperso-orange.fr/
> http://pissobi-lacassagne.pagesperso-orange.fr/
> --
> U.buntu 12.04 | G.ramps 3.5.0-0.SVN20055 | H.arbour 3.2.0dev (Rev 18833) |
> HbIDE (Rev.168)
> --
>



-- 
+1 919 869 8849
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Install on Ubuntu

2013-02-20 Thread Alain Aupeix

  
  
Le 20/02/2013 21:35, Jean-Christophe
  Fillion-Robin a écrit :


  Hi Alain, 


Instead, in a terminal you could simply do the
  following:


 cd &&
mkdir Support && cd Support && \
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Linux-i386.tar.gz
&& \
 tar -xzvf
cmake-2.8.10.2-Linux-i386.tar.gz && \
./cmake-2.8.10.2-Linux-i386/bin/cmake
-version


This will create a directory named "Support" in
  your home folder, download and extract CMake 2.8.10. Finally
  it invokes cmake with the "-version" param to check that cmake
  run.


You can then create symlinks into your
  /usr/local/bin folder to ensure you could simply call cmake,
  ctest, ...  without having to specify the full path.



  sudo ln -s
~/Support/cmake-2.8.10.2-Linux-i386/bin/cmake
/usr/local/bin/cmake && \
sudo ln -s
~/Support/cmake-2.8.10.2-Linux-i386/bin/ccmake /usr/local/bin/ccmake
&& \
  
sudo ln -s
~/Support/cmake-2.8.10.2-Linux-i386/bin/cpack /usr/local/bin/cpack
&& \
  
sudo ln -s
~/Support/cmake-2.8.10.2-Linux-i386/bin/ctest /usr/local/bin/ctest
  


Hth
Jc
  
  
  

Thanks, I see what you want me to do, but I have another question:

Actually, cmake is in /usr/bin
If I put my symlink in /usr/local/bin, which version will be used ?

Is there an order to execute programs in path ? /usr/local/bin
before /usr/bin ?

A+
-- 
  
  Alain Aupeix
  http://jujuland.pagesperso-orange.fr/
  http://pissobi-lacassagne.pagesperso-orange.fr/
  
  U.buntu 12.04 | G.ramps 3.5.0-0.SVN20055 | H.arbour 3.2.0dev (Rev
  18833) | HbIDE (Rev.168)
  
  

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Install on Ubuntu

2013-02-20 Thread Jean-Christophe Fillion-Robin
Hi Alain,

Instead, in a terminal you could simply do the following:

 cd && mkdir Support && cd Support && \
 wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Linux-i386.tar.gz && \
 tar -xzvf cmake-2.8.10.2-Linux-i386.tar.gz && \
./cmake-2.8.10.2-Linux-i386/bin/cmake -version

This will create a directory named "Support" in your home folder, download
and extract CMake 2.8.10. Finally it invokes cmake with the "-version"
param to check that cmake run.

You can then create symlinks into your /usr/local/bin folder to ensure you
could simply call cmake, ctest, ...  without having to specify the full
path.

sudo ln -s ~/Support/cmake-2.8.10.2-Linux-i386/bin/cmake
/usr/local/bin/cmake && \
sudo ln -s
~/Support/cmake-2.8.10.2-Linux-i386/bin/ccmake /usr/local/bin/ccmake && \
sudo ln -s
~/Support/cmake-2.8.10.2-Linux-i386/bin/cpack /usr/local/bin/cpack && \
sudo ln -s
~/Support/cmake-2.8.10.2-Linux-i386/bin/ctest /usr/local/bin/ctest

Hth
Jc


On Wed, Feb 20, 2013 at 3:09 PM, Alain Aupeix wrote:

>  Hi, I have Ubuntu 12.04, and I have already cmake installed (2.8.7)
>
> To compile the last version of Sigil, I need 2.8.9 or higher, so I tried
> to install it.
> Unfortunately, the sh file just allows to install directly under Downloads
> folder or under Downloads/cmake. (depending of the answer to question)
> I tried then the tared version, but all the folder doesn't already exists
> now (help, for example) or aren't located the same way that the others.
>
> I ought to install the same way that the previous version (/usr/bin,
> /usr/share/.)
>
> I have run ./configure
> then I have run make
> But now, I don't know how to do the install command:
>
> sudo make install /usr???
>
> Thanks
> A+
>  --
> --
> Alain Aupeix
> http://jujuland.pagesperso-orange.fr/
> http://pissobi-lacassagne.pagesperso-orange.fr/
> --
> U.buntu 12.04 | G.ramps 3.5.0-0.SVN20055 | H.arbour 3.2.0dev (Rev 18833) |
> HbIDE (Rev.168)
> --
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
+1 919 869 8849
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Install on Ubuntu

2013-02-20 Thread Alain Aupeix

  
  
Hi, I have Ubuntu 12.04, and I have already cmake
  installed (2.8.7)
  
  To compile the
  last version of Sigil, I need 2.8.9 or
  higher, so I tried to install it.
  
  Unfortunately, the sh file just allows to install directly under Downloads folder or under Downloads/cmake.
  (depending of the answer to question)
  I tried then the tared version, but all the
folder doesn't already exists now (help, for example)
  or aren't located the same way that the others.

I ought to install the same way that the previous version
  (/usr/bin, /usr/share/.)
  
  I have run ./configure
  then I have run make
But now, I don't
know how to do the install
  command:
  
  sudo make install /usr   
???

Thanks
  A+

-- 
  
  Alain Aupeix
  http://jujuland.pagesperso-orange.fr/
  http://pissobi-lacassagne.pagesperso-orange.fr/
  
  U.buntu 12.04 | G.ramps 3.5.0-0.SVN20055 | H.arbour 3.2.0dev (Rev
  18833) | HbIDE (Rev.168)
  
  

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Problem in configuring VTK with Visual Studio 2010, Windows 7 64bit.

2013-02-20 Thread John Drescher
On Wed, Feb 20, 2013 at 2:07 PM, amitsuveer  wrote:
> I am using cmake-2.8.10.2-win32-x86 and vtk-5.10.1.
>
> I am trying to configure VTK, I have installed Visual Studio 10 (not the
> express version, the full one along with SP1), with x64 support. However,
> when selecting Visual Studio 10 (for 32 bit)or Visual Studio 10 x64 and
> choosing the default native compilers, I have the following errors.
>
> ---
> Error in configuration process, project files may be invalid
>
> The C compiler identification is unknown
> The CXX compiler identification is unknown

Did you select the correct generator when you ran cmake-gui?

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Problem in configuring VTK with Visual Studio 2010, Windows 7 64bit.

2013-02-20 Thread amitsuveer
I am using cmake-2.8.10.2-win32-x86 and vtk-5.10.1.

I am trying to configure VTK, I have installed Visual Studio 10 (not the
express version, the full one along with SP1), with x64 support. However,
when selecting Visual Studio 10 (for 32 bit)or Visual Studio 10 x64 and
choosing the default native compilers, I have the following errors.

--- 
Error in configuration process, project files may be invalid 

The C compiler identification is unknown
The CXX compiler identification is unknown
Performing Test Support for 64 bit file systems
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37
(get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
Performing Test Support for 64 bit file systems - Failed
Performing Test VTK_CONST_REVERSE_ITERATOR_COMPARISON
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37
(get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
Performing Test VTK_CONST_REVERSE_ITERATOR_COMPARISON - Failed
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37
(get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)

.
.
.
and so on.




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Problem-in-configuring-VTK-with-Visual-Studio-2010-Windows-7-64bit-tp7583301.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Concurrent TryCompiles with Visual Studio 11 fail

2013-02-20 Thread Alistair Low

Hi,

I've noticed a problem in running CMake concurrently, targeting Visual 
Studio 11 solution files (also reproduced with Visual Studio 10). The 
use case is a Jenkins job building LLVM, and this kicks off child jobs 
to build in Debug and Release mode, at the same time but in different paths.


CMake 2.8.10.2 is called from a bash script running under Cygwin:

"cmake '-DLLVM_TARGETS_TO_BUILD:STRING=X86;QPU' 
'-DLLVM_LIT_ARGS:STRING=-v --no-progress-bar' 
-DLLVM_LIT_TOOLS_DIR:STRING=C:/llvm_gnuwin32/bin ../ThirdParty/llvm

-- Building for: Visual Studio 11
-- The C compiler identification is unknown
-- The CXX compiler identification is MSVC 17.0.51106.1
-- Check for working CXX compiler using: Visual Studio 11
-- Check for working CXX compiler using: Visual Studio 11 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for argz.h
CMake Error at C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 
(get_filename_component):

  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for argz.h - not found
..."

If the child jobs are started at different times, each builds correctly. 
Has anyone run into this issue before, and is there a workaround other 
than stopping the jobs running concurrently? I haven't had the chance to 
debug further and see if this is a CMake or Visual Studio error.


Thanks,
Alistair
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Remove _MBCS

2013-02-20 Thread Matthew Woehlke

On 2013-02-18 04:00, YanmingZou wrote:

I want to use unicode in my program, so I add UNICODE and
_UNICODE with ADD_DEFINITIONS. However, there is always a _MBCS marco
in the generated project file.


Depending on where it is coming from...

  add_definitions(-DUNICODE -D_UNICODE -U_MBCS)

...might work? :-)

--
Matthew

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Remove _MBCS

2013-02-20 Thread YanmingZou
Hi Niels, Thanks for your example. It works well on my PC. So there should be 
something wrong in my files. I will check and let you know the reason when I 
find it.  Best regards and thanks again.Yanming
 > Date: Wed, 20 Feb 2013 15:36:21 +0100
> From: niels_dekker_address_until_2...@xs4all.nl
> To: cmake@cmake.org
> Subject: Re: [CMake] Remove _MBCS
> 
> 
> On 2013-02-18 10:00, YanmingZou wrote:
> > I am developing an application on windows with VS2012 and CMake
> > (2.8.10.2). I want to use unicode in my program, so I add UNICODE and
> > _UNICODE with ADD_DEFINITIONS. However, there is always a _MBCS marco in
> > the generated project file. The project can be compiled, but I am not
> > happy with that. Could someone can tell me how to remove the _MBCS?
> 
> On 2013-02-20 14:35, Patrick Johnmeyer wrote:
> > Did you try remove_definitions?
> 
> 
> Still I'm surprised that in your case, add_definitions(-D_UNICODE) does 
> not automatically remove the definition of _MBCS. Do you even have _MBCS 
> for a simple CMakeLists.txt as follows?
> 
>
># CMakeLists.txt
>project( MyCMakeMfcUnicodeApp )
>cmake_minimum_required(VERSION 2.8)
>set(CMAKE_MFC_FLAG 2)
>add_definitions(-D_UNICODE)
>add_executable(${PROJECT_NAME} MySourceFile.cpp)
>
> 
> Having the following "MySourceFile.cpp":
> 
>
>// MySourceFile.cpp
>#ifdef _MBCS
>#  error "_MBCS should not be defined!"
>#endif
>
> 
> 
> Kind regards,
> 
>   Niels
> -- 
> Niels Dekker
> http://www.xs4all.nl/~nd/dekkerware
> Scientific programmer at LKEB, Leiden University Medical Center
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
  --

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Remove _MBCS

2013-02-20 Thread Niels Dekker - address until 2014


On 2013-02-18 10:00, YanmingZou wrote:

I am developing an application on windows with VS2012 and CMake
(2.8.10.2). I want to use unicode in my program, so I add UNICODE and
_UNICODE with ADD_DEFINITIONS. However, there is always a _MBCS marco in
the generated project file. The project can be compiled, but I am not
happy with that. Could someone can tell me how to remove the _MBCS?


On 2013-02-20 14:35, Patrick Johnmeyer wrote:

Did you try remove_definitions?



Still I'm surprised that in your case, add_definitions(-D_UNICODE) does 
not automatically remove the definition of _MBCS. Do you even have _MBCS 
for a simple CMakeLists.txt as follows?


  
  # CMakeLists.txt
  project( MyCMakeMfcUnicodeApp )
  cmake_minimum_required(VERSION 2.8)
  set(CMAKE_MFC_FLAG 2)
  add_definitions(-D_UNICODE)
  add_executable(${PROJECT_NAME} MySourceFile.cpp)
  

Having the following "MySourceFile.cpp":

  
  // MySourceFile.cpp
  #ifdef _MBCS
  #  error "_MBCS should not be defined!"
  #endif
  


Kind regards,

 Niels
--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Remove _MBCS

2013-02-20 Thread Patrick Johnmeyer
> I am developing an application on windows with VS2012 and CMake
> (2.8.10.2). I want to use unicode in my program, so I add UNICODE and
> _UNICODE with ADD_DEFINITIONS. However, there is always a _MBCS marco in
> the generated project file. The project can be compiled, but I am not happy
> with that. Could someone can tell me how to remove the _MBCS? Thanks.
>

Did you try remove_definitions?
http://www.cmake.org/cmake/help/v2.8.1/cmake.html#command:remove_definitions
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Setting XCode Runtime Search Path

2013-02-20 Thread Darrell Blake
Ah, cool. That's much better. Cheers.


On 20 February 2013 10:54, Andreas Stahl wrote:

> Hello Darrell,
>
> you can also set it as a property per target
>
> set_target_properties(MyExecutable
> PROPERTIES
> XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@loader_path;@loader_path
> /../lib"
> )
>
> This should work, but I think CMake could use some facilities to handle
> the executables runpath search path on os x and the DT_RPATH / DT_RUNPATH
> in linux.
> best regards,
> Andreas
>
> Am 20.02.2013 um 11:39 schrieb Darrell Blake:
>
> > Hmm. I've just tried this but it didn't work for me. The "Runpath Search
> Path" field is still blank.
> >
> > Do I have to do things in a particular order to get it to work? Though I
> have tried moving it around and still couldn't get it to work.
> >
> > Darrell
> >
> >
> > On 20 February 2013 00:17, Alexey Petruchik  wrote:
> > Hi, I'm doing this by adding:
> > set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS
> "@executable_path/../Frameworks")
> > to my CMakeLists.txt. Not sure that this is the way it should be done
> but at least it works ;)
> >
> > Regards, Alexey
> >
> >
> > On Wed, Feb 20, 2013 at 1:13 AM, Darrell Blake 
> wrote:
> > Is there any way to set the XCode "Runtime Search Path" linker setting?
> I've got a framework that was built using @rpath so I'm having to set the
> Runtime Search Path setting to @executable_path/../Frameworks so it can be
> found. I just wondered if there was any way to set it from CMake.
> >
> > Darrell
> >
> >
> > --
> >
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
> >
> >
> > --
> >
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Setting XCode Runtime Search Path

2013-02-20 Thread Darrell Blake
I think I've just answered my own question. It looks like it has to be in
the root CMakeLists.txt. If I put it in one included from
add_subdirectory() it doesn't work but in the root CMakeLists.txt it does.


On 20 February 2013 10:39, Darrell Blake  wrote:

> Hmm. I've just tried this but it didn't work for me. The "Runpath Search
> Path" field is still blank.
>
> Do I have to do things in a particular order to get it to work? Though I
> have tried moving it around and still couldn't get it to work.
>
> Darrell
>
>
> On 20 February 2013 00:17, Alexey Petruchik  wrote:
>
>> Hi, I'm doing this by adding:
>> set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS
>> "@executable_path/../Frameworks")
>> to my CMakeLists.txt. Not sure that this is the way it should be done but
>> at least it works ;)
>>
>> Regards, Alexey
>>
>>
>> On Wed, Feb 20, 2013 at 1:13 AM, Darrell Blake 
>> wrote:
>>
>>> Is there any way to set the XCode "Runtime Search Path" linker setting?
>>> I've got a framework that was built using @rpath so I'm having to set the
>>> Runtime Search Path setting to @executable_path/../Frameworks so it can be
>>> found. I just wondered if there was any way to set it from CMake.
>>>
>>> Darrell
>>>
>>>
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>>
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Setting XCode Runtime Search Path

2013-02-20 Thread Andreas Stahl
Hello Darrell,

you can also set it as a property per target

set_target_properties(MyExecutable 
PROPERTIES
XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@loader_path;@loader_path/../lib"
)

This should work, but I think CMake could use some facilities to handle the 
executables runpath search path on os x and the DT_RPATH / DT_RUNPATH in linux. 
best regards,
Andreas

Am 20.02.2013 um 11:39 schrieb Darrell Blake:

> Hmm. I've just tried this but it didn't work for me. The "Runpath Search 
> Path" field is still blank.
> 
> Do I have to do things in a particular order to get it to work? Though I have 
> tried moving it around and still couldn't get it to work.
> 
> Darrell
> 
> 
> On 20 February 2013 00:17, Alexey Petruchik  wrote:
> Hi, I'm doing this by adding:
> set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS 
> "@executable_path/../Frameworks")
> to my CMakeLists.txt. Not sure that this is the way it should be done but at 
> least it works ;)
> 
> Regards, Alexey
> 
> 
> On Wed, Feb 20, 2013 at 1:13 AM, Darrell Blake  
> wrote:
> Is there any way to set the XCode "Runtime Search Path" linker setting? I've 
> got a framework that was built using @rpath so I'm having to set the Runtime 
> Search Path setting to @executable_path/../Frameworks so it can be found. I 
> just wondered if there was any way to set it from CMake.
> 
> Darrell
> 
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



smime.p7s
Description: S/MIME cryptographic signature
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Setting XCode Runtime Search Path

2013-02-20 Thread Darrell Blake
Hmm. I've just tried this but it didn't work for me. The "Runpath Search
Path" field is still blank.

Do I have to do things in a particular order to get it to work? Though I
have tried moving it around and still couldn't get it to work.

Darrell


On 20 February 2013 00:17, Alexey Petruchik  wrote:

> Hi, I'm doing this by adding:
> set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS
> "@executable_path/../Frameworks")
> to my CMakeLists.txt. Not sure that this is the way it should be done but
> at least it works ;)
>
> Regards, Alexey
>
>
> On Wed, Feb 20, 2013 at 1:13 AM, Darrell Blake wrote:
>
>> Is there any way to set the XCode "Runtime Search Path" linker setting?
>> I've got a framework that was built using @rpath so I'm having to set the
>> Runtime Search Path setting to @executable_path/../Frameworks so it can be
>> found. I just wondered if there was any way to set it from CMake.
>>
>> Darrell
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] detecting if c++11 available

2013-02-20 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nowadays, asking for c++-11 is probably too coarse as implementations
are usually uncomplete. So you have a stdc++-11 switch and still
missing some features on which you rely.

Another technique is to test features instead of the whole standard,
that would be more robust...

I did something like that to get a cmake build of a library used to
build with automake/autoconf (which have such a facility). It might
not be very complicated to extend to new features

Theo.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEkolIACgkQEr8WrU8nPV2AGgCgoXf6NcHIltBs2RuF4XLDcIgk
k0EAn3XVl5xsgaAw6SU2ZUugnj7OdKQL
=YSl4
-END PGP SIGNATURE-


CheckCXXFeatures.cmake.tgz
Description: application/compressed-tar
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] detecting if c++11 available

2013-02-20 Thread Benjamin Eikel
Hello Brad,

Am Mittwoch, 20. Februar 2013, 00:36:18 schrieb Brad Bell:
> My goal is to use some new c++11 features if they are available,
> otherwise to stick to the c++03 features. I need to build test programs
> that check for correctness as well as distribute an include file library.
> 
> Is there a way in cmake to detect if c++11 is available and to use it
> when it is available ? I would like this to be system and compiler
> independent.
> 

I am using the following code:

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set_property(TARGET MyTarget APPEND_STRING PROPERTY COMPILE_FLAGS 
"-std=c++11 ")
elseif(COMPILER_SUPPORTS_CXX0X)
set_property(TARGET MyTarget APPEND_STRING PROPERTY COMPILE_FLAGS 
"-std=c++0x")
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 
support. Please use a different C++ compiler.")
endif()

Kind regards
Benjamin

> 
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake