Re: [cmake-developers] CMake generates Makefiles that don't parallelize as much as they could.

2014-07-30 Thread Nick Overdijk
Here's the sample code:
https://github.com/NickNick/cmake-interface-includes/commits/master . The
second commit breaks the build. I sort of understand why it does, but that
means I can't use the INTERFACE-trick, so to say, even with static
libraries.

Thanks for linking the other bug.


On Mon, Jul 28, 2014 at 4:19 PM, Brad King brad.k...@kitware.com wrote:

 On 07/24/2014 05:47 PM, Nick Overdijk wrote:
  I'm using target_include_directories of A to get some include
  directories into B well, so I can't use
  target_link_libraries(A INTERFACE B),

 Can you clarify this with sample code please?

  and I can't seem to use the OBJECT-way neither since B's sources
  won't compile without A's INTERFACE_INCLUDE_DIRECTORIES...

 Usage requirements were designed with target_link_libraries as
 the main way to propagate them, but OBJECT libraries do not allow
 use with target_link_libraries.  This is an open problem with the
 design of the two features.  See also discussion here:

  http://www.cmake.org/Bug/view.php?id=14970

 -Brad


-- 

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

Re: [cmake-developers] CMake generates Makefiles that don't parallelize as much as they could.

2014-07-30 Thread Nick Overdijk
True, I was just bothered by it when we got distcc running with a good
amount of cores. Thanks for your effort. :) I'll try and make something
with the things I've learned (I'm thinking of making some functions that
propagate usage requirements yet link with INTERFACE or something along
those lines, of course only usable for static libs).


On Wed, Jul 30, 2014 at 4:51 PM, Brad King brad.k...@kitware.com wrote:

 On 07/30/2014 05:31 AM, Nick Overdijk wrote:
  https://github.com/NickNick/cmake-interface-includes/commits/master

 Thanks.  For reference, the summary is:

  cmake_minimum_required(VERSION 2.8.12)
  project(FOO CXX)
  add_library(foo foo/foo.cpp)
  target_include_directories(foo INTERFACE foo)
  add_library(bar bar/bar.cpp)
  target_link_libraries(bar foo) # reduces parallel compilation
  #target_link_libraries(bar INTERFACE foo) # compiles bar without foo reqs

 With CMake 3.0 you might be able to hack something up with INTERFACE
 libraries, but that will increase complexity.

 The INTERFACE workaround commented out in the above example is really
 only good when no usage requirements need to be propagated.  Otherwise,
 I think you're stuck with the reduced parallelism until CMake can be
 taught to detect when it is safe to drop such dependencies as I
 explained earlier.  FWIW, I've been building large projects this way
 for years and rarely been bothered by this.  Usually each library has
 so many sources that parallelism within each target is enough.

 -Brad


-- 

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

Re: [cmake-developers] CMake generates Makefiles that don't parallelize as much as they could.

2014-07-24 Thread Nick Overdijk
I'm using target_include_directories of A to get some include directories
into B well, so I can't use target_link_libraries(A INTERFACE B), and I
can't seem to use the OBJECT-way neither since B's sources won't compile
without A's INTERFACE_INCLUDE_DIRECTORIES... Any suggestions?


On Wed, Jul 23, 2014 at 3:19 PM, Nick Overdijk n...@astrant.net wrote:

 Crystal clear. Another layer of indirection eh? I'll see if I can work
 with that... Thanks for the explanation.


 On Wed, Jul 23, 2014 at 3:14 PM, Brad King brad.k...@kitware.com wrote:

 On 07/23/2014 09:07 AM, Nick Overdijk wrote:
  Oh wait, since a is in the interface of b, b will always be
  accompanied by a, even though it's not a dependency.
  Is that how it works?

 Yes.  If B is a static library then it does not really link so
 its dependencies are only ever used transitively when something
 else links to B.  If B really links as a shared library though
 then see the following.

 If target B links to target A then CMake will not compile objects
 in B until A is done.  As explained in my previous link this is
 because we allow A to contain custom commands that generate
 headers used by B.  The VS and Xcode IDE build systems offer only
 this granularity since they organize compilation and linking rules
 of a single target together.  The Makefile generator was designed
 this way too.  Only the Ninja generator has a chance of increasing
 parallelism if the extra ordering dependencies were dropped.  We've
 thought about how to do extra analysis to determine when there is
 no such custom command to drop them but have not implemented anything
 yet.

 You might be able to use OBJECT libraries to increase parallelism
 for all generators and with no changes to CMake:

  set(CMAKE_POSITION_INDEPENDENT_CODE ON)
  add_library(Aobjs OBJECT a1.c a2.c)
  add_library(Bobjs OBJECT b1.c b2.c)
  add_library(Cobjs OBJECT c1.c c2.c)
  set(dummy_c dummy.c) # needed for VS 6 and Xcode
  add_library(A SHARED $TARGET_OBJECTS:Aobjs ${dummy_c})
  add_library(B SHARED $TARGET_OBJECTS:Bobjs ${dummy_c})
  add_library(C SHARED $TARGET_OBJECTS:Cobjs ${dummy_c})
  target_link_libraries(B PUBLIC A)
  target_link_libraries(C PUBLIC B)

 This way the object compilations will be completely independent
 of one another and of the linking and ordering dependencies.

 -Brad



-- 

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

[cmake-developers] CMake generates Makefiles that don't parallelize as much as they could.

