2 CMake Questions

classic Classic list List threaded Threaded
5 messages Options
tap
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

2 CMake Questions

tap
For the CMake Gurus:

0.  Here is what I'm running, on a Mac:

$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake ..
$ make 
$ make test
1.  This is failing all tests except for the Foundation framework.  When running tests using `ctest -V` instead of `make test` I can see that the reason for this is that it can't find the Foundation dylib.  This is true even if I run `make install` first because that installs to /usr/local/jamoma/lib instead of to /usr/local/lib.  How should we go about getting unit tests working?  Once we do we should get them running on Travis etc. too!

2.  I notice that running the above command only produces dynamic libraries.  For at least one project where I use Jamoma I need static libraries.  How do I specify to CMake that I want static libraries?  Is there any reason to not have it just build them while it is building the dynamic libraries?

Thanks!

Tim


------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel
tap
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 2 CMake Questions

tap
A follow-up that may get us part way there...

I can do the following and it works:

$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake ..
$ make 
$ make install
$ export DYLD_LIBRARY_PATH=/usr/local/jamoma/lib
$ make test
​My concerns are that I can't run tests on the build prior to installing and that I have to set ​DYLD_LIBRARY_PATH, which I should at least restore to it's prior setting.

I also see that the test for the SoundFileLib is crashing somehow. That might be a legit problem we need to look into.

Tim


On Fri, Aug 28, 2015 at 1:34 PM, Timothy Place <[hidden email]> wrote:
For the CMake Gurus:

0.  Here is what I'm running, on a Mac:

$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake ..
$ make 
$ make test
1.  This is failing all tests except for the Foundation framework.  When running tests using `ctest -V` instead of `make test` I can see that the reason for this is that it can't find the Foundation dylib.  This is true even if I run `make install` first because that installs to /usr/local/jamoma/lib instead of to /usr/local/lib.  How should we go about getting unit tests working?  Once we do we should get them running on Travis etc. too!

2.  I notice that running the above command only produces dynamic libraries.  For at least one project where I use Jamoma I need static libraries.  How do I specify to CMake that I want static libraries?  Is there any reason to not have it just build them while it is building the dynamic libraries?

Thanks!

Tim



------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 2 CMake Questions

Nathan Wolek-2
TTSoundfileLoader should definitely be quarantined. I had it working in tests long ago, but it never worked in the Max implementation.

Looks like @tap has already done this here:

This is actually related to this issue on JamomaMax:

Since my motivation for asking the question was in part to prevent the usage of the “load” message with a [j~ buffer] instance. But overall this instance still has no use in Max.

-Nathan


On Aug 28, 2015, at 2:48 PM, Timothy Place <[hidden email]> wrote:

I also see that the test for the SoundFileLib is crashing somehow. That might be a legit problem we need to look into.


------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 2 CMake Questions

Antoine Villeret
In reply to this post by tap
Hi Tim, 

I'm not the Guru, but I can add my 2 cents :-)

1. You can make a local installation by modifying the CMAKE_INSTALL_PREFIX when configuring with CMake.
You can also use static testing, but it seems that not all tests are static.
For example DataSpaceLib test search for libJamomaFoundation to run.
Then a workaround is to set DYLD_LIBRARY_PATH to point to the lib folder of the installation folder.
So the following works for me on Mac OS X (I just push some changes to fix static testing) : 


$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=${PWD}/JamomaInstallation -DCMAKE_OSX_ARCHITECTURES="x86_64;i386" .. # change installation directory, enable FAT Binary
$ make -j 16 # "-j 16" to speed up the build
$ make install
$ export DYLD_LIBRARY_PATH=${PWD}/JamomaInstallation/jamoma/lib
$ make test

2. AFAIK you can build static library on Apple by adding -DSTATIC_TESTING=1 to your cmake command line.
I'm pretty sure you only need that when targeting iOS, isn't it ?

Cheers 

Antoine

--
do it yourself                      
http://antoine.villeret.free.fr

2015-08-28 20:48 GMT+02:00 Timothy Place <[hidden email]>:
A follow-up that may get us part way there...

I can do the following and it works:

$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake ..
$ make 
$ make install
$ export DYLD_LIBRARY_PATH=/usr/local/jamoma/lib
$ make test
​My concerns are that I can't run tests on the build prior to installing and that I have to set ​DYLD_LIBRARY_PATH, which I should at least restore to it's prior setting.