2014-07-23 Thread Nick Overdijk
Hey guys,

With this https://github.com/NickNick/cmake-dependency-waiting code here,
why do b wait for a and c wait for b to be build? The object files could
all be build in parallel right? Not doing it is making my distcc-cluster
less and less useful the more nodes I add. Is there a way to fix or work
around this?

Cheers,
-- 

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

Re: [cmake-developers] CMake generates Makefiles that don't parallelize as much as they could.

2014-07-23 Thread Nick Overdijk
Thanks for the quick reply, but what if c needs b and b needs a? Adding
INTERFACE will then break the build of course, right, since b isn't
really linked to a... Or am I mistaken?


On Wed, Jul 23, 2014 at 2:36 PM, Brad King brad.k...@kitware.com wrote:

 On 07/23/2014 08:00 AM, Nick Overdijk wrote:
  With this https://github.com/NickNick/cmake-dependency-waiting code
 here, why do b wait for a and c wait for b to be build? The object files
 could all be build in parallel right? Not doing it is making my
 distcc-cluster less and less useful the more nodes I add. Is there a way to
 fix or work around
  this?

 See here:

  http://www.cmake.org/Bug/view.php?id=14726#c35021
  http://www.cmake.org/Bug/view.php?id=14726#c35023

 -Brad


-- 

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

Re: [cmake-developers] CMake generates Makefiles that don't parallelize as much as they could.

2014-07-23 Thread Nick Overdijk
Oh wait, since a is in the interface of b, b will always be accompanied by
a, even though it's not a dependency. Is that how it works?


On Wed, Jul 23, 2014 at 2:58 PM, Nick Overdijk n...@astrant.net wrote:

 Thanks for the quick reply, but what if c needs b and b needs a? Adding
 INTERFACE will then break the build of course, right, since b isn't
 really linked to a... Or am I mistaken?


 On Wed, Jul 23, 2014 at 2:36 PM, Brad King brad.k...@kitware.com wrote:

 On 07/23/2014 08:00 AM, Nick Overdijk wrote:
  With this https://github.com/NickNick/cmake-dependency-waiting code
 here, why do b wait for a and c wait for b to be build? The object files
 could all be build in parallel right? Not doing it is making my
 distcc-cluster less and less useful the more nodes I add. Is there a way to
 fix or work around
  this?

 See here:

  http://www.cmake.org/Bug/view.php?id=14726#c35021
  http://www.cmake.org/Bug/view.php?id=14726#c35023

 -Brad



-- 

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

Re: [cmake-developers] CMake generates Makefiles that don't parallelize as much as they could.

2014-07-23 Thread Nick Overdijk
Crystal clear. Another layer of indirection eh? I'll see if I can work with
that... Thanks for the explanation.


On Wed, Jul 23, 2014 at 3:14 PM, Brad King brad.k...@kitware.com wrote:

 On 07/23/2014 09:07 AM, Nick Overdijk wrote:
  Oh wait, since a is in the interface of b, b will always be
  accompanied by a, even though it's not a dependency.
  Is that how it works?

 Yes.  If B is a static library then it does not really link so
 its dependencies are only ever used transitively when something
 else links to B.  If B really links as a shared library though
 then see the following.

 If target B links to target A then CMake will not compile objects
 in B until A is done.  As explained in my previous link this is
 because we allow A to contain custom commands that generate
 headers used by B.  The VS and Xcode IDE build systems offer only
 this granularity since they organize compilation and linking rules
 of a single target together.  The Makefile generator was designed
 this way too.  Only the Ninja generator has a chance of increasing
 parallelism if the extra ordering dependencies were dropped.  We've
 thought about how to do extra analysis to determine when there is
 no such custom command to drop them but have not implemented anything
 yet.

 You might be able to use OBJECT libraries to increase parallelism
 for all generators and with no changes to CMake:

  set(CMAKE_POSITION_INDEPENDENT_CODE ON)
  add_library(Aobjs OBJECT a1.c a2.c)
  add_library(Bobjs OBJECT b1.c b2.c)
  add_library(Cobjs OBJECT c1.c c2.c)
  set(dummy_c dummy.c) # needed for VS 6 and Xcode
  add_library(A SHARED $TARGET_OBJECTS:Aobjs ${dummy_c})
  add_library(B SHARED $TARGET_OBJECTS:Bobjs ${dummy_c})
  add_library(C SHARED $TARGET_OBJECTS:Cobjs ${dummy_c})
  target_link_libraries(B PUBLIC A)
  target_link_libraries(C PUBLIC B)

 This way the object compilations will be completely independent
 of one another and of the linking and ordering dependencies.

 -Brad


-- 

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

Re: [CMake] find_package(mpi) language specification

2013-09-05 Thread Nick Overdijk
You can pass the QUIET parameter to find_package... that'll at least shut it 
up. Perhaps easiest in your case.

On 2013-05-09, at 18:22:25 , Andrew Corrigan wrote:

 Hello,
 
 My C++ code only uses the MPI C library. 
 
 1. Is there a way to tell find_package(MPI) to only look for the C version?
 2. If not, can FindMPI.cmake be changed to support this (just like with Boost 
 you can specify only the components you need)
 3. If not, can that warning message  Could NOT find MPI_CXX missing: 
 MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH be suppressed?  It is *extremely* 
 confusing to users.
 
 More info:
 
 The language-specific detection for MPI that was added a few versions ago has 
 been a huge help in avoiding linking with the deprecated MPI C++ library.  I 
 still have a problem, and that is find_package(MPI) still attempts to find 
 the MPI C++ library.
 
 When it is not found, which is more often than not the case on the various 
 HPC systems this code runs on, the warning Could NOT find MPI_CXX missing: 
 MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH is issued.  I do not want CMake to 
 even try to detect the C++ version of MPI, and this has been a major source 
 of confusion for users of this code, since they think that something has gone 
 wrong and report it to me. In response to this, I added the following 
 clarification, but despite this, users remain confused.
 
 if(NOT MPI_CXX_FOUND)
 message(STATUS == MPI_CXX_* IS NOT REQUIRED)
 message(STATUS == IGNORE ANY WARNING REGARDING MPI_CXX_*)
 end
 
 
 Thanks,
 Andrew Corrigan
 
 --
 
 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

--

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] Updated code in header file ignored?

2013-03-17 Thread Nick Overdijk
Howdy,

I have a header file, vertices.hpp with some not-inline function-definitions 
(yes really defs not decls), and a project, beamer. Sometimes when I change 
vertices.hpp, the changes don't reflect in the binary. I was wondering why this 
is, so I grepped a bit in my build-dir:

./motor/CMakeFiles/motor.dir/CXX.includecache:1224:vertices.hpp
./motor/CMakeFiles/motor.dir/CXX.includecache:1225:/Users/nick/Documents/Code/new-onegame/motor/basic/vertices.hpp
./motor/CMakeFiles/motor.dir/CXX.includecache:1241:/Users/nick/Documents/Code/new-onegame/motor/basic/vertices.hpp
./motor/CMakeFiles/motor.dir/depend.internal:438: 
/Users/nick/Documents/Code/new-onegame/motor/basic/vertices.hpp
./motor/CMakeFiles/motor.dir/depend.internal:558: 
/Users/nick/Documents/Code/new-onegame/motor/basic/vertices.hpp
./motor/CMakeFiles/motor.dir/depend.make:437:motor/CMakeFiles/motor.dir/basic/mesh.cpp.o:
 ../motor/basic/vertices.hpp
./motor/CMakeFiles/motor.dir/depend.make:557:motor/CMakeFiles/motor.dir/basic/resource_cache.cpp.o:
 ../motor/basic/vertices.hpp
./src/CMakeFiles/beamer.dir/CXX.includecache:116:vertices.hpp
./src/CMakeFiles/beamer.dir/CXX.includecache:117:../src/../motor/basic/vertices.hpp
./src/CMakeFiles/beamer.dir/CXX.includecache:1462:vertices.hpp

And that's all mentions of vertices.hpp in beamer. Shouldn't I see vertices.hpp 
also in the depend.make or something?

Any other tips/suggestions/questions are more more more than welcome since this 
has been annoying me for quite some time.

Thanks in advance, 
--

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] FInd threads - iOS

2013-03-14 Thread Nick Overdijk
You should install boost in /usr/local with ./b2 install, then more packages 
will find it. Did you do this or not?

Anyway, I just did this:

git clone git://github.com/SOCI/soci.git
cd soci
cd src
mkdir build
cd build
cmake ..

And it worked for me. So what did you do exactly?

On 2013-14-03, at 18:52:08 , Casey Basichis wrote:

 Hi,
 
 I'm tryng to build SOCI on iOS.  I was able to enter my boost path in my 
 ~/.profile to get that running, but I'm getting stuck on finding threads.
 
 -- Could NOT find Threads (missing:  Threads_FOUND) 
 CMake Error at core/CMakeLists.txt:22 (message): 
   No thread library found 
 
 Is there a way to set a path manually to a threading library like I did with 
 boost?  What can I do to get this building?
 
 Thanks,
 Casey
 
 -- 
 Casey James Basichis
 Composer - Adventure Time - Cartoon Network
 http://www.caseyjamesbasichis.com
 caseybasic...@gmail.com
 310.387.7540
 --
 
 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] Build several targets using cmake --build dir

2013-03-14 Thread Nick Overdijk
You can only 'cmake' a single-target. If you want to have more targets, create 
more directories: for each target one.

On 2013-14-03, at 19:07:36 , John Drescher wrote:

 I use cmake 2.8.10 on windows.
 
 
 
 I would like to build several targets with cmake --build dir so  the
 underlying build tool to do parallel jobs.
 
 
 
 Currently it only seems to be possible to build one target at a time, using
 --target .
 (http://www.cmake.org/cmake/help/v2.8.10/cmake.html#opt:--builddir)
 
 
 
 Can someone tell me how I could achieve that with current cmake version?
 
 
 I execute more than 1 cmake --build at the same time on windows. I
 actually do this in a program called runjobs
 
 http://www.codeproject.com/Articles/25810/Run-All-Jobs-at-Once-Utility
 
 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

--

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] FInd threads - iOS

2013-03-14 Thread Nick Overdijk
Hmm, well I think you're missing some variables. The buildscript up on the site 
could use some updates, but that should be your ticket.