I also see that the test for the SoundFileLib is crashing somehow. That might be a legit problem we need to look into.

Tim


On Fri, Aug 28, 2015 at 1:34 PM, Timothy Place <[hidden email]> wrote:
For the CMake Gurus:

0.  Here is what I'm running, on a Mac:

$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake ..
$ make 
$ make test
1.  This is failing all tests except for the Foundation framework.  When running tests using `ctest -V` instead of `make test` I can see that the reason for this is that it can't find the Foundation dylib.  This is true even if I run `make install` first because that installs to /usr/local/jamoma/lib instead of to /usr/local/lib.  How should we go about getting unit tests working?  Once we do we should get them running on Travis etc. too!

2.  I notice that running the above command only produces dynamic libraries.  For at least one project where I use Jamoma I need static libraries.  How do I specify to CMake that I want static libraries?  Is there any reason to not have it just build them while it is building the dynamic libraries?

Thanks!

Tim



------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel



------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel
tap
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 2 CMake Questions

tap
@nathan Thanks for the confirmation.

@antoine Thanks for the info!  

I have used static linking in the past for creating Max externals that aren't a part of the Jamoma distro and might drift out of sync with the ABI.  I'm moving these to Jamoma2 though so it isn't a big deal any more.


Tim


On Sat, Aug 29, 2015 at 1:43 PM, Antoine Villeret <[hidden email]> wrote:
Hi Tim, 

I'm not the Guru, but I can add my 2 cents :-)

1. You can make a local installation by modifying the CMAKE_INSTALL_PREFIX when configuring with CMake.
You can also use static testing, but it seems that not all tests are static.
For example DataSpaceLib test search for libJamomaFoundation to run.
Then a workaround is to set DYLD_LIBRARY_PATH to point to the lib folder of the installation folder.
So the following works for me on Mac OS X (I just push some changes to fix static testing) : 


$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=${PWD}/JamomaInstallation -DCMAKE_OSX_ARCHITECTURES="x86_64;i386" .. # change installation directory, enable FAT Binary
$ make -j 16 # "-j 16" to speed up the build
$ make install
$ export DYLD_LIBRARY_PATH=${PWD}/JamomaInstallation/jamoma/lib
$ make test

2. AFAIK you can build static library on Apple by adding -DSTATIC_TESTING=1 to your cmake command line.
I'm pretty sure you only need that when targeting iOS, isn't it ?

Cheers 

Antoine

--
do it yourself                      
http://antoine.villeret.free.fr

2015-08-28 20:48 GMT+02:00 Timothy Place <[hidden email]>:
A follow-up that may get us part way there...

I can do the following and it works:

$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake ..
$ make 
$ make install
$ export DYLD_LIBRARY_PATH=/usr/local/jamoma/lib
$ make test
​My concerns are that I can't run tests on the build prior to installing and that I have to set ​DYLD_LIBRARY_PATH, which I should at least restore to it's prior setting.

I also see that the test for the SoundFileLib is crashing somehow. That might be a legit problem we need to look into.

Tim


On Fri, Aug 28, 2015 at 1:34 PM, Timothy Place <[hidden email]> wrote:
For the CMake Gurus:

0.  Here is what I'm running, on a Mac:

$ git clone https://github.com/jamoma/JamomaCore.git
$ cd JamomaCore
$ mkdir build
$ cd build
$ cmake ..
$ make 
$ make test
1.  This is failing all tests except for the Foundation framework.  When running tests using `ctest -V` instead of `make test` I can see that the reason for this is that it can't find the Foundation dylib.  This is true even if I run `make install` first because that installs to /usr/local/jamoma/lib instead of to /usr/local/lib.  How should we go about getting unit tests working?  Once we do we should get them running on Travis etc. too!

2.  I notice that running the above command only produces dynamic libraries.  For at least one project where I use Jamoma I need static libraries.  How do I specify to CMake that I want static libraries?  Is there any reason to not have it just build them while it is building the dynamic libraries?

Thanks!

Tim



------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel



------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel



------------------------------------------------------------------------------

_______________________________________________
Jamoma-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jamoma-devel
Loading...