On 2013-14-03, at 19:10:08 , Casey Basichis wrote:

 Hi,
 
 I followed your instructions.
 
 I also modified the make files a bit according to this - 
 http://ares.lids.mit.edu/redmine/projects/forest-game/wiki/Building_soci_for_iOS
 Though I'm not using their scripts.
 
 I compiled to 386:Arm7 fat target.  Here are the errors I get.  The thread 
 bits are at the bottom.  Everything else seem ok - though the printed out 
 data suggest the compiler is not clang, it seems to be using it.
 
 cmake 
 -DIOS_INCLUDE_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include
  -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_OSX_ARCHITECTURES=i386;armv7 
 -DSOCI_EMPTY=OFF -DSOCI_MYSQL=OFF -DSOCI_ODBC=OFF -DSOCI_ORACLE=OFF 
 -DSOCI_POSTGRESQL=OFF -DSOCI_SQLITE3=ON -DSOCI_TESTS=OFF ../
 
 -- The C compiler identification is Clang 4.2.0
 -- The CXX compiler identification is Clang 4.2.0
 -- Check for working C compiler: /usr/bin/cc
 -- Check for working C compiler: /usr/bin/cc -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - failed
 -- Check for working CXX compiler: /usr/bin/clang++
 -- Check for working CXX compiler: /usr/bin/clang++ -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - failed
 -- Configuring SOCI: 
 -- SOCI_VERSION = 3.2.0 
 -- SOCI_ABI_VERSION = 3.2 
 -- SOCI_PLATFORM_NAME   = x86 
 -- SOCI_COMPILER_NAME   = gcc-4.2.1 
 -- SOCI_STATIC  = ON 
 -- SOCI_TESTS   = OFF 
 -- Looking for SOCI dependencies: 
 -- Boost: 
 -- Boost_RELEASE_VERSION= 1.52.0 
 -- Boost_INCLUDE_DIR= /Prog/Frameworks/boost_1_52_0 
 -- Boost_LIBRARIES  =  
 -- MySQL: 
 -- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION
 -- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION - Failed
 -- MySQL not found.
 -- MySQL Embedded not found.
 -- WARNING: 
 -- MySQL not found, some libraries or features will be disabled. 
 -- See the documentation for MySQL or manually set these variables: 
 -- MYSQL_INCLUDE_DIR= MYSQL_INCLUDE_DIR-NOTFOUND 
 -- MYSQL_LIBRARIES  = MYSQL_LIBRARIES-NOTFOUND 
 -- ODBC: 
 -- ODBC_INCLUDE_DIR = /usr/include 
 -- ODBC_LIBRARIES   = /usr/lib/libiodbc.dylib 
 -- Oracle: 
 -- WARNING: 
 -- Oracle not found, some libraries or features will be disabled. 
 -- See the documentation for Oracle or manually set these variables: 
 -- ORACLE_INCLUDE_DIR   =  
 -- ORACLE_LIBRARIES =  
 -- PostgreSQL: 
 -- POSTGRESQL_INCLUDE_DIR   = /usr/include 
 -- POSTGRESQL_LIBRARIES = /usr/lib/libpq.dylib 
 -- POSTGRESQL_VERSION   = 9.1.4 
 -- SQLite3: 
 -- SQLITE3_INCLUDE_DIR  = /usr/include 
 -- SQLITE3_LIBRARIES= /usr/lib/libsqlite3.dylib 
 -- Firebird: 
 -- WARNING: 
 -- Firebird not found, some libraries or features will be disabled. 
 -- See the documentation for Firebird or manually set these variables: 
 -- FIREBIRD_INCLUDE_DIR = FIREBIRD_INCLUDE_DIR-NOTFOUND 
 -- FIREBIRD_LIBRARIES   = FIREBIRD_LIBRARIES-NOTFOUND 
 -- FIREBIRD_VERSION =  
 -- DB2: 
 -- WARNING: 
 -- DB2 not found, some libraries or features will be disabled. 
 -- See the documentation for DB2 or manually set these variables: 
 -- DB2_INCLUDE_DIR  = DB2_INCLUDE_DIR-NOTFOUND 
 -- DB2_LIBRARIES= DB2_LIBRARY-NOTFOUND 
 -- Configuring SOCI core library: 
 -- Looking for include file pthread.h
 -- Looking for include file pthread.h - not found
 -- Could NOT find Threads (missing:  Threads_FOUND) 
 CMake Error at core/CMakeLists.txt:22 (message):
   No thread library found
 
 
 -- Configuring incomplete, errors occurred!
 
 
 
 
 On Thu, Mar 14, 2013 at 11:01 AM, Nick Overdijk n...@astrant.net wrote:
 You should install boost in /usr/local with ./b2 install, then more packages 
 will find it. Did you do this or not?
 
 Anyway, I just did this:
 
 git clone git://github.com/SOCI/soci.git
 cd soci
 cd src
 mkdir build
 cd build
 cmake ..
 
 And it worked for me. So what did you do exactly?
 
 On 2013-14-03, at 18:52:08 , Casey Basichis wrote:
 
 Hi,
 
 I'm tryng to build SOCI on iOS.  I was able to enter my boost path in my 
 ~/.profile to get that running, but I'm getting stuck on finding threads.
 
 -- Could NOT find Threads (missing:  Threads_FOUND) 
 CMake Error at core/CMakeLists.txt:22 (message): 
   No thread library found 
 
 Is there a way

Re: [CMake] Setting XCode Runtime Search Path

2013-02-19 Thread Nick Overdijk
Dakon, Don't know his real name, sorry, wrote something for this, you can get 
it here:

git://anongit.kde.org/scratch/dakon/cmake-cxx11

On 2013-20-02, at 01:17:28 , 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 darrell.bl...@gmail.com 
 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

Re: [CMake] Best way to 'pull through' dependencies of External projects?

2013-02-14 Thread Nick Overdijk
I don't really get your specific problem... CMake can find and install ITK and 
DCMTK just fine here? (I had to manipulate the linker-order of DCMTK a bit but 
that's almost to be expected, sadly).

You're saying that when you find_package(DCMTK) it's libraries doesn't include 
some library it needs?

On 2013-14-02, at 16:45:12 , Kent Williams wrote:

 The specific problem I'm trying to solve:
 
 Build DCMTK library, along with libraries upon which it depends, for use by 
 ITK as a 'system library'
 
 The problem: Setting up the External Projects is simple enough; the problem 
 is that the revision/configuration of TIFF -- 3.9.4 -- by default requires 
 ZLib.
 
 DCMTK builds against this external TIFF library just fine.
 
 What doesn't happen?  The TIFF's ZLib dependency doesn't get propogated to 
 builds that depend on DCMTK, so Zlib is not on the DCMTK library list.
 
 This wouldn't be a problem if TIFF and DCMTK were proper CMake builds. If 
 they were when they export their libraries, find_package would carry along 
 the dependencies of the imported libraries.
 
 There doesn't appear to be either an elegant or a quick  dirty solution to 
 this. The problem is that until DCMTK creates proper CMake config files that 
 clue in ITK to DCMTK's own dependencies, ITK's own CMake config files will 
 not reflect those dependencies.
 
 Suggestions?
 
 Oh, and by the way I am trying to get DCMTK to generate proper configuration 
 files for find_package(NO_MODULE): 
 https://github.com/InsightSoftwareConsortium/DCMTK/tree/AddProperConfig
 --
 
 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] Best way to 'pull through' dependencies of External projects?

2013-02-14 Thread Nick Overdijk
So patch FindDCMTK/FindTIFF in such a way that it add zlib to the dependencies, 
use that, and send the patch to your local maintainer?

On 2013-14-02, at 17:01:53 , Kent Williams wrote:

 @Nick find_package(DCMTK) does an OK job.  The specific issue I ran into is 
 that TIFF depends on Zlib and that dependency isn't pulled through into 
 DCMTK's dependencies.
 
 The FindDCMTK.cmake that is in the current CMake distro has issues.  
 
 @Ansis -- if all I cared about was getting one package built, I would do what 
 you suggest.  But I am trying to build robust CMake infrastructure here, that 
 will be useful beyond the one project I'm starting with.
 
 
 
 On Thu, Feb 14, 2013 at 9:54 AM, Ansis Māliņš ansis.mal...@gmail.com wrote:
 If I guessed right, your problem is linker errors when building your project. 
 My solution is to just manually add whatever extra target_link_libraries are 
 needed to shut the linker up and move on.
 
 
 On Thu, Feb 14, 2013 at 5:48 PM, Nick Overdijk n...@astrant.net wrote:
 I don't really get your specific problem... CMake can find and install ITK 
 and DCMTK just fine here? (I had to manipulate the linker-order of DCMTK a 
 bit but that's almost to be expected, sadly).
 
 You're saying that when you find_package(DCMTK) it's libraries doesn't 
 include some library it needs?
 
 On 2013-14-02, at 16:45:12 , Kent Williams wrote:
 
 The specific problem I'm trying to solve:
 
 Build DCMTK library, along with libraries upon which it depends, for use by 
 ITK as a 'system library'
 
 The problem: Setting up the External Projects is simple enough; the problem 
 is that the revision/configuration of TIFF -- 3.9.4 -- by default requires 
 ZLib.
 
 DCMTK builds against this external TIFF library just fine.
 
 What doesn't happen?  The TIFF's ZLib dependency doesn't get propogated to 
 builds that depend on DCMTK, so Zlib is not on the DCMTK library list.
 
 This wouldn't be a problem if TIFF and DCMTK were proper CMake builds. If 
 they were when they export their libraries, find_package would carry along 
 the dependencies of the imported libraries.
 
 There doesn't appear to be either an elegant or a quick  dirty solution to 
 this. The problem is that until DCMTK creates proper CMake config files that 
 clue in ITK to DCMTK's own dependencies, ITK's own CMake config files will 
 not reflect those dependencies.
 
 Suggestions?
 
 Oh, and by the way I am trying to get DCMTK to generate proper configuration 
 files for find_package(NO_MODULE): 
 https://github.com/InsightSoftwareConsortium/DCMTK/tree/AddProperConfig
 --
 
 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] Dependency for launching an application

2013-02-08 Thread Nick Overdijk
Can't you only launch parent.exe in VS and remove the dependency?

On 2013-08-02, at 12:19:56 , Andreas Haferburg wrote:

 In our build, we have two executables, parent.exe launches child.exe as a 
 child process. ATM the build is set up with add_dependencies(parent child). 
 So when using F5 in Visual Studio, child.exe is built first, then parent.exe, 
 then parent.exe is launched. Is it possible to set this up such that 
 child.exe and parent.exe are built in parallel before launching parent?
 
 Regards
 Andreas
 --
 
 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] Dependency for launching an application

2013-02-08 Thread Nick Overdijk
Well cmake will take care of that if you target_link_library(common), right?

On 2013-08-02, at 12:50:13 , Andreas Haferburg wrote:

 Right, sorry. I should have mentioned that they both depend on some library 
 common.lib. When that library has to be rebuilt, both exes need to be 
 rebuilt, too.
 
 Andreas
 
 
 On 08.02.2013 12:21, Nick Overdijk wrote:
 Can't you only launch parent.exe in VS and remove the dependency?
 
 On 2013-08-02, at 12:19:56 , Andreas Haferburg wrote:
 
 In our build, we have two executables, parent.exe launches child.exe as a 
 child process. ATM the build is set up with add_dependencies(parent child). 
 So when using F5 in Visual Studio, child.exe is built first, then 
 parent.exe, then parent.exe is launched. Is it possible to set this up such 
 that child.exe and parent.exe are built in parallel before launching parent?
 
 Regards
 Andreas
 --
 
 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
 
 
 
 -- 
 Scopis GmbH
 Blücherstr. 22
 10961 Berlin
 Germany
 
 E-Mail: ahaferb...@scopis.com
 Tel.: +49 (30) 201 69 38 0
 Fax.: +49 (30) 201 69 38 20
 Internet: www.scopis.com
 
 HRB 128315 Berlin Charlottenburg
 USt-IdNr.: DE272721463
 Steuernummer: 29/014/02034
 Geschäftsführer:  Bartosz Kosmecki
 
 Diese E-mail, einschließlich der Anhänge, ist ausschließlich für den oben 
 genannten Adressaten bestimmt und beinhaltet vertrauliche und/oder gesetzlich 
 geschützte Informationen. Jedem anderen Empfänger ist die Vervielfältigung, 
 Weitergabe oder Veröffentlichung untersagt. Falls Sie diese Mitteilung 
 irrtümlicherweise erhalten haben, bitten wir um sofortige Information an den 
 Absender und Vernichtung der E-mail.
 
 This e-mail, including the attachments, is for the exclusive use of the 
 above-named addresses and contains confidential information and/or 
 information protected by law. Any other recipient is prohibited from 
 duplicating, passing on to third parties, or publishing this information. If 
 by error you are the recipient of this communication please inform the sender 
 immediately and permanently delete this e-mail.

--

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] Dependency for launching an application

2013-02-08 Thread Nick Overdijk
I'm probably missing something, but why

 add_dependencies(parent child)

? That doesn't make sense. Parent is not using anything from child. You can 
just leave that line away and everything will be fine right?

On 2013-08-02, at 16:24:21 , Andreas Haferburg wrote:

 Yes, that's pretty much the setup we have: The common (static) library 
 contains almost all obj's, and the two exe projects only have a small 
 main.obj and link against the library. I'd like to eliminate the build(=link) 
 time of child.exe by having the linker link both exes at the same time.
 
 Regards,
 Andreas
 
 
 On 08.02.2013 15:41, Patrick Johnmeyer wrote:
 On Fri, Feb 8, 2013 at 8:16 AM, Andreas Haferburg ahaferb...@scopis.com
 mailto:ahaferb...@scopis.com wrote:
 
What happens is that common is built, then child, then parent, then 
 parent is executed.
What I'd like to happen is that common is built, then child+parent are 
 being built concurrently,
and as soon as both are done, parent is executed.
 
 
 Unfortunately that's just not how dependencies work. If parent is dependent 
 on child, then child
 will build before parent in serial. And since they are both dependent on 
 common, you essentially
 have a linear dependency in your example.
 
 You could break this up by creating a new target that is dependent on child 
 and parent, and
 eliminate parent's direct dependency on child. This will allow child and 
 parent to be built
 simultaneously. You would then need to do something with this new target 
 so that it will cause
 parent to be run.
 
 You may be able to improve build times (assuming that is the driver) by 
 invoking the compiler flag
 for parallel compilation. Another option may be to convert the majority of 
 child and parent to
 another library, with small simple executable projects that invoke those 
 libraries. This moves the
 dependencies around in a way that you *may* get better build performance ... 
 but everything I say is
 speculative without knowing the nitty gritty of your project -- build times 
 per project, full
 dependency graph, etc.
 --
 
 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] CMAKE_lang_COMPILER_ID not set on Darwin

2013-01-30 Thread Nick Overdijk
We use this

if(CMAKE_C_COMPILER MATCHES clang OR CMAKE_CXX_COMPILER MATCHES clang)
set(COMPILING_WITH_CLANG True)
elseif(CMAKE_C_COMPILER MATCHES .*gcc.* OR CMAKE_CXX_COMPILER MATCHES 
.*g[+][+].*)
set(COMPILING_WITH_GCC True)
endif()

In our project

On 2013-30-01, at 14:42:05 , Thomas Nilsson wrote:

 I was looking for a way to identify the compiler as clang to know if I should 
 pass it a clang specific flag (-x c++).
 
 On Darwin default compiler is Clang used through /usr/bin/cc and and 
 /usr/bin/c++. The identification is clearly signaled as Clang 4.1.0 but 
 CMAKE_CXX_COMPILER_ID is not set. Obviously CMAKE_CXX_COMPILER is set to 
 /usr/bin/c++.
 
 Given my belief that CMAKE_CXX_COMPILER_ID will not be implemented soon, what 
 are my options?
 
 Thomas
 
 --
 
 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] CLANG_CXX_LIBRARY

2013-01-24 Thread Nick Overdijk
CXXFLAGS=flags to your compiler here cmake 

or 

cmake -DCMAKE_CXX_FLAGS=flags to your compiler here


On 2013-24-01, at 13:02:58 , ambreen haleem wrote:

 Hi,
 
 I want to set clang_cxx_library parameter in cmake. Does not seems to be 
 working by passing through linker. Is there a way I can do that?
 
 Regards
 Ambreen
 --
 
 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] Why does ExternalProject require root access?

2013-01-20 Thread Nick Overdijk
I use add_subdirectory to add bullet and sdl.. Could you try that? I've never 
worked with ExternalProject_Add and wouldn't really know what it does.

On 2013-20-01, at 22:26:44 , Ansis Māliņš wrote:

 The line
 ExternalProject_Add(bullet PREFIX ${PROJECT_SOURCE_DIR})
 fails with
 Install the project...
 -- Install configuration: Release
 CMake Error at cmake_install.cmake:38 (FILE):
   file cannot create directory: /usr/local/lib/pkgconfig.  Maybe need
   administrative privileges.
 
 Why? How do I avoid needing root for building my project?
 
 What I'm trying to do: Build several projects (bullet, ogre, btogre, sdl, 
 mygame) into one thing. ExternalProject seems like the correct way to do that.
 
 Lubuntu Linux 12.04
 CMake 2.8.7
 --
 
 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] Why does ExternalProject require root access?

2013-01-20 Thread Nick Overdijk
You don't use find_package when add_subdirectory, just 
target_link_library(target name by Bullet).

I'm not sure if this is frowned upon or not, but it does work, and shouldn't 
change that often or anything. Strictly speaking it's a bit dirty though.

Thing is, why is bullet build by you? Do you need it in this repository, and to 
be build by your root cmake? If not, just build it, install it, and use 
find_package. It's a lot cleaner.

On 2013-20-01, at 23:33:05 , Ansis Māliņš wrote:

  I use add_subdirectory to add bullet and sdl.. Could you try that?
 That's what I tried initially, but another external project dependent on 
 Bullet, btOgre, failed to find_package(Bullet). I think it's because when 
 CMake configures btOgre it expects Bullet binaries to be built and installed 
 already.
 --
 
 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] cmake system library

2013-01-12 Thread Nick Overdijk
You could install boost to /usr/local if you're on linux/OSX? That's the 
standard location for non-system libs, CMake-Modules will look there.

On 2013-12-01, at 13:04:50 , peterle oberwi wrote:

 Hi,
 
 I want to use Boost library in my project. But there is one version installed 
 in the system, but not the version I want to use in my project. Therefore I 
 build the version and installed to a directory in my home. When I want to use 
 this version it's very anyoing, because cmake find the system version. My 
 solution is to give a path to the find_package command and use my own modifed 
 cmake module to use my version. Is there an easier solution to use non-system 
 libraries without modifying the cmake module or to set specific variables 
 e.g. there are libraries like qt which have no variables which can be set.
 
 regards 
 
 peter
 --
 
 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

[CMake] CMAKE_INCLUDE_SYSTEM_FLAG_CXX set to -I by default?

2013-01-12 Thread Nick Overdijk
When I use include_directories(SYSTEM $path), it still includes stuff with -I. 
Through 
http://stackoverflow.com/questions/3371127/use-isystem-instead-of-i-with-cmake 
I found out I should change some variable, but this seems like a bug in 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] swig - how do I set compile flags on the generated files?

2012-11-27 Thread Nick Overdijk
Aren't you the one generating those names?

http://www.swig.org/Doc1.3/Introduction.html#Introduction%5Fbuild%5Fsystem

On 2012-28-11, at 01:11:24 , Miller Henry wrote:

 Our normal coding standards requires zero warnings with –wall –wextra  
 (gcc/clang), but often the swig generated file has warnings.   We don’t mind 
 turning these warnings off for the generated file, but we still want to see 
 them for other files in the project.  However I’m stumped on how to do this.
  
 Currently I have
  
 ADD_DEFINITIONS(-Wno-unused-parameter …)
  
 which works but it disables the warning for non-generated files as well.
  
 I understand the right way to do this is by:
  
 Set_source_files_property(filename PROPERTIES COMPILE_FLAGS 
 “-Wno-unused-parameter  …”)
  
 However I don’t have filename.  Instead I have myInputfile.i, which gets 
 turns into something like myInputFilePYTHON_wrap.cxx.  Of course I can 
 generate this name, but that seems fragile: if cmake desides to change the 
 file mangling in the future I need to change my algorithm. 
  
 So the question is either: is there are good way to get the generated 
 filename, or is there a different way I should be doing this?
  
  
 --
 
 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] swig - how do I set compile flags on the generated files?

2012-11-27 Thread Nick Overdijk
I had a derp, sorry about that. Obviously you don't, hah. 

You can put all the swig-generated files in a directory, and then perhaps set 
the properties with a glob?

On 2012-28-11, at 02:22:00 , Nick Overdijk wrote:

 Aren't you the one generating those names?
 
 http://www.swig.org/Doc1.3/Introduction.html#Introduction%5Fbuild%5Fsystem
 
 On 2012-28-11, at 01:11:24 , Miller Henry wrote:
 
 Our normal coding standards requires zero warnings with –wall –wextra  
 (gcc/clang), but often the swig generated file has warnings.   We don’t mind 
 turning these warnings off for the generated file, but we still want to see 
 them for other files in the project.  However I’m stumped on how to do this.
  
 Currently I have
  
 ADD_DEFINITIONS(-Wno-unused-parameter …)
  
 which works but it disables the warning for non-generated files as well.
  
 I understand the right way to do this is by:
  
 Set_source_files_property(filename PROPERTIES COMPILE_FLAGS 
 “-Wno-unused-parameter  …”)
  
 However I don’t have filename.  Instead I have myInputfile.i, which gets 
 turns into something like myInputFilePYTHON_wrap.cxx.  Of course I can 
 generate this name, but that seems fragile: if cmake desides to change the 
 file mangling in the future I need to change my algorithm. 
  
 So the question is either: is there are good way to get the generated 
 filename, or is there a different way I should be doing this?
  
  
 --
 
 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] Incoherent compiler detection in MacOSX 10.7.4

2012-10-03 Thread Nick Overdijk
I'm not sure where it was, but CMake prefers gcc over cc, and cxx over g++. You 
can force it by setting CC=clang.

On 2012-03-10, at 09:27:28 , Pere Mato Vila wrote:

 In my Mac system (10.7.4) with Xcode (4.4.1)  CMake finds by default the GNU 
 compiler for C and Clang for C++. This posses problems later when building my 
 package.  The package can be built correctly either with Clang or with GCC 
 but not in a mixed mode. See the cmake output:  
 
 -- The C compiler identification is GNU 4.2.1
 -- The CXX compiler identification is Clang 4.0.0
 -- Checking whether C compiler has -isysroot
 -- Checking whether C compiler has -isysroot - yes
 -- Checking whether C compiler supports OSX deployment target flag
 -- Checking whether C compiler supports OSX deployment target flag - yes
 -- Check for working C compiler: /Developer/usr/bin/gcc
 -- Check for working C compiler: /Developer/usr/bin/gcc -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Check for working CXX compiler: /usr/bin/c++
 -- Check for working CXX compiler: /usr/bin/c++ -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 
 
 The question is how this is possible? What is the logic to detect the 
 compiler used by CMake? I know that I can force a given compiler with the 
 CMAKE_XXX_COMPILER or by defining the environment variables CXX and CC but it 
 would be nice that  the proper selection is done without any user 
 intervention. 
 
 % which cc c++
 /usr/bin/cc
 /usr/bin/c++
 
 % ls -ls /usr/bin/cc
 8 lrwxr-xr-x  1 root  wheel  5 Aug 22 09:09 /usr/bin/cc - clang
 % ls -ls /usr/bin/c++
 8 lrwxr-xr-x  1 root  wheel  7 Aug 22 09:09 /usr/bin/c++ - clang++
 
 -
 Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
  e-mail: pere.m...@cern.ch  tel: +41 22 76 78696
  fax:  +41 22 76 68792gsm: +41 76 48 70855
 
 
 --
 
 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] Boost

2012-08-08 Thread Nick Overdijk
Try again with this example:

http://stackoverflow.com/questions/3897839/how-to-link-c-program-with-boost-using-cmake


On 2012-08-08, at 12:52:06 , Sumit Adhikari wrote:

 I am searching boost like as follows :
 
 # Boost Library Search
 find_package (Boost)
 if (Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
   link_directories(${Boost_LIBRARY_DIRS})
   set(LIBS ${LIBS} ${Boost_LIBRARIES})
 else()
message(FATAL_ERROR Boost Not Found)
 endif (Boost_FOUND)
 
 I see the boost library has been found but include_directories, 
 link_directories and LIBS are not updated. Is this because I do not have 
 boost.pc in my system ?
 
 Any other way to resolve this ?
 
 Regards,
 
 -- 
 Sumit Adhikari,
 Institute of Computer Technology,
 Faculty of Electrical Engineering,
 Vienna University of Technology,
 Gußhausstraße 27-29,1040 Vienna
 --
 
 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] Boost

2012-08-08 Thread Nick Overdijk
No, as far as I know you need to specify the components for boost always. I
know of some find_boost that just put everything in there when you didn't
name components, but as a rule, just specifiy the components. ;-)

On Wed, Aug 8, 2012 at 1:29 PM, Sumit Adhikari sumit.adhik...@gmail.comwrote:

 Thanks for the reply. But is this is a Bug ?


 Regards,
 Sumit


 On Wed, Aug 8, 2012 at 1:28 PM, Nick Overdijk n...@astrant.net wrote:

 Try again with this example:


 http://stackoverflow.com/questions/3897839/how-to-link-c-program-with-boost-using-cmake


 On 2012-08-08, at 12:52:06 , Sumit Adhikari wrote:

 I am searching boost like as follows :

 # Boost Library Search
 find_package (Boost)
 if (Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
   link_directories(${Boost_LIBRARY_DIRS})
   set(LIBS ${LIBS} ${Boost_LIBRARIES})
 else()
message(FATAL_ERROR Boost Not Found)
 endif (Boost_FOUND)

 I see the boost library has been found but include_directories,
 link_directories and LIBS are not updated. Is this because I do not have
 boost.pc in my system ?

 Any other way to resolve this ?

 Regards,

 --
 Sumit Adhikari,
 Institute of Computer Technology,
 Faculty of Electrical Engineering,
 Vienna University of Technology,
 Gußhausstraße 27-29,1040 Vienna
  --

 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





 --
 Sumit Adhikari,
 Institute of Computer Technology,
 Faculty of Electrical Engineering,
 Vienna University of Technology,
 Gußhausstraße 27-29,1040 Vienna

--

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