Re: [CMake] toolchain file - cross-compiling windows-amd64->windows-x86

2019-09-19 Thread Gonzalo Garramuño


El 17/9/19 a las 16:46, fdk17 escribió:


I personally never seen anyone try to use the Ninja generator via 
command line CMake and use the cl.exe compiler.
I've only seen that using Visual Studio to open a CMakeLists.txt file 
it can produce a Ninja project.  But even MS documentation states that 
it doesn't always work.


I use it just like that.  I open a .bat file that calls vsvars with the 
right settings and then calls msys bash. Find it below:



@echo off

call "C:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/vcvarsall.bat" amd64 8.1

C:
C:\MinGW\msys\1.0\msys.bat -rxvt

Then I call cmake and ninja with a bash script (both are in the bash 
PATH).  Find it attached.



--

Gonzalo Garramuño

#!/bin/bash

#
# Determine CPU architecture
#
KERNEL=`uname -s`

if [[ $KERNEL == CYGWIN* ]]; then
KERNEL=Windows
RELEASE=(`cmd /c 'ver'`)
RELEASE=${RELEASE[3]%.[0-9]*}
elif [[ $KERNEL == MINGW* ]]; then
RELEASE=(`cmd /c 'ver'`)
#RELEASE=${RELEASE[3]%.[0-9]*}
RELEASE=${RELEASE[3]/]/}
KERNEL=Windows
else
RELEASE=`uname -r`
fi


if [[ "$RELEASE" == "" ]]; then
$RELEASE=`cmd.exe /c 'ver'`
echo $RELEASE
echo "Could not determine OS version"
exit 1
fi

CMAKE_OPTS=${CMAKE_OPTS=""}

export CMAKE_NATIVE_ARCH=32
export CMAKE_BUILD_TYPE=Release
export CMAKE_PROCS=8
export OS_32_BITS=1
export OS_64_BITS=

if [ $KERNEL == 'Windows' ]; then
arch=`wmic OS get OSArchitecture`
if [[ $arch == *64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
fi
else
arch=`uname -a`
fi

if [[ $arch == *x86_64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
else
if [[ $arch == *ia64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
unset  OS_32_BITS
fi
fi


export CMAKE_BUILD_ARCH=$CMAKE_NATIVE_ARCH

OS=$KERNEL-$RELEASE


usage()
{
cat <  use a different cmake generator (default: Ninja)

  debug|release|reldebug|small
  debug- build a debug build
  release  - build a release build (default)
  reldebug - build a release build with debug information
  small- build a small release build

  both|32|64
 Builds both 32/64 bit versions, 32-bit only,
 64-bit only (default: $CMAKE_BUILD_ARCH)

  cache- Cleans all CMakeCache.txt files

  swig - Cleans all swig files

  clean- Cleans BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE

  cmake- Runs cmake only.

EOF
exit 1
}

clean_cache()
{
if [ $CMAKE_BUILD_ARCH == 'Both' ]; then
CMAKE_BUILD_ARCH=32
clean_cache
CMAKE_BUILD_ARCH=64
clean_cache
CMAKE_BUILD_ARCH=Both
return
fi

builddir=BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE
if [ ! -d $builddir ]; then
return
fi
echo
echo "Removing old cmake caches $builddir..."
echo
# Remove cache files
find $builddir -name CMakeCache.txt -exec rm {} \;
# Remove makefiles
find $builddir -name Makefile -exec rm {} \;
}


clean_swig()
{
if [ $CMAKE_BUILD_ARCH == 'Both' ]; then
CMAKE_BUILD_ARCH=32
clean_swig
CMAKE_BUILD_ARCH=64
clean_swig
CMAKE_BUILD_ARCH=Both
return
fi

# Remove swig wrappers
builddir=BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE
echo
echo "Removing old swig wrappers $builddir..."
echo
find $builddir -name '*_wrap.*' -exec rm {} \;
}

#
# Parse command-line options
#
clean=0
cache=0


if [[ $OS == Windows* ]]; then
cmake_generator=Ninja
#cmake_generator="NMake Makefiles"
win32cl=`which cl`
if [[ $win32cl != *amd64* ]]; then
CMAKE_BUILD_ARCH=32
fi
else
cmake_generator=Ninja
fi


opts=''
RUN_MAKE=1
for i in $@; do
case $i in
64)
shift
CMAKE_BUILD_ARCH=64
;;
32)
shift
CMAKE_BUILD_ARCH=32
;;
both)
shift
CMAKE_BUILD_ARCH='Both'
;;
cache)
shift
cache=1
;;
clean)
if [ -r CMakeLists.txt ]; then
shift
if [ -d BUILD ]; then
clean=1
fi
else
break
fi
;;
-DCMAKE_INSTALL_PREFIX=*|--installdir=*)
shift
installdir="${i#*=}"
;;
cmake)
shift
RUN_MAKE=0
;;
debug)
shift
export CMAKE_BUILD_TYPE=Debug
;;
release)
shift
export CMAKE_BUILD_TYPE=Release
;;
small)
shift
export CMAKE_BUILD_TYPE=MinSizeRel
;;
swig)
shift
clean_swig
;;
-h)
shift
usage
;;
   

Re: [CMake] How do I get ExternalProject_Add to install libs/programs with sudo access

2019-06-23 Thread Gonzalo Garramuño


El 23/6/19 a las 19:21, Ruben Di Battista escribió:
If I’m not mistaken, you should be able to change the install prefix 
using the CMAKE_ARGS option in the Configure step.

    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= -DCMAKE_CXX_FLAGS='-g'


Thanks, Ruben.  I am familiar with this.  I was hoping to have a way of 
installing in /usr/local, by having cmake/ninja call a sudo ninja 
install and then leaving the terminal to type in the password.


But I guess this is not possible, and I'll have to install somewhere else.

-- 

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] How do I get ExternalProject_Add to install libs/programs with sudo access

2019-06-23 Thread Gonzalo Garramuño
I am in the process of adding ExternalProject_Add commands to my program 
and I find them to work okay, except when they get to the install step.  
Once they reach the install, they fail as they don't have super user 
access to install in /usr/local/, which is where I want them.


How do you work around this with ExternalProject_Add?

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake | CMake/CPack do not print out messages as they progress (#19343)

2019-06-07 Thread Gonzalo Garramuño
I found out the problem was an old ninja version.  I am closing the bug 
report.



El 06/06/19 a las 12:27, Brad King escribió:

GitLab

I tried CMake 3.14.5 and 3.15.0-rc1 on your example. They both behave 
the same. Running |ninja bundle| shows incremental output from cpack. 
Alternatively running |ninja -v bundle| shows |[0/1] cd ... && 
/.../bin/cpack -C Release --config /.../BundleConfig.cmake| followed 
by incremental output.


—
Reply to this email directly or view it on GitLab 
.
You're receiving this email because of your account on 
gitlab.kitware.com. If you'd like to receive fewer emails, you can 
unsubscribe 
 
from this thread or adjust your notification settings.




-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] ADD_CUSTOM_TARGET USES_TERMINAL not printing out stuff

2019-06-05 Thread Gonzalo Garramuño




El 05/06/19 a las 11:51, Brad King escribió:

On 6/5/19 8:27 AM, Gonzalo Garramuño wrote:

This used to print out all that cpack was doing while it was doing it.
Now with v3.15.0-rc1 it just sits there and outputs all the text at the
end when it finishes, which sucks as it looks like it has hung.

Thanks for trying the release candidate!

However, I cannot reproduce this in a simple example:

Thanks Brad, for trying it out.  The problem seems to be related to 
cpack.  I posted a more complete example with a bash wrapup script. You 
will still need to fill in the bin directory of the build with something 
big, so cpack will take a while compressing it.

--

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] ADD_CUSTOM_TARGET USES_TERMINAL not printing out stuff

2019-06-05 Thread Gonzalo Garramuño

I run cpack with the trick of using a custom configuration.

ADD_CUSTOM_TARGET( bundle
               COMMAND "${CMAKE_CPACK_COMMAND}"
               "-C" "$"
               "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake"
               COMMENT "Running CPack. Please wait..."
               USES_TERMINAL
               DEPENDS translations )

This used to print out all that cpack was doing while it was doing it.  
Now with v3.15.0-rc1 it just sits there and outputs all the text at the 
end when it finishes, which sucks as it looks like it has hung.


--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake/Cpack creates a corrupt .rpm

2019-05-31 Thread Gonzalo Garramuño


El 30/5/19 a las 22:16, Gonzalo Garramuño escribió:


El 30/5/19 a las 21:36, Zan Lynx escribió:

RPM files are not cpio. They contain a cpio. Use rpm2cpio as a filter.


Thanks for that.  Using:

rpm2cpio mrViewer-v5.0.7-Linux-64.rpm | cpio -idmv

I can extract all the contents of the archive with no errors.

However, rpm -i bails out with a cpio: read error.  I don't know what 
to try next.  I have to wonder if the pre/post install scripts are the 
problem.


Okay.  I found the root of the problem in the OS I was trying the RPM.  
Fedora 30 has the problem installing.  CentOS 7, for example, works just 
fine.   Not sure what has changed in Fedora (or if it ever worked on 
it).  Can someone confirm that their cmake .rpm's work in Fedora 30 
(thus, throwing my assumption out of the water)?


Thanks in advance.

--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake/Cpack creates a corrupt .rpm

2019-05-30 Thread Gonzalo Garramuño


El 30/5/19 a las 21:36, Zan Lynx escribió:

RPM files are not cpio. They contain a cpio. Use rpm2cpio as a filter.


Thanks for that.  Using:

rpm2cpio mrViewer-v5.0.7-Linux-64.rpm | cpio -idmv

I can extract all the contents of the archive with no errors.

However, rpm -i bails out with a cpio: read error.  I don't know what to 
try next.  I have to wonder if the pre/post install scripts are the problem.


--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake/Cpack creates a corrupt .rpm

2019-05-30 Thread Gonzalo Garramuño



El 30/5/19 a las 12:51, Gonzalo Garramuño escribió:

rpm -ql mrViewer-v5.0.6-Linux-64.rpm


If I run cpio -i < mrViewer-v5.0.6-Linux-64.rpm

I get a bunch of warnings of Incorrect numbers (and garbage) and Cannot 
make mknod: the multibyte or extended character is incomplete or 
invalid, and attention: 4390 bytes of garbage skipped and header is 
reversed and type of archive unknown and premature end of the archive.


--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake/Cpack creates a corrupt .rpm

2019-05-30 Thread Gonzalo Garramuño



El 30/5/19 a las 12:51, Gonzalo Garramuño escribió:

I have a CMakeLists.txt (extract) with the following commands:


SET(CPACK_GENERATOR DEB RPM TGZ )

# SET the installation directory.

SET(CPACK_SET_DESTDIR true) # Needed
SET(CPACK_INSTALL_PREFIX /usr/local/${mrViewerShortName})

SET(CPACK_RPM_PACKAGE_NAME mrViewer)
SET(CPACK_RPM_PACKAGE_RELOCATABLE false)


SET(  CPACK_RPM_POST_INSTALL_SCRIPT_FILE
    ${PROJECT_BINARY_DIR}/etc/Linux/install.sh)
SET( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
    ${PROJECT_BINARY_DIR}/etc/Linux/uninstall.sh)


  SET(CPACK_PACKAGE_VENDOR "Film Aura, LLC")
  SET(CPACK_PACKAGE_VERSION_MAJOR ${VersionMajor})
  SET(CPACK_PACKAGE_VERSION_MINOR ${VersionMinor})
  SET(CPACK_PACKAGE_VERSION_PATCH ${VersionPatch})
  SET(CPACK_PACKAGE_VERSION "${SHORTVERSION}" )
  SET(CPACK_PACKAGE_FILE_NAME "${mrViewerPackageName}" )
  SET(CPACK_PACKAGE_CONTACT "ggarr...@gmail.com")
  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
      "mrViewer provides professional flipbook, audio and video 
playback.")



#SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${mrViewerPackageName} )
SET(CPACK_RESOURCE_FILE_LICENSE 
${PROJECT_SOURCE_DIR}/../../docs/LICENSE.txt)


SET( CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/BundleConfig.cmake" )
include(CPack)

ADD_CUSTOM_TARGET( bundle
               COMMAND "${CMAKE_CPACK_COMMAND}"
               "-C" "$"
               "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake"
               COMMENT "Running CPack. Please wait..."
               USES_TERMINAL
               DEPENDS translations )

This creates a valid DEB file but an invalid RPM which fails with:

Running transaction
Preparing : 1/1
Running scriptlet: mrViewer-5.0.5.20190517-1.x86_64 1/1
Installing : mrViewer-5.0.5.20190517-1.x86_64 1/1
Error unpacking rpm package mrViewer-5.0.5.20190517-1.x86_64
error: unpacking of archive failed: cpio: read

Verifying : mrViewer-5.0.5.20190517-1.x86_64 1/1

Failed:
mrViewer-5.0.5.20190517-1.x86_64

Error: Transaction failed


You can find the RPM file here:

https://sourceforge.net/projects/mrviewer/files/v5.0.6/mrViewer-v5.0.6-Linux-64.rpm/download 



If I use:

rpm -ql mrViewer-v5.0.6-Linux-64.rpm

all files are there.  However, when installing, the installer fails on 
reaching the lib directory of the rpm.


CMake/CPack used to build the rpm just fine some (long) versions ago 
with this same CMakeLists.txt.



Forgot to mention, I am using cmake 3.14.1.

--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] Cmake/Cpack creates a corrupt .rpm

2019-05-30 Thread Gonzalo Garramuño

I have a CMakeLists.txt (extract) with the following commands:


SET(CPACK_GENERATOR DEB RPM TGZ )

# SET the installation directory.

SET(CPACK_SET_DESTDIR true) # Needed
SET(CPACK_INSTALL_PREFIX /usr/local/${mrViewerShortName})

SET(CPACK_RPM_PACKAGE_NAME mrViewer)
SET(CPACK_RPM_PACKAGE_RELOCATABLE false)


SET(  CPACK_RPM_POST_INSTALL_SCRIPT_FILE
    ${PROJECT_BINARY_DIR}/etc/Linux/install.sh)
SET( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
    ${PROJECT_BINARY_DIR}/etc/Linux/uninstall.sh)


  SET(CPACK_PACKAGE_VENDOR "Film Aura, LLC")
  SET(CPACK_PACKAGE_VERSION_MAJOR ${VersionMajor})
  SET(CPACK_PACKAGE_VERSION_MINOR ${VersionMinor})
  SET(CPACK_PACKAGE_VERSION_PATCH ${VersionPatch})
  SET(CPACK_PACKAGE_VERSION "${SHORTVERSION}" )
  SET(CPACK_PACKAGE_FILE_NAME "${mrViewerPackageName}" )
  SET(CPACK_PACKAGE_CONTACT "ggarr...@gmail.com")
  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
      "mrViewer provides professional flipbook, audio and video playback.")


#SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${mrViewerPackageName} )
SET(CPACK_RESOURCE_FILE_LICENSE 
${PROJECT_SOURCE_DIR}/../../docs/LICENSE.txt)


SET( CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/BundleConfig.cmake" )
include(CPack)

ADD_CUSTOM_TARGET( bundle
               COMMAND "${CMAKE_CPACK_COMMAND}"
               "-C" "$"
               "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake"
               COMMENT "Running CPack. Please wait..."
               USES_TERMINAL
               DEPENDS translations )

This creates a valid DEB file but an invalid RPM which fails with:

Running transaction
Preparing : 1/1
Running scriptlet: mrViewer-5.0.5.20190517-1.x86_64 1/1
Installing : mrViewer-5.0.5.20190517-1.x86_64 1/1
Error unpacking rpm package mrViewer-5.0.5.20190517-1.x86_64
error: unpacking of archive failed: cpio: read

Verifying : mrViewer-5.0.5.20190517-1.x86_64 1/1

Failed:
mrViewer-5.0.5.20190517-1.x86_64

Error: Transaction failed


You can find the RPM file here:

https://sourceforge.net/projects/mrviewer/files/v5.0.6/mrViewer-v5.0.6-Linux-64.rpm/download

If I use:

rpm -ql mrViewer-v5.0.6-Linux-64.rpm

all files are there.  However, when installing, the installer fails on 
reaching the lib directory of the rpm.


CMake/CPack used to build the rpm just fine some (long) versions ago 
with this same CMakeLists.txt.



--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] RC compilation failing

2019-04-09 Thread Gonzalo Garramuño
I had a resource.rc file and a resource.h file with just an ICON to 
provide the icon to my application.  However, since a week or so ago, RC 
refuses to compile it, giving the not very helpful message:


Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336
Copyright (C) Microsoft Corporation.  All rights reserved.

RC : fatal error RW1023: I/O error seeking in file

According to the MSDEV pages that means I don't have disk space, but 
that's not true.  I checked permissions too and that seemed okay too.


--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Fwd: Re: Question about CMAKE_MODULE_PATH

2019-02-18 Thread Gonzalo Garramuño

El 18/2/19 a las 13:15, workbe...@gmx.at escribió:

Thank you, that did the trick. Now my other question is there a 
function in cmake that does abort the build/makefile generation 
process ? for example if i find out the system is not 64bit - is there 
something like quit() ?




message( FATAL_ERROR "your quit message" )

--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Removing rpath paths

2018-10-28 Thread Gonzalo Garramuño



El 28/10/18 a las 18:32, Alexander Neundorf escribió:

well, then you do have some RPATH/RUNPATH somewhere ;-). As you say probably
in the libraries.
ld.so.conf could also contains additional search directories, but I doubt that
that's the case for you.


Yes, I found two libraries with rpath in them.  I used the commandline:

chrpath -d library

to remove it.  Now all is fine with the world.

--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Removing rpath paths

2018-10-28 Thread Gonzalo Garramuño



El 28/10/18 a las 13:59, Alexander Neundorf escribió:

On 2018 M10 28, Sun 10:19:58 CET Gonzalo Garramuño wrote:
...

3) Why does running 'readelf -d myexecutable | grep RPATH' returns nothing

only grep for "PATH", then you also get the newer RUNPATH entry.

Alex

Thanks.  I tried it but it also shows nothing.  In principle I don't 
have any rpath.  However, in behavior I do.



--

Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] Removing rpath paths

2018-10-28 Thread Gonzalo Garramuño
This is probably something very simple, but I cannot find the answer.  I 
would like to remove all references to rpath and have my executable and 
libraries be controlled by LD_LIBRARY_PATH. According to the wiki, 
that's the default behavior.  However, I am finding it does not work so 
I set several options and nothing seems to work.  I think I might have 
stumbled into a bug in the libstdc++, but want to check:


Currently I have:

# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

# the RPATH to be used when installing
SET(CMAKE_INSTALL_RPATH "")

# don't add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)

I compile my code on an Ubuntu 12.04.5 box for compatibility reasons.

When I install on an Ubuntu 16.04 which I also compile for, the error of 
my executable I get is the following:


/usr/local/mrViewer-v4.3.1-Linux-64/bin/mrViewer: relocation error: 
/usr/local/lib/libIlmCtl.so.1.5.0: symbol 
_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE version 
GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference


If I remove /usr/local/lib/libIlmCtl.so.1.5.0 from its location my 
executable works.  I am also shipping a version of libstdc++.so.6 with 
my executable, which might be a little weird.


The questions I would like some clarification are:

1) Do all the libs that my executable links to should have the rpath 
removed?


2) Why when I install an executable without rpath:

Set runtime path of "/usr/local/bin/exrmultiview" to ""

I can still run it even if LD_LIBRARY_PATH is unset?

3) Why does running 'readelf -d myexecutable | grep RPATH' returns nothing

--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] /W1 and resource.rc files

2018-05-14 Thread Gonzalo Garramuño



El 13/05/2018 a las 21:24, Gonzalo Garramuño escribió:

I am running into trouble specifying the /W1 flag in add_definitions.

This was my problem.  I should have been using add_compile_options.

--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] /W1 and resource.rc files

2018-05-13 Thread Gonzalo Garramuño
I have a VC++ project which compiles with ninja.  I add all the sources 
and a rc file into a single executable by placing them in a variable.

I am running into trouble specifying the /W1 flag in add_definitions.
The flag gets passed onto RC and it fails its compilation.
Also, I get warnings of:
cl : Command line warning D9025 : overriding '/W3' with '/W1'
I am unsure what sets /W3.

Does anyone have a suggestion on how to work around the above, with the 
little fuss possible?


--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] /W1 and resource.rc files

2018-05-13 Thread Gonzalo Garramuño
I have a VC++ project which compiles with ninja.  I add all the sources 
and a rc file into a single executable by placing them in a variable.

I am running into trouble specifying the /W1 flag in add_definitions.
The flag gets passed onto RC and it fails its compilation.
Also, I get warnings of:
cl : Command line warning D9025 : overriding '/W3' with '/W1'
I am unsure what sets /W3.

--
Gonzalo Garramuño

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] VC2015 and Windows 7 compatibility

2017-09-20 Thread Gonzalo Garramuño



El 20/09/2017 a las 04:44, Elvis Stansvik escribió:

2017-09-20 7:53 GMT+02:00 Elvis Stansvik <elvis.stans...@orexplore.com>:

2017-09-19 23:22 GMT+02:00 Gonzalo Garramuño <ggarr...@gmail.com>:


El 19/09/2017 a las 15:19, J Decker escribió:

you can just install the runtime redistributuable for 2015...

https://www.microsoft.com/en-us/download/details.aspx?id=48234

Unfortunately, that does not have the required ms-api-win-core* DLLs.  It is
something that changed with v8.0 of windows.  Elvis solution seems like it
should work.  I am awaiting an answer from my beta testers.

What I forgot to say is that you of course need the Universal CRT DLLs
available somewhere on your build system where the CMake code behind
CMAKE_INSTALL_UCRT_LIBRARIES will find them.
Thanks, Elvis.  That helps.  I was able to get a Win64 build running on 
my Win7 (sans SP1) box once all the api-ms-win-core* packages were 
disted.   The Win32 build of my program cannot start with an 
api-ms-win-core-crt-*.dll error.


However since then I read that those api DLLs are not part of the 
Microsoft Runtime and as such cannot legally be disted and they 
shouldn't in any case for technical reasons (Microsoft might want to 
change them from version to version).


I am now trying to get a Windows7 SP1 box for myself to try further.

--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CPack: Create debian packge for each sub-project

2017-07-23 Thread Gonzalo Garramuño



El 23/07/17 a las 12:37, DKLind escribió:

I forgot, I also have a question about "make package". How do I build and
package just an individual sub-project. As expected, "make "
works to build, but there isn't a default target to package an individual
sub-project.
AFAIK, it is not possible. I would also like to know this for separate 
packager generators. How to call "make package" on just one package 
generator (like build just DEB and not RPM).


--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Boost moves to CMake

2017-07-18 Thread Gonzalo Garramuño

Just posted in the boost mailing list.  Congratulations to both teams!

--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Help on first cmake project

2017-07-07 Thread Gonzalo Garramuño



El 07/07/17 a las 03:45, Florian Lindner escribió:

* Any other advises you want to give me?
I would advise you try to build out of source tree to keep the source 
clean.  Example:


$ mkdir build-linux64
$ cd build-linux64
$ cmake .. -G'Unix Makefiles'
$ make
$ make install

when done, you can then do:

$ cd ..
$ rm -rf build-linux64


Thanks for helping a beginner!

Florian

No problem.

--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] .so link and cpack

2017-04-09 Thread Gonzalo Garramuño



El 09/04/17 a las 07:13, Eric Noulard escribió:

Hi Gonzalo,

You should be able to build Deb package including symlink without trouble.

Could you give the exact sequence of dpkg command which leads to the 
error you are speaking of?



$ dpkg -i mrViewer-v3.5.8-Linux-64.deb
(Leyendo la base de datos ... 309470 ficheros o directorios instalados 
actualmente.)

Preparando para desempaquetar mrViewer-v3.5.8-Linux-64.deb ...
Desempaquetando mrviewer (3.5.8) sobre (3.5.8) ...
dpkg: error al procesar el archivo mrViewer-v3.5.8-Linux-64.deb (--install):
 el tamaño del enlace simbólico 
'/usr/local/mrViewer-v3.5.8-Linux-64/lib/libACESclip.so' ha cambiado de 
48 a 20


Does it work ok if you uninstall the previously installed deb package 
first?



Yes.
Do you install the very same package twice or did you change somehow 
the package version?


I install a different revision of the same version of the package. So it 
unpacks v3.5.8 over v3.5.8


I think the problem is that I am installing it into an NTFS partition.  
I have both Ubuntu 12.04 and Ubuntu 16.04.1 and the problem appears on 
Ubuntu 16.04, which has its /usr/local pointing to a NTFS partition.

Sorry for the noise.
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] .so link and cpack

2017-04-08 Thread Gonzalo Garramuño
Currently, I have a project where I build a library and an executable 
that depends on the library.  Finally, I package a .deb package with cpack.


Now, my problem is that cpack packs the symbolic link of my library and 
that creates problems with the deb installer ( dpkg -i ) whenever I try 
to install the same version of my program twice. The error I get is that 
the symbolic link changed value from 20 to 42 (or something like that).


I tried removing the symbolic link previous to packaging, but then I get 
cpack erroring out with:


CMake Error at 
/media/gga/Datos/code/applications/mrViewer/BUILD/Linux-3.13.0-108-generic-64/Release/tmp/libACESclip/cmake_install.cmake:47 
(file):

  file INSTALL cannot find
"/media/gga/Datos/code/applications/mrViewer/BUILD/Linux-3.13.0-108-generic-64/Release/lib/libACESclip.so".

Following a post on stackoverflow, I also tried using NAMELINK_SKIP on 
the library, like:



set_target_properties( ACESclip
  PROPERTIES
  SOVERSION ${SOVERSION})

install( TARGETS ACESclip
  RUNTIME DESTINATION bin
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib
  NAMELINK_SKIP )

But then the executable:

ADD_EXECUTABLE( mrViewer WIN32 ${SOURCES} )
TARGET_LINK_LIBRARIES( mrViewer ${LIBRARIES} ACESclip )

would not find my library and would error out.

Therefore, I turn to the list for help.  How do I prevent cpack from 
packaging symbolic links (a feature which is kind of wrong at least for 
.deb files)?  Or how do I make my executable use the library without 
symlinks?


Thanks in advance.


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Desktop icon not safe (missing +x ) on cmake deb file

2017-03-19 Thread Gonzalo Garramuño



El 19/03/2017 a las 15:13, Gonzalo Garramuño escribió:

Hi,

I had a program which I compile with cmake.  This program was on an 
NTFS partition with permissions: defaults.  This meant all files were 
owned by root with 777 permissions.   This worked fine but it was not 
secure and created problems with the postrm/posinst scripts.


Recently I tried changing my fstab to mount the partition with user 
and permissions,like:


UUID=98222A3D222A20AC  /media/gga/Datos ntfs-3g 
auto,users,permissions,exec 0 0


Now, when I package my application into a deb file, it works.  I get:

-rw-r--r-- 1 gga gga 24M mar 19 14:55 mrViewer-v3.5.4-Linux-64.deb


I figured it out.  For reference, I had to change the fstab file to:

UUID=98222A3D222A20AC  /media/gga/Datos ntfs-3g 
auto,users,permissions,exec,uid=1000,gid=1000,umask=022 0 0


--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Desktop icon not safe (missing +x ) on cmake deb file

2017-03-19 Thread Gonzalo Garramuño

Hi,

I had a program which I compile with cmake.  This program was on an NTFS 
partition with permissions: defaults.  This meant all files were owned 
by root with 777 permissions.   This worked fine but it was not secure 
and created problems with the postrm/posinst scripts.


Recently I tried changing my fstab to mount the partition with user and 
permissions,like:


UUID=98222A3D222A20AC  /media/gga/Datos ntfs-3g 
auto,users,permissions,exec 0 0


Now, when I package my application into a deb file, it works.  I get:

-rw-r--r-- 1 gga gga 24M mar 19 14:55 mrViewer-v3.5.4-Linux-64.deb

However upon installation of the deb file under root, I get an icon in 
the desktop that is not executable. The desktop file that gets created 
from a desktop.in config file, which has permissions like:


-rwxrwxrwx 1 gga root 1,2K feb 21 12:14 mrViewer.desktop.in

and the resulting .desktop file has permissions like:

-rwxrwxrwx 1 gga root 1,2K mar 14 09:36 mrViewer-v3.5.4.desktop

So it should be executable and it should get installed with same 
permissions.   However, this does not work.


I am at a loss on what to try.  Any help is appreciated.

--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Forcing linking compatability to old libc / libstdc++ (Linux)

2017-01-26 Thread Gonzalo Garramuño



El 26/01/2017 a las 18:35, Michael Ellery escribió:

In what way is the stdlib incompatible? Does it have bugs, or is this more a 
matter of cpp standard support?
I should have been more clear.  Sorry.   The incompatabilities happen at 
linker time, with complaints such as:


exrstdattr: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found 
(required by exrstdattr )
exrstdattr: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found 
(required by /usr/local/mrViewer/lib/libIlmImf-2_2.so.22 )


If I copy the latest libstdc++.so.6 I have on Ubuntu, I get:

exrstdattr: /lib64/libc.so.6: version `GLIBC_2.18' not found (required 
by /usr/local/mrViewer/lib/libstdc++.so.6 )


--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Forcing linking compatability to old libc / libstdc++ (Linux)

2017-01-26 Thread Gonzalo Garramuño
I currently own an Ubuntu Xenial 14.04.1 LTS box in which I do all my 
work.I distribute a binary image viewer.   However, recently one of 
my users tried to run the viewer on a CentOS 7 distro and found out that 
that distro libc and libstdc++ are older and incompatible.


I would like to compile my program targeting the older libc and 
libstdc++.  Those files come with symbol version and visibility. Is 
there an easy way to do that other than copying the old libraries?


Any help or hint is appreciated.

--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] install() rename with version string

2017-01-19 Thread Gonzalo Garramuño



El 19/01/17 a las 05:30, Wagner Martin escribió:


However, CMake needs to include version.cmake at first CMake run time, 
which is not possible because it’s a generated file.


Is there any other way to do the rename?



You will need to do the install as another target/command.  For example:

add_custom_command( TARGET version
POST_BUILD
COMMAND ${CMAKE_COMMAND} -D 
VERSION=${version_string}

-P install_commands.cmake
USES_TERMINAL )

--
Gonzalo Garramuño

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Custom command on cpack target

2017-01-14 Thread Gonzalo Garramuño

El 10/01/17 a las 17:34, Gonzalo Garramuño escribió:


I would like to run a custom command on the zip file generated by 
cpack.   The idea is that I want to calculate its sha256 checksum.  
Unfortunately it seems the zip file cannot be a target in a 
CMakeLists.txt file or I'm doing something wrong.


Can someone give me a hand?


To answer my own question and for others that might want to do the same:

# Cmake only adds the default package target if a package config file
# named CPackConfig.cmake exists in the outermost binary build directory.
# By forcing the CPack module to generate the package file under a
# different name, we prevent the "target" path from being generated.
SET( CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/BundleConfig.cmake" )
include(CPack)

ADD_CUSTOM_TARGET( bundle
   COMMAND "${CMAKE_CPACK_COMMAND}"
"-C" "$"
   "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake"
   COMMENT "Running CPack. Please wait..."
   DEPENDS ${PROJECT_NAME})

IF (WIN32)
   ADD_CUSTOM_COMMAND( TARGET bundle
  POST_BUILD
  COMMAND ${CMAKE_COMMAND} -D 
CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -D VERSION=${VERSION} "-P" 
"${CMAKE_CURRENT_SOURCE_DIR}/../../chocolatey/mrViewer/CMakeLists.txt"

   WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
 )
ENDIF( WIN32 )

This works in that instead of calling make/ninja package you call 
make/ninja bundle.


--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Custom command on cpack target

2017-01-10 Thread Gonzalo Garramuño


I would like to run a custom command on the zip file generated by 
cpack.   The idea is that I want to calculate its sha256 checksum.  
Unfortunately it seems the zip file cannot be a target in a 
CMakeLists.txt file or I'm doing something wrong.


Can someone give me a hand?


--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Chocolatey? (Windows)

2017-01-10 Thread Gonzalo Garramuño
I was wondering if anyone was familiar with Chocolatey and whether there 
are plans to add support for it in cmake/cpack.


For those that don't know, Chocolatey is a small Windows' utility 
similar to Debian's apt-get.  It allows simple management of packages 
(binaries mainly).


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] CMakeRelink.dir fails on make package on Ninja

2016-07-29 Thread Gonzalo
On Linux (Kubuntu 16.04) I am trying to pack my program (no cross 
compiling), and I am running into the following with the Ninja Generator 
and a custom library (that is also built in the project):


[2/2] Run CPack packaging tool...
CPack: Create package using DEB
CPack: Install projects
CPack: - Install project: Project
CMake Error at 
/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/libACESclip/cmake_install.cmake:36 
(file):

  file INSTALL cannot find
"/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/libACESclip/CMakeFiles/CMakeRelink.dir/libACESclip.so.0.2.6".
Call Stack (most recent call first):
/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/cmake_install.cmake:37 
(include)



CPack Error: Error when generating package: Project
FAILED: cd 
/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp 
&& /usr/local/bin/cpack --config ./CPackConfig.cmake

ninja: build stopped: subcommand failed.

When run with -G 'Unix Makefiles' the packaging works.  It is not a 
permissions problem.


I am using the attached "mk" bash script to run the compilation.



--
Gonzalo Garramuño
ggarr...@gmail.com

#!/bin/bash --norc


#
# Determine CPU architecture
#
KERNEL=`uname -s`

if [[ $KERNEL == CYGWIN* ]]; then
KERNEL=Windows
RELEASE=(`cmd /c 'ver'`)
RELEASE=${RELEASE[3]%.[0-9]*}
elif [[ $KERNEL == MINGW* ]]; then
RELEASE=(`cmd /c 'ver'`)
#RELEASE=${RELEASE[3]%.[0-9]*}
RELEASE=${RELEASE[3]/]/}
KERNEL=Windows
else
RELEASE=`uname -r`
fi


if [[ "$RELEASE" == "" ]]; then
$RELEASE=`cmd.exe /c 'ver'`
echo $RELEASE
echo "Could not determine OS version"
exit 1
fi

CMAKE_OPTS=${CMAKE_OPTS=""}

export CMAKE_NATIVE_ARCH=32
export CMAKE_BUILD_TYPE=Release
export OS_32_BITS=1
export OS_64_BITS=
export LDFLAGS=
export CXXFLAGS=

if [ $KERNEL == 'Windows' ]; then
arch=`wmic OS get OSArchitecture`
if [[ $arch == *64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
fi
else
arch=`uname -a`
fi

if [[ $arch == *x86_64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
else
if [[ $arch == *ia64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
unset  OS_32_BITS
fi
fi


export CMAKE_BUILD_ARCH=$CMAKE_NATIVE_ARCH

OS=$KERNEL-$RELEASE


usage()
{
cat <  use a different cmake generator (default: Ninja)

  debug|release|reldebug|small
  debug- build a debug build
  release  - build a release build (default)
  reldebug - build a release build with debug information
  small- build a small release build

  both|32|64
 Builds both 32/64 bit versions, 32-bit only, 
 64-bit only (default: $CMAKE_BUILD_ARCH)

  cache- Cleans all CMakeCache.txt files

  swig - Cleans all swig files

  clean- Cleans BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE

  cmake- Runs cmake only.

EOF
exit 1
}

clean_cache()
{
if [ $CMAKE_BUILD_ARCH == 'Both' ]; then
CMAKE_BUILD_ARCH=32
clean_cache
CMAKE_BUILD_ARCH=64
clean_cache
CMAKE_BUILD_ARCH=Both
return
fi

builddir=BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE
if [ ! -d $builddir ]; then
return
fi
echo
echo "Removing old cmake caches $builddir..."
echo
# Remove cache files
find $builddir -name CMakeCache.txt -exec rm {} \;
# Remove makefiles
find $builddir -name Makefile -exec rm {} \;
}


clean_swig() 
{
if [ $CMAKE_BUILD_ARCH == 'Both' ]; then
CMAKE_BUILD_ARCH=32
clean_swig
CMAKE_BUILD_ARCH=64
clean_swig
CMAKE_BUILD_ARCH=Both
return
fi

# Remove swig wrappers
builddir=BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE
echo
echo "Removing old swig wrappers $builddir..."
echo
find $builddir -name '*_wrap.*' -exec rm {} \;
}

#
# Parse command-line options
#
clean=0
cache=0


if [[ $OS == Windows* ]]; then
cmake_generator=Ninja
#cmake_generator="NMake Makefiles"
else
cmake_generator=Ninja
fi

opts=''
RUN_MAKE=1
while [ $# -gt 0 ]; do
case $1 in
64)
shift
CMAKE_BUILD_ARCH=64
;;
32)
shift
CMAKE_BUILD_ARCH=32
;;
both)
shift
CMAKE_BUILD_ARCH='Both'
;;
cache)
shift
cache=1
;;
clean)
if [ -r CMakeLists.txt ]; then
shift
if [ -d BUILD ]; then
clean=1
fi
else
break
fi
;;
cmake)
shift
RUN_MAKE=0
;;
debug)
shift
export CMAKE_BUILD_TYP

Re: [CMake] Does Makefile generated by CMake support make -jN?

2016-07-15 Thread Gonzalo



El 13/07/16 a las 03:21, Chaos Zhang escribió:

Thanks for your  references Decker, the condition is it cost close to three
times time after i use CMake than already exist makefile  to build project.
And i found the CPU  didn't use effectively than exist make flow, so i
wonder if CMake provide some options to use CPU more effectively.
Thanks,
Chao
If you are looking to speed up compilation times, you should switch from 
Makefiles to Ninja build files (-G Ninja).  It has a much faster 
detection of dependencies and compiles overall much faster.

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] ImageMagick Not Found with CMake

2016-07-05 Thread Gonzalo



El 05/07/16 a las 15:05, Richard Kralik escribió:
I am trying to install  Theia-SfM 
(http://www.theia-sfm.org/index.html) using cmake 3.6 on Ubuntu 16.04. 
When trying to configure the project the output ends with


Why can FindImageMagick not find convert and mogrify?

My guess. Because they are in /usr/local/bin and cmake does not check that.

Call cmake with your standard options plus:

-DImageMagick_EXECUTABLE_DIR=/usr/local/bin

--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] how to compile single source file with debug options?

2016-06-10 Thread Gonzalo



El 10/06/16 a las 13:57, Sergey Spiridonov escribió:

I do release build, but I want single source file to be compiled in
debug mode, with "-O0 -DDEBUG" options instead of "-O3".

Of course, without recompiling whole directory.

Oh, I see. In perspective, Windows, for example, does not allow mixing 
debug and non debug builds.
I am afraid cmake cannot do what you want.  But you may be able to do it 
with a wrapper bash script.
The idea would be to have two CMakeCache.txt files (one debug, one 
release) and a CMakeFiles directory.  Once you want to compile a single 
file in a directory, you'd rename the debug CMakeCache.txt file and run 
cmake/make.

I'll let others chime in with more elegant solutions.

--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] how to compile single source file with debug options?

2016-06-10 Thread Gonzalo



El 10/06/16 a las 09:05, Sergey Spiridonov escribió:

Hello all,

We have big project with lots of libraries and applications. We want to
switch to cmake. Currently we use our own build system, which is derived
from tmake.

Cmake handles all dependencies if you keep the CMakeFiles directory around.
If you do and have a debug build, you can then just do:

touch file.c

and only that file will be recompiled and relinked.

--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Off-topic? Winmm linking/running problems

2016-06-08 Thread Gonzalo Garramuño

On 08/06/2016 12:11 p.m., Gonzalo Garramuño wrote:
I have a multiplatform viewer and recently I started to experience 
some very weird behavior.
Found the problem being the volume control not being 32bits.   Sorry for 
the noise.


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] CMake v3.6.0 rc1

2016-06-08 Thread Gonzalo Garramuño
I tried v3.6.0 rc1 but it fails on linking with a message about unknown 
symbols when doing cmake -E vs_link_dll on a windows library.  It seems 
not to recognize the symbols in, for example, tinyxml2.


The same code works just fine under cmake v3.5.2.
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Off-topic? Winmm linking/running problems

2016-06-08 Thread Gonzalo Garramuño
I have a multiplatform viewer and recently I started to experience some 
very weird behavior.
I am using the latest cmake 3.5.3 rc1 and the latest released ninja 
(1.7), albeit the problem appears with NMake Makefiles too.
The viewer links against winmm.dll, the windows multimedia library for 
audio.  I am using ffmpeg to decode the audio with /OPT:NOREF.


My problem is that the win64 version of my program, while testing in the 
sandbox, plays all audio in mono.

The win32 version of my program (same code) works fine from the sandbox.
Also, when I move the win64 version of the program (doing ninja install, 
package install or even just a plain cp to a new tree), the same win64 
version of my program plays audio (stereo, 5:1) just fine.
The linux amd64 version of my program also plays audio just fine without 
installing.

All the code lies in an NTFS partition.

I am at a loss as to what might the problem be.  I am pretty sure all 
variables are initialized properly and that there's no memory issue, but 
you never know.  I have no spaces in the paths.  It is not a driver 
issue as some other user reported mono playback too.  I was wondering if 
someone has experienced anything like this and how to debug it.


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] How to run an install command as administrator?

2016-05-28 Thread Gonzalo Garramuño

On 26/05/2016 01:16 p.m., Juan Dent wrote:


Hi,

I have a simple CMakeLists.txt that tries to install at a place in the 
drive that requires administrator privileges. How can I make that 
install command to run as administrator, is there a way in CMake?



If you are on Linux or Mac, it is easy.  Just do:

$ sudo make install

If you are on Windows, create a .bat file with the cmake command you 
want to run and then RMB on it and select Run As Administrator.


-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] CPACK_NSIS_EXTRA_INSTALL_COMMANDS before install

2016-05-28 Thread Gonzalo Garramuño

Hi,

I am using CPACK_NSIS_EXTRA_INSTALL_COMMANDS to create a new page where 
the user can select file associations (using the full syntax of NSIS).  
My problem is that the page gets shown after the install is done.  I 
would like to have a variable which puts the NSIS commands before the 
install.

Is there any way or variable to achieve that?

gets shown after the install
   is done.  I would like to have a variable which puts the NSIS
   commands before the install.
   Is there any way or variable to achieve that?
   
 

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Using Clang + Ninja on Windows?

2016-04-21 Thread Gonzalo



El 21/04/16 a las 18:30, Cristian Adam escribió:}

> Note that you have to match Visual C++ and Clang's build, 32 or 64 
bit. You can't mix them,
> or you'll have weird errors 
<https://cmake.org/pipermail/cmake/2016-March/062978.html>.


I wonder.  Are the C and C++ ABIs of both compilers compatible? That is, 
can I develop a program with clang but use visualc++ dlls or viceversa.



--
Gonzalo Garramuño
ggarr...@gmail.com

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Building CMake on gcc 5.2.1 fails

2016-03-11 Thread Gonzalo



El 10/03/16 a las 16:12, Oyake, Amalaye (398F) escribió:

Hello

This is my first time posting here

Welcome.


My compilation of CMake failed on my system (Ubuntu 15.1/Wily with gcc 
5.2.1). My configure claims that sstream is not there and the 
compilation failure seems to be related to this. I do have the gcc/g++ 
libraries installed ( … a locate libstdc++ shows them).
You are missing the headers to the libraries.  Do  a locate sstream. It 
should appear like:

/usr/include/c++/5.2/sstream

If it does not show up you need to apt-get the -dev versions of the 
libraries.


--
Gonzalo Garramuño
ggarr...@gmail.com

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] linking boost libraries built inside the project on mac os

2016-02-02 Thread Gonzalo



El 02/02/16 a las 09:01, Slava escribió:

I failed to reproduce it with a toy project, so please bear with me...
I compile and install boost at config time (by generating the helper 
cmake file with external project and running cmake on it).
It is found by standard findBoost afterwards and linked against 
Boost_UNIT_TEST_FRAMEWORK_LIBRARY.
All is fine till here. Now project is built, but trying to run the 
resulting binary on mac throws me:


dyld: Library not loaded: libboost_unit_test_framework.dylib
  Referenced from: /blablabla/util/./test
  Reason: image not found
Trace/BPT trap: 5¿
That just means that the dynamic library libboost_unit_test_framework is 
not installed in any system directory.
You can install it some system dir or use DYLD_FALLBACK_LIBRARY_PATH to 
specify the directory where it resides.


--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] [ANNOUNCE] CMake 3.4.3 available for download

2016-01-25 Thread Gonzalo Garramuño

On 25/01/2016 04:36 p.m., Robert Maynard wrote:

We are pleased to announce that CMake 3.4.3 is now available for download.

Please use the latest release from our download page:
   https://cmake.org/download/


Brad,

Does this one have the fix for the FLTK_WRAP_UI?

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Shared library for a executable

2016-01-25 Thread Gonzalo



El 22/01/16 a las 10:50, Raymond Wan escribió:

Hi Gonzalo,

I recently tried doing this and wrote it up as a record for myself.
Of course, I don't know if it's the right way, but I'm doing it this
way until I figure out a better way...

See if this helps and let me know if you figure out something better:

http://www.rwanwork.info/sysdocs/cmake/overview/

Ray
Thanks, Ray.  Your approach is exactly the same as mine.  We already 
found out that the problem I was having with v3.4.2 is a bug in cmake, 
which has been fixed in the git repository.


--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Shared library for a executable

2016-01-22 Thread Gonzalo
I have the need to have a shared library be created and then this same 
library be accessed by my executable.
I want both to remain in different sibling directories and have one main 
CMakeList.txt that would call the other two CMakeList.txt (one in the 
lib dir, one in the exe dir) to build the library and the executable.
In addition, I would like my library to be able to be compiled by itself 
(its own project).


Can someone point me how to do this?  I set it up for my program with 
v2.8 but now this is failing on 3.4.2.


--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Internal error bug in v3.4.2.

2016-01-21 Thread Gonzalo



El 20/01/16 a las 15:51, Brad King escribió:

It's not gone or even deprecated.  It's just not well tested
and seems to be broken in your particular case in a way not
reproduced by the test.
I delved into the cmake 3.4.2 source code and found the offending line 
in cmTarget.cxx:


cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
  config,
  false,
  tgt,
  tgt,
  dagChecker),
entrySources);

This line never ends up calling ExpandListArgument and crashes before.  
All variables are defined but I am suspicious of the (*it)->ge auto 
pointer, but cannot comment further.

I hope this helps you track it.


--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Internal error bug in v3.4.2.

2016-01-21 Thread Gonzalo



Thanks.  This is consistent with the call stack shown in your original
post.  That line is always executed so we need to figure out what goes
wrong with it in your particular case.  Since you can reproduce it in
mrViewer's configuration that is a good starting point.  Try removing
sources and libraries from mrViewer/src/CMakeLists.txt to simplify
it while still reproducing the problem.  If you can get rid of most
of the find_package calls at the top and the uses of their results
while still showing the problem then I can likely use that to get
the problem reproduced locally.



Find attached the mrViewer/src/CMakeList.txt file that still fails.

The problem is the dependency on ACESclip library, which is built as 
another library within the project.  Taking that library out makes the 
code parse and start compiling.
Maybe I am setting the two projects wrong, but I wanted to have both 
projects compile from the top CMakeLists.txt file, and also be able to 
compile the library individually.


--
Gonzalo Garramuño
ggarr...@gmail.com





#
# These are the libraries we will depend on
#

# For window management
FIND_PACKAGE( FLTK2   REQUIRED )# for window management




#
# List directories for -I options.
#
INCLUDE_DIRECTORIES(
  ${FLTK2_INCLUDE_DIR}
  )


FLTK_WRAP_UI( mrViewer  
  gui/aviSave.fl
  )




SET( SOURCES 

  ${mrViewer_FLTK_UI_SRCS}

  )



SET( LIBRARIES 
  ${FLTK2_LIBRARIES}
  )


ADD_EXECUTABLE( mrViewer WIN32 ${SOURCES} )
TARGET_LINK_LIBRARIES( mrViewer ${LIBRARIES} ACESclip )

SET_TARGET_PROPERTIES( mrViewer
  PROPERTIES
  LINK_FLAGS "${LINK_FLAGS}"
  )

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Internal error bug in v3.4.2.

2016-01-21 Thread Gonzalo



El 21/01/16 a las 10:28, Brad King escribió:
Thanks. This is consistent with the call stack shown in your original 
post. That line is always executed so we need to figure out what goes 
wrong with it in your particular case. Since you can reproduce it in 

I forgot to mention.  FLTK2.0 is available on SVN only here:

svn co http://seriss.com/public/fltk/fltk/trunk fltk-2.0


--
Gonzalo Garramuño
ggarr...@gmail.com

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Internal error bug in v3.4.2.

2016-01-21 Thread Gonzalo Garramuño

On 21/01/2016 03:47 p.m., Brad King wrote:

On 01/21/2016 11:00 AM, Gonzalo wrote:

Find attached the mrViewer/src/CMakeList.txt file that still fails.

Thanks.  From that I was able to reproduce it in a small test case
with CMake 3.4.  It appears that the problem has been fixed since
then in 'master'.  I've added a test case to keep it working:
Thank you very much for the prompt resolution.   I'll check the master 
repo and shall confirm if all is fixed.


Once again,
thank you very mucho :D

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Internal error bug in v3.4.2.

2016-01-21 Thread Gonzalo

El 21/01/16 a las 15:47, Brad King escribió:

Thanks.  From that I was able to reproduce it in a small test case
with CMake 3.4.  It appears that the problem has been fixed since
then in 'master'.  I've added a test case to keep it working:

I confirm the bug is squashed in master!  Congratulations and thanks again.

--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Internal error bug in v3.4.2.

2016-01-20 Thread Gonzalo



El 20/01/16 a las 15:51, Brad King escribió:
I don't know much about FLTK or recall specifically what the command 
does but I think it is about running "fluid" to generate some source 
files. This can now be done with add_custom_command calls, which could 
be packaged inside a macro or function that takes the place of 
fltk_wrap_ui(). That is what is done for similar use cases with other 
GUI toolkits. FLTK just happened to be one of the early use cases back 
at a time when everything needed a new command. 
Your recollection is correct.  I tried a simple sample with FLTK2 and it 
works fine (the flags passed are compatible).  So I am puzzled.


--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Internal error bug in v3.4.2.

2016-01-20 Thread Gonzalo



El 20/01/16 a las 15:51, Brad King escribió:

On 01/20/2016 01:46 PM, Gonzalo wrote:

So that I know.  What's the way of using FLTK now with cmake if
FLTK_WRAP_UI is gone.

It's not gone or even deprecated.  It's just not well tested
and seems to be broken in your particular case in a way not
reproduced by the test.

I don't know much about FLTK or recall specifically what the
command does but I think it is about running "fluid" to generate
some source files.  This can now be done with add_custom_command
calls, which could be packaged inside a macro or function that
takes the place of fltk_wrap_ui().  That is what is done for
similar use cases with other GUI toolkits.  FLTK just happened
to be one of the early use cases back at a time when everything
needed a new command.

Either way we should fix fltk_wrap_ui() in support of existing
projects.
Thanks, Brad.  I think the test does not pick the problem because it 
deals with fltk1 only.  I am using fltk2 (bad idea, I know). 
FLTK_WRAP_UI relied on FLTK_FLUID_EXECUTABLE to create a .cxx and .h 
file of the .fl files.  It is possible and likely that fluid2 does not 
support all flags of fluid1.  I would like to see what command gets 
passed onto fluid.  Is there a debug way of showing that?


In the near future I think wrapping the command in a custom function 
will work just as well or better.


--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Internal error bug in v3.4.2.

2016-01-20 Thread Gonzalo



El 20/01/16 a las 11:24, Brad King escribió:

On 01/19/2016 08:42 PM, Gonzalo wrote:

I compiled v3.4.2 and after installing it in /usr/local, I tried running
it in a project that was working fine with cmake 2.8.

Thanks for reporting this.  The 2.8 series was quite long.  To help narrow
the changes between these versions, what 2.8 version were you using?

$ cmake --version
cmake version 2.8.12.2


Please try stripping the CMake files in mrViewer down a bit at a time 
until the problem goes away and then try to use that to produce a 
small example demonstrating the problem. 

I'll try that.

--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Internal error bug in v3.4.2.

2016-01-19 Thread Gonzalo
/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;-lm
-- Boost include: /usr/include
-- Boost library: 
/usr/lib/x86_64-linux-gnu/libboost_locale.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so
-- ffmpeg include:/usr/local/include
-- ffmpeg BSD  codecs:
-- ffmpeg LGPL codecs:
/usr/local/lib/libavcodec.so;/usr/local/lib/libavformat.so;/usr/local/lib/libswscale.so;/usr/local/lib/libswresample.so;/usr/local/lib/libavutil.so
-- ffmpeg libraries:  
/usr/local/lib/libavcodec.so;/usr/local/lib/libavformat.so;/usr/local/lib/libswscale.so;/usr/local/lib/libswresample.so;/usr/local/lib/libavutil.so
-- TCLAP include:/usr/local/include
-- CTL include:/usr/local/include/CTL
-- CTL library:
-- CTL libraries:  
/usr/local/lib/libIlmCtlSimd.so;/usr/local/lib/libIlmCtlMath.so;/usr/local/lib/libIlmCtl.so
-- OpenEXR CTL include:/usr/local/include/OpenEXR
-- OpenEXR CTL library:
-- OpenEXR CTL libraries:  
/usr/local/lib/libIlmCtlSimd.so;/media/Linux/code/applications/mrViewer/BUILD/Linux-3.16.0-57-generic-64/Release/lib/libIlmImfCtl.so
-- TinyXML2 include:/usr/local/include
-- TinyXML2 library:/usr/local/lib/x86_64-linux-gnu
-- TinyXML2 libraries:  /usr/local/lib/x86_64-linux-gnu/libtinyxml2.so
-- mrViewer version: 3.0.9
IlmImf=/usr/local/lib/libIlmImf-2_2.so
-- CTL_INCLUDE_DIR=/usr/local/include/CTL
-- OPENEXR_INCLUDE_DIR=/usr/local/include/OpenEXR
-- 
LIBRARIES=/usr/local/lib/libIlmCtlSimd.so;/usr/local/lib/libIlmCtlMath.so;/usr/local/lib/libIlmCtl.so;/usr/local/lib/libIlmImfUtil-2_2.so;/usr/local/lib/libIlmImf-2_2.so;/usr/local/lib/libImath-2_2.so;/usr/local/lib/libHalf.so;/usr/local/lib/libIexMath-2_2.so;/usr/local/lib/libIex-2_2.so;/usr/local/lib/libIlmThread-2_2.so;pthread
-- Found Cg: /usr/bin/cgc
-- Found CgGL: /usr/lib/x86_64-linux-gnu/libCgGL.so
-- CG_ROOT:
-- Cg include:   /usr/include/Cg
-- Cg libraries: /usr/lib/x86_64-linux-gnu/libCg.so
-- CgGL include:   /usr/include/Cg
-- CgGL libraries: /usr/lib/x86_64-linux-gnu/libCg.so
CMake Internal Error (please report a bug):
  Missing cmGeneratorTarget instance!

Note: The stack trace will not use advanced capabilities because this is a 
release build.
0x829476 : cmsys::SystemInformationImplementation::GetProgramStack(int, int) 
[(cmake) ???:-1]
0x82a459 : cmsys::SystemInformation::GetProgramStack(int, int) [(cmake) ???:-1]
0x5bb683 : displayMessage(cmake::MessageType, std::basic_ostringstream<char, 
std::char_traits, std::allocator >&) [(cmake) ???:-1]
0x5c30e1 : cmake::IssueMessage(cmake::MessageType, std::string const&, 
cmListFileBacktrace const&) [(cmake) ???:-1]
0x73dfb3 : cmGlobalGenerator::GetGeneratorTarget(cmTarget const*) const 
[(cmake) ???:-1]
0x7078fe : TargetPropertyNode::Evaluate(std::vector<std::string, 
std::allocator > const&, cmGeneratorExpressionContext*, 
GeneratorExpressionContent const*, cmGeneratorExpressionDAGChecker*) const [(cmake) ???:-1]
0x701220 : GeneratorExpressionContent::Evaluate(cmGeneratorExpressionContext*, 
cmGeneratorExpressionDAGChecker*) const [(cmake) ???:-1]
0x7157c0 : 
cmCompiledGeneratorExpression::EvaluateWithContext(cmGeneratorExpressionContext&,
 cmGeneratorExpressionDAGChecker*) const [(cmake) ???:-1]
0x715b88 : cmCompiledGeneratorExpression::Evaluate(cmMakefile*, std::string const&, 
bool, cmTarget const*, cmTarget const*, cmGeneratorExpressionDAGChecker*, std::string 
const&) const [(cmake) ???:-1]
0x59fc0d : ??? [(???) ???:-1]
0x5a9f21 : cmTarget::GetSourceFiles(std::vector<std::string, std::allocator 
>&, std::string const&) const [(cmake) ???:-1]
0x5aa51d : cmTarget::GetSourceFiles(std::vector<cmSourceFile*, 
std::allocator<cmSourceFile*> >&, std::string const&) const [(cmake) ???:-1]
0x697281 : cmFLTKWrapUICommand::FinalPass() [(cmake) ???:-1]
0x54b9bd : cmMakefile::FinalPass() [(cmake) ???:-1]
0x54babd : cmMakefile::ConfigureFinalPass() [(cmake) ???:-1]
0x744f4e : cmGlobalGenerator::CheckTargetProperties() [(cmake) ???:-1]
0x74f039 : cmGlobalGenerator::Configure() [(cmake) ???:-1]
0x5ba660 : cmake::ActualConfigure() [(cmake) ???:-1]
0x5bf653 : cmake::Configure() [(cmake) ???:-1]
0x5c37fc : cmake::Run(std::vector<std::string, std::allocator > 
const&, bool) [(cmake) ???:-1]
0x513446 : do_cmake(int, char const* const*) [(cmake) ???:-1]
0x514cbe : main [(cmake) ???:-1]
0x7f9fa3b14ec5 : __libc_start_main [(libc.so.6) ???:-1]
0x511d1a : ??? [(???) ???:-1]

Anything to try?

--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: 

Re: [CMake] using source files in build directory

2015-10-22 Thread Gonzalo

El 21/10/15 a las 17:45, Srinath Vadlamani escribió:

Hello All,
  Is it possible to have CMake use source files in some particular 
order that are placed in the out-of-source build directory?  This is 
allows for the convenience of having multiple builds in different 
build directories due to a few file changes while preserving the files 
themselves?



You are aware that you can do out of source builds, right?

$ mkdir build-linux64
$ cd build-linux64
$ cmake .. # plus any options you want
$ make

--
Gonzalo Garramuño
ggarr...@gmail.com

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Visual Studio - Ninja Generator

2015-08-31 Thread Gonzalo



El 31/08/15 a las 11:35, Guillaume Dumont escribió:

Hi all,
Using ninja is especially useful for projects with a lot of CUDA files 
which are built sequentially for every target using MSVS.


I would like to contribute but I don't really know where to start and 
if such an effort already exists.



Hi, Guillaume.

Currently cmake offers support for Ninja Makefiles.  You need to set up 
your build environment by running the microsoft setenv.bat file (or 
whatever is called in your version of msdev, as it has changed names a 
couple of times).  That should allow cmake to find the proper compiler.


Then, if you specify:

$ cd 
$ mkdir ninja_build
$ cd ninja_build
$ cmake .. -G Ninja

You will get ninja files for your project.

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] CMake generates “-L/usr/local/lib” on Mac OSX

2015-08-24 Thread Gonzalo



El 24/08/15 a las 16:13, Oleg Zhylin escibió:

Gonzalo,

Could you please elaborate, where should I check it?


In the shell, do:

echo $LD_LIBRARY_PATH

and check the directories.  I am not sure cmake pays attention to it, 
but I believe it might.


-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Problem with cpack in latest cmake v3.3.1 and ninja

2015-08-17 Thread Gonzalo

I upgraded my cmake just recently and I am using the Ninja generator.
The compilation and linking seems to work fine.
However, when I run make package, I get the following:

[2/2] Run CPack packaging tool...
FAILED: cd 
/media/Linux/code/applications/mrViewer/BUILD/Linux-3.16.0-45-generic-64/Release/tmp 
 /usr/bin/cpack --config ./CPackConfig.cmake

CPack: Create package using DEB
CPack: Install projects
CPack: - Install project: mrViewer
CPack: Create package
CPack Error: Problem running cmake -E md5sum /usr/bin/cmake -E md5sum 
/media/Linux/code/applications/mrViewer/BUILD/Linux-3.16.0-45-generic-64/Release/tmp/_CPack_Packages/Linux/DEB/mrViewer-v2.9.0-Linux-64/usr/local/mrViewer-v2.9.0-Linux-64/bin/ctl
CPack Error: Problem running cmake -E md5sum /usr/bin/cmake -E md5sum 
/media/Linux/code/applications/mrViewer/BUILD/Linux-3.16.0-45-generic-64/Release/tmp/_CPack_Packages/Linux/DEB/mrViewer-v2.9.0-Linux-64/usr/local/mrViewer-v2.9.0-Linux-64/bin/docs
CPack Error: Problem running cmake -E md5sum /usr/bin/cmake -E md5sum 
/media/Linux/code/applications/mrViewer/BUILD/Linux-3.16.0-45-generic-64/Release/tmp/_CPack_Packages/Linux/DEB/mrViewer-v2.9.0-Linux-64/usr/local/mrViewer-v2.9.0-Linux-64/bin/rails

CPack Error: Problem compressing the directory
CPack Error: Error when generating package: mrViewer
ninja: build stopped: subcommand failed.

If I try running one of the md5sum lines manually, I get:

 cmake -E md5sum /usr/bin/cmake -E md5sum 
/media/Linux/code/applications/mrViewer/BUILD/Linux-3.16.0-45-generic-64/Release/tmp/_CPack_Packages/Linux/DEB/mrViewer-v2.9.0-Linux-64/usr/local/mrViewer-v2.9.0-Linux-64/bin/docs

ece6ba4e4e8c69337be88aa69e27d95c  /usr/bin/cmake
-E: No such file or directory
md5sum: No such file or directory
/media/Linux/code/applications/mrViewer/BUILD/Linux-3.16.0-45-generic-64/Release/tmp/_CPack_Packages/Linux/DEB/mrViewer-v2.9.0-Linux-64/usr/local/mrViewer-v2.9.0-Linux-64/bin/docs: 
No such file or directory


It seems the latest cmake is not accepting multiple -E commands.  Or the 
ninja generator is creating an incorrect run line.


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] ninja under windows

2015-08-03 Thread Gonzalo Garramuño

I compiled Ninja on cygwin from git.  That now works fine it seems.
I am trying to compile for msvc.  However, when cmake runs, I get:

[1/123] Building CXX object 
'libACESclip\CMakeFiles\ACESclip.dir\src\ACESclipWriter.cpp.obj'ninja: 
fatal: unknown deps type 'msvc'


$ ninja --version
1.6.0.git

Is compiling under the microsoft compiler not an option for ninja files 
( I can compile with NMake Makefiles just fine in the same project ).

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] CMake fails on linking.

2015-07-02 Thread Gonzalo Garramuno

On 02/07/15 10:49, Owen Alanzo Hogarth wrote:

Hi guys

I wrote up this post on stackoverflow can I get some help sorting out 
why this project isn't linking properly?


https://stackoverflow.com/questions/31186399/cmake-linking-errors

Best


You are missing the link libraries (OpenGL and SDL).  Not sure on the 
Mac how these are called.


--
Gonzalo Garramuño

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Lower the barrier of entry to the wiki

2015-02-20 Thread Gonzalo BG
This is what happened:

- I couldn't just edit the wiki, I had to make an account.
- For making an account I had to fill up a 50 words bio .
- I had to retype the captcha 5 times because I wasn't sure if I arrived at
the 50 words or not.
- Then I have to confirm the email address.
- My account is now waiting for review.
- I complained about this being insane to the mailing list but got an error
that you had to register in order to post messages, so this is my second
complain.

I think that having a wiki with such a high barrier of entry is pointless.
By the time my account gets reviewed it is going to be a miracle if I
actually get to contribute those recipes.

I think that there is just no excuse for this.

Bests,
Gonzalo BG
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Setting environment variables on windows on install

2015-01-24 Thread Gonzalo Garramuno
I would like to set an environment variable in the NSIS installer, other 
than PATH during the install.  Can someone show me how?


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Out of Source CMakeLists

2015-01-20 Thread Gonzalo Garramuno

On 20/01/15 15:57, Ma O-Nigiri wrote:


Is this possible? I tried fiddling with some of the path variables and 
it didn't pan out.

I believe what you want is not possible.  However, you can have:

cmake/modules
FindOpenEXR.cmake
mytool
CMakeLists.txt  ( with add_subdirectory( src ) )
src/
CMakeLists.txt (with compilation directives )
file.cpp

To compile, you create a build directory, like:
$ cd (root of project)
$ mkdir build-linux64
$ cd build-linux64
$ cmake ..
$ make  make install

This keeps all the files that cmake creates out of your source tree.
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] NSIS startup menu and icons

2015-01-12 Thread Gonzalo Garramuno

On 10/01/15 14:01, Gonzalo Garramuño wrote:
I have created an NSIS section for my CMakeLists.txt and I am trying 
to pack and install my application (mrViewer).
I managed to make it all work by flattening the destination, so that 
instead of ${mrViewerPackageName}/bin, it remains as bin only.


Also I found that this works:

SET(CPACK_PACKAGE_EXECUTABLES mrViewer mrViewer )
SET( CPACK_CREATE_DESKTOP_LINKS mrViewer )

but this, which according to the docs should, does not:

SET(CPACK_PACKAGE_EXECUTABLES mrViewer mrViewer-64 )
SET( CPACK_CREATE_DESKTOP_LINKS mrViewer-64 )

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] NSIS startup menu and icons

2015-01-10 Thread Gonzalo Garramuño
I have created an NSIS section for my CMakeLists.txt and I am trying to 
pack and install my application (mrViewer).
The package builds correctly and runs just fine, but the mrViewer icon 
is missing in desktop and in the menu entry and the startup menu has a 
mrViewer entry that leads nowhere instead of running my program.
I am sure it is a path issue somewhere but I don't know how to debug it, 
so I am asking for help here.


I have the following:

add_executable( mrViewer WIN32 ${SOURCES} )
target_link_libraries( mrViewer ${LIBRARIES} )


install( TARGETS mrViewer
  RUNTIME DESTINATION ${mrViewerPackageName}/bin
  LIBRARY DESTINATION ${mrViewerPackageName}/lib )

  set(CPACK_NSIS_MUI_ICON 
${PROJECT_SOURCE_DIR}/mrViewer/src/icons/viewer.ico)
  set(CPACK_NSIS_MUI_UNICON 
${PROJECT_SOURCE_DIR}/mrViewer/src/icons/viewer.ico)


  if (CMAKE_BUILD_ARCH EQUAL 32)

set(CPACK_NSIS_INSTALL_ROOT $PROGRAMFILES)

  elseif (CMAKE_BUILD_ARCH EQUAL 64)

set(CPACK_NSIS_INSTALL_ROOT $PROGRAMFILES64)

  endif (CMAKE_BUILD_ARCH EQUAL 32)

  SET( CPACK_NSIS_MODIFY_PATH ON )
  SET( CPACK_CREATE_DESKTOP_LINKS ON )
  set(CPACK_PACKAGE_INSTALL_DIRECTORY ${mrViewerPackageName})

set(CPACK_PACKAGE_VERSION_MAJOR ${mrViewerVersionMajor})
set(CPACK_PACKAGE_VERSION_MINOR ${mrViewerVersionMinor})
set(CPACK_PACKAGE_VERSION_PATCH ${mrViewerVersionPatch})
set(CPACK_PACKAGE_CONTACT http://mrviewer.sourceforge.net)
# set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/README.txt)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
mrViewer provides professional flipbook, audio and video playback.)

set(CPACK_PACKAGE_EXECUTABLES mrViewer mrViewer )
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${mrViewerPackageName} )
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt)

set(CPACK_PACKAGE_FILE_NAME ${mrViewerPackageName})
set(CPACK_NSIS_INSTALLED_ICON_NAME binmrViewer.exe)

And find attached the resulting project.nsi file.
; CPack install script designed for a nmake build

;
; You must define these values

  !define VERSION 0.1.1
  !define PATCH  1
  !define INST_DIR 
F:/code/applications/mrViewer/BUILD/Windows-6.1-64/Release/tmp/_CPack_Packages/win64/NSIS/mrViewer-2.6.7-Windows-64

;
;Variables

  Var MUI_TEMP
  Var STARTMENU_FOLDER
  Var SV_ALLUSERS
  Var START_MENU
  Var DO_NOT_ADD_TO_PATH
  Var ADD_TO_PATH_ALL_USERS
  Var ADD_TO_PATH_CURRENT_USER
  Var INSTALL_DESKTOP
  Var IS_DEFAULT_INSTALLDIR
;
;Include Modern UI

  !include MUI.nsh

  ;Default installation folder
  InstallDir $PROGRAMFILES64\mrViewer-2.6.7-Windows-64

;
;General

  ;Name and file
  Name mrViewer-2.6.7-Windows-64
  OutFile 
F:/code/applications/mrViewer/BUILD/Windows-6.1-64/Release/tmp/_CPack_Packages/win64/NSIS/mrViewer-2.6.7-Windows-64.exe

  ;Set compression
  SetCompressor lzma

  ;Require administrator access
  RequestExecutionLevel admin



  !include Sections.nsh

;--- Component support macros: ---
; The code for the add/remove functionality is from:
;   http://nsis.sourceforge.net/Add/Remove_Functionality
; It has been modified slightly and extended to provide
; inter-component dependencies.
Var AR_SecFlags
Var AR_RegFlags


; Loads the selected flag for the section named SecName into the
; variable VarName.
!macro LoadSectionSelectedIntoVar SecName VarName
 SectionGetFlags ${${SecName}} $${VarName}
 IntOp $${VarName} $${VarName}  ${SF_SELECTED}  ;Turn off all other bits
!macroend

; Loads the value of a variable... can we get around this?
!macro LoadVar VarName
  IntOp $R0 0 + $${VarName}
!macroend

; Sets the value of a variable
!macro StoreVar VarName IntValue
  IntOp $${VarName} 0 + ${IntValue}
!macroend

!macro InitSection SecName
  ;  This macro reads component installed flag from the registry and
  ;changes checked state of the section on the components page.
  ;Input: section index constant name specified in Section command.

  ClearErrors
  ;Reading component status from registry
  ReadRegDWORD $AR_RegFlags HKLM 
Software\Microsoft\Windows\CurrentVersion\Uninstall\mrViewer-2.6.7-Windows-64\Components\${SecName}
 Installed
  IfErrors default_${SecName}
;Status will stay default if registry value not found
;(component was never installed)
  IntOp $AR_RegFlags $AR_RegFlags  ${SF_SELECTED} ;Turn off all other bits
  SectionGetFlags ${${SecName}} $AR_SecFlags  ;Reading default section flags
  IntOp $AR_SecFlags $AR_SecFlags  0xFFFE  ;Turn lowest (enabled) bit off
  IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags  ;Change lowest bit

  ; Note whether this component was installed before
  !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
  IntOp $R0 $AR_RegFlags  $AR_RegFlags

  ;Writing modified flags
  SectionSetFlags ${${SecName}} $AR_SecFlags

 default_${SecName}:
 !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
!macroend

!macro FinishSection SecName
  ;  This macro 

Re: [CMake] NSIS builder creating invalid exe

2015-01-10 Thread Gonzalo Garramuno

On 09/01/15 19:22, Bill Hoffman wrote:

On 1/9/2015 12:43 PM, Gonzalo Garramuño wrote:

I updated my CMakeLists.txt to create an NSIS installer under a Nmake
Makefile.
The packaging works without errors when run with 'nmake package'.

However, the resulting exe file when run, returns:
Bad file number.

The problem happens on both builds for win32 and win64.
The NSIS installer is 3.0a1 and cmake v3.0.1.
Try running it from explorer and not the command line.  It might be 
asking to raise permissions since it is an installer.


-Bill


Yes, that was it. Thanks for pointing out a problem with mingw bash.

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] NSIS builder creating invalid exe

2015-01-09 Thread Gonzalo Garramuño
I updated my CMakeLists.txt to create an NSIS installer under a Nmake 
Makefile.

The packaging works without errors when run with 'nmake package'.

However, the resulting exe file when run, returns:
Bad file number.

The problem happens on both builds for win32 and win64.
The NSIS installer is 3.0a1 and cmake v3.0.1.

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Creating an installer using cpack

2015-01-09 Thread Gonzalo Garramuno

On 08/01/15 21:56, J Decker wrote:
I don't think you should install libraries like that... things in 
binary would be build products, can you possibly just install the libs 
as normal


INSTALL( Target ... LIBRARY DESTINATION lib )

The lib files are not built by cmake but are dependencies for my program.

The lib files are symbolic links to the /usr/local/lib directory. For 
example:


Release/lib/libfltk2.so.2.0 - /usr/local/lib/libfltk2.so.2.0

With the tgz installer, the symlinks are flattened to their respective 
files.

However, with the deb installer, the symlinks are kept.
I would like the symlink to be flattened also in the deb installer. Then 
all would be peachy.

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Creating an installer using cpack

2015-01-09 Thread Gonzalo Garramuño

On 09/01/2015 05:55 p.m., J Decker wrote:



the symlinks already exist in the source directory (it sounds like) 
the problem is they're not being packaged/extracted right...
Correct.  I changed my symlink script with one that copies the libraries 
and all problems are gone.

Now I am tackling NSIS problems on Windows.

Thanks to all for your help.
Gonzalo

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Creating an installer using cpack

2015-01-08 Thread Gonzalo Garramuno
I have a cmake file to build my project (mrViewer).  The project has 
additional script files that are not mentioned in my cmake file.
The project also has dependencies on c libraries installed elsewhere 
(/usr/local, etc).


The tgz,deb and rpm files currently contain just the main executable 
after a:


ADD_EXECUTABLE( mrViewer WIN32 ${SOURCES} )
TARGET_LINK_LIBRARIES( mrViewer ${LIBRARIES} )

INSTALL( TARGETS mrViewer
  RUNTIME DESTINATION bin
  LIBRARY DESTINATION lib
)

What I would like to have is a cmake sample file that shows how to:

a) Install the script files respecting its local location.
b) Install the c libraries in a local lib directory.

for cpack packaging.

Thank you very much in advance,

Gonzalo
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] missing qt on windows

2012-05-15 Thread Gonzalo Amadio
I have done this, but adding it int other way . Selecting on the screen
the line where the error araises and exploring until finding qmake.exe (in
the same folder you indicate). And I think it works.
Thank you

2012/5/15 Sweety Pie sweetyp198...@gmail.com

 Hey there,
 Please try this, it may work

 1- Open CMake - cmake-gui (on the Desktop) - if you are using win7 make
 sure you open the program in administrator mode - right click on the icon
 and click on run as administrator.
 2- Click on Add Entry again
Set name to QT_QMAKE_EXECUTABLE
Set type to Path
Set value to C:/Qt/4.8.1/bin/qmake.exe
Click OK

 :)
 On 15 May 2012 11:36, Gonzalo Amadio gonzaloama...@gmail.com wrote:

 Hello, I am trying to install MITK on windows 7 64bit.

 It is required to have QT, I downloaded it from
 http://qt.nokia.com/downloads and istalled it.

 I installed the Cmake GUI. And Visual Studio 10 express (in the
 configuration, i choose visual studio 10 compiler).

 I have the following error when trying to Generate.

 Setting build type to 'Debug' as none was specified.
 Check for working C compiler using: Visual Studio 10
 Check for working C compiler using: Visual Studio 10 -- works
 Detecting C compiler ABI info
 Detecting C compiler ABI info - done
 Check for working CXX compiler using: Visual Studio 10
 Check for working CXX compiler using: Visual Studio 10 -- works
 Detecting CXX compiler ABI info
 Detecting CXX compiler ABI info - done
 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
 (MESSAGE):
  Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
 QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR
 QT_QTCORE_LIBRARY) (Required is at least version 4.6.2)
 Call Stack (most recent call first):
 C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288
 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/FindQt4.cmake:1172
 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
 CMakeLists.txt:188 (find_package)
 Configuring incomplete, errors occurred!



 --
 
 Gonzalo Amadio


 --

 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





-- 

Gonzalo Amadio
--

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] error executing example of vtk

2012-05-14 Thread Gonzalo Amadio
Hello everyone, I am trying to execute the vtk example :
http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/WriteVTP

As the example guide says, I create a folder call test, then inside this
folder I put WriteVTP.cxx and the CmakeLists.txt given in the example.

I am trying to compile it, and give me this error :

 Build of configuration Debug for project test 
 make -j4 all
 Building file: ../WriteVTP.cxx
 Invoking: Cross G++ Compiler
 g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MFWriteVTP.d
 -MTWriteVTP.d -o WriteVTP.o ../WriteVTP.cxx
 ../WriteVTP.cxx:1:24: fatal error: vtkVersion.h: No such file or directory
 compilation terminated.
 make: *** [WriteVTP.o] Error 1
  Build Finished 


I am using Eclipse, in ubuntu 11.04.

Maybe I have to set up the compiling configuration of eclipse?

-- 

Gonzalo Amadio
--

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] EXECUTABLE_OUTPUT_PATH vs CMAKE_RUNTIME_OUTPUT_DIRECTORY

2008-03-04 Thread Gonzalo Garramuño

Alexander Neundorf wrote:


Brad just documented this a few days ago:
http://www.cmake.org/pipermail/cmake-commits/2008-February/00.html



This is a pretty horrible and drastic change with no heads up.  Why was 
the variable name change even needed?  I have tons of code already coded 
that depends on those variables.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] [Spam] Re: EXECUTABLE_OUTPUT_PATH vs CMAKE_RUNTIME_OUTPUT_DIRECTORY

2008-03-04 Thread Gonzalo Garramuño

Andreas Pakulat wrote:

On 04.03.08 10:51:10, Gonzalo Garramuño wrote:

Alexander Neundorf wrote:

Brad just documented this a few days ago:
http://www.cmake.org/pipermail/cmake-commits/2008-February/00.html

This is a pretty horrible and drastic change with no heads up.  Why was the 
variable name change even needed?  I have tons of code already coded that 
depends on those variables.


So? There's nowhere stated that those variables go away, they are just
deprecated and you shouldn't use them. 


Well...  That's what deprecated is.  It means the variables may go away 
or not work properly anymore in either a current or future cmake 
version.  It also means they are no longer supported (bugs, etc).



Apart from that that only applies
to CMake 2.6, everythings fine if your projects require CMake 2.4.



Well, I'm using cmake 2.5 from SVN.  I'm trying to understand what does 
the name change even accomplish?  If the renaming had been to make the 
variables prefixed with CMAKE_*, I would understand it as a 
consolidation with other cmake variables.  But as is, I don't get the 
need for the change at all.



Also, from an API perspective, I find this hilarious:

ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_PATH, and RUNTIME_OUTPUT_DIRECTORY

Either name them all DIRECTORY or PATH to be consistent.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake community site

2008-03-04 Thread Gonzalo Garramuño

Mike Jackson wrote:


Also, what happens when you stop being a student with lots of time to 
keep the site going?


That's easy.  If he did a good job, he gets hired by Kitware :)

--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [Spam] Brandon Van Every

2008-03-04 Thread Gonzalo Garramuño

Bill Hoffman wrote:
This is a difficult decision for me.   I have never been forced into a 
situation like this.  However, Brandon's posts to this list have been 
disruptive to the community and myself.  I have therefore come to the 
conclusion that Brandon needs to be kicked off the list.


I hope we can put this issue behind us soon, and move forward with the 
development of the CMake build system.




Bill, the guy already sent a public email with personal stuff.  He will 
have enough punishment with anyone being able to google for it.


For anyone that is tired of him, my suggestion is: email filter or 
killfile.  That suggestion goes to Brandon too (to filter Sebastian or 
whatever was his name).   End of story.


--

The reason why I would vote to keep Brandon is, that, unlike that guy, I 
found two or three things he did that I found/find useful on this list 
(and why I sometimes answer his posts).


a) He surfs the web... a lot.  Thanks to him I found out about premake 
and buildr (both of which I had no clue existed).  I have yet to find 
something he linked to truly useful, but there's a chance he'll stumble 
upon it, even if by sheer chance.  He certainly found cmake before I did.


b) In the past, he did raise some valid issues with cmake.  He was the 
first to notice bad mingw/msys support, for example.  He was first to 
point out regexp issues.  And since he seems to only code in cmake, he 
seems to find a lot of (minor) bugs.


c) I actually took the time to look at his mozilla translator (what can 
I say? boring day).  It is not great or something I would use.  But it 
is certainly above totally clueless levels.  I would rather keep him 
around and help him with his code (and for those that are better than 
myself at it, with his people skills too).



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: Raven, Antwrap, Buildr

2008-03-03 Thread Gonzalo Garramuño
 for actual coding the core of the system.



P.S.  BTW, rake is something like a 200 line script only, so it is 
extremely bare-bones.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: Changing MD - MT (+patch for free toolkit)

2008-02-19 Thread Gonzalo Garramuño

Mathieu Malaterre wrote:

On Feb 19, 2008 5:43 AM, Gonzalo Garramuño [EMAIL PROTECTED] wrote:

Mathieu Malaterre wrote:

Ok this was yet-another-weird-dll thingy, one cannot do:

class GDCM_EXPORT String : std::string { ... }


Please, learn a little bit more about C++.


Oh thank you ! I'll take your advice right away, mister expert. So
could you please let me know why *in my particular case* this is
wrong:
1. I did not add any data member
2. I did not overload the dstor



GDCM_EXPORT tells me you are using this in a library.

The reason this is wrong is this.  Say you write a function to get a 
exension of a filename as uppercase:


GDCM_EXPORT MyString get_extension( const MyString b )
{
   MyString ext = b.to_upper();
   // etc... do some other stuff like find '.' and substr
   return ext;
}

Now... this will work.  But now func() can only be used with your 
particular MyString class.  However, if you had done:


namespace str {
   // to_upper implementation not shown
   GDCM_EXPORT std::string to_upper( const std::string b );

   GDCM_EXPORT std::string get_extension( const std::string b )
   {
 std::string ext = to_upper( b );
 // etc... do some other stuff like find '.' and substr
 return ext;
   }
}


With this, the code for both to_upper() and get_extension() can be 
safely be reused and works for *all* std::string objects.  You don't 
force people to use your own string library.  This makes your library 
more attractive and easier to reuse in other code.


Even, if you did not do 1 or 2, you might have done 3:
3. Yo might have overloaded (replaced) a string function.

class MyString : public std::string
{
public:
   // silly example, but same applies to add, operator, etc.
   size_type size() { return std::string::size() + 1; }
};

int main()
{
 MyString* s = new MyString;
 std::string* c = static_cast std::string* ( s ); // correct
 std::cerr  c-size()  std::endl;   // which size() gets called?
// not yours,
// but the one in std::string
 return 0;
}

This example for 3) is very simple and obvious but in big programs this 
issue may be more confusing as the distintion of what a pointer really 
points to becomes more blurry.


If you have only added non-conflicting functions in MyString to 
std::string, what you have is safe but potentially not so beneficial. 
You might either do as I showed and place your additional functions in a 
namespace and keep using std::string everywhere (which makes your 
library nice to use and probably popular) or create your own string 
class, without deriving anything (and yes, you do need to create a lot 
of code for doing a good string class -- it is C++ after all), or create 
a proxy string class thru containment of std::string (which is like 
creating your own string class from scratch, but a tad simpler):


class MyString
{
std::string str;

public:
 typedef std::string::size_type size_type;
 // other typedefs similar to std::string...

public:
 MyString() {}
 MyString(const MyString b) : str(b.str) {}
 MyString(const std::string b) : str(b)  {}

// auto cast to string - optional (only if lazy, may not be wanted)
operator std::string() const { return str; }

// dispatch size function
inline size_type size() const { return str.size(); }

// my functions - not shown
void to_upper();

//  dispatch others, etc...
// also remember to add operator=(const std::string b)
};

This avoids you having to actually write your (potentially buggy) code 
to the string functions, as you just dispatch the operations to the 
std::string inside your class.  And the operator to std::string() and 
copy constructor of std::string allows your class to interact with 
std::string functions and elements rather seamlessly.  It is still 
verbose, but not *THAT* much.  And the code is probably safer to use 
through pointers and easy to extend without conflicts.




Please do not copy some random comment found on the internet and
instead comment on my particular implementation with the following 1
and 2 restrictions. Thanks.



It is not some random comment.  It is good design advice that sadly 
applies to all C++ STL classes.


For more information, refer to a good C++ book. IIRCC, Scott Meyer's 
Effective STL and Effective C++, covers this and other problems with all 
the pitfalls in a very thorough fashion.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: Changing MD - MT (+patch for free toolkit)

2008-02-18 Thread Gonzalo Garramuño

Mathieu Malaterre wrote:

Ok this was yet-another-weird-dll thingy, one cannot do:

class GDCM_EXPORT String : std::string { ... }



Please, learn a little bit more about C++.  You should never inherit 
from std::string (or any std::* container) as their functions or 
destructor are not virtual.  That can (and will) spell disaster for 
anyone else trying to use your library/functions or even for yourself if 
you go through pointers or references.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] add_custom_command as target

2008-01-17 Thread Gonzalo Garramuño


Cmake provides add_custom_target, but that creates a target that gets 
run either always (ALL) or manually by running make target.


Cmake also provides an add_custom_command that tracks file dependencies 
and gets run when a dependency changes.  However, add_custom_command 
assumes the files are always intermediate files (ie. not targets) and 
for the command to actually appear in the Makefile, the output of the 
command has to have been added to add_executable or similar.


Is there a way to create an add_custom_target that tracks dependencies? 
 Or an add_custom_command that will act as a target (without needlessly 
being added to add_executable, etc).


Basically, I'm trying to have a macro that compiles NVidia's .cg files 
to profile shaders and as such the shaders are targets that depend on 
the cg files.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] add_custom_command as target

2008-01-17 Thread Gonzalo Garramuño

Brandon Van Every wrote:


Admittedly this is inelegant, but it works.  I have no idea how much
work it would be to remove the distinction between file level and
target level dependencies.



It isn't inelegant, but quite logical.  It probably should be kept as 
is, as it allows easily adding multiple dependencies to a single target.


I thought of trying that as a last resort but by then I had more or less 
given up.


That feature is, however, undocumented.  Neither of the add_custom_* nor 
the wiki has any mention of this or the possibility of add_custom_target 
being able to take a custom command.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [Spam] Re: [CMake] Re: Migration to subversion

2008-01-04 Thread Gonzalo Garramuño

Alan W. Irwin wrote:

developers, but most software projects (such as CMake) will never have more
than a handful of active developers


cmake already has about 10-20 or so developers (if you consider all the 
.cmake module contributions).  People with commit access, however, are 
much fewer right now.




I assume that does not rule out git or Mercurial.  For example, from the
git-svn crash course at http://git.or.cz/course/svn.html, it appears that
git has the capability to use a centralized repository (the so-called bare
repository), and I presume that is the case for Mercurial as well.


Not really. Both git and Mercurial are always distributed.  You can have 
one official repository but you cannot prevent people from cloning it.



However, I admit to having no development experience with git or Mercurial.
Is there anything compelling (e.g., fewer bugs, better documentation, more
useful features aside from distributed?) about either over svn for 
projects like CMake that use a centralized repo?




See Linus presentation at google (available on youtube).  But basically, 
with git you get:


* Faster and smaller repositories.  A git repository will often be 1/3rd 
of an equivalent cvs or svn one.
* git guarantees that what you put in the repository is what you get 
out.  All commits are SHA1 verified.  CVS and SVN have no verification. 
 If disk corruption happens or a malicious user fakes a file or screws 
up, say, the ,v files, you can get garbage out without anyone noticing.
* git offers two apis (one for high level user access and one for low 
level admin/script access similar to using tricks in cvs like hacking 
the ,v files).
* Branches and merging are native to the repository.  Both can be done 
in linear time (and probably) with much less chance of conflicts.
* Distributed.  You can work with the repository without being connected 
(on a plane or laptop, for example) and then merge later.
* Distributed allows you to much more easily mix and match from several 
repositories of trusted persons, to create your own flavor of code.  For 
example, Linus is not an expert in networking, but he can easily fetch 
and merge network changes from other developers that are, once they 
verified the code (thus, reducing the amount of work *he* has to do on 
things he is not really an expert on).  A central repository makes it 
much more easy for the changes of the two developers to overlap or screw 
up the build of the other person while developing.  Or the developer 
just has to never commit, until all your tests pass and your changes 
are done.
* git offers bisect options in linear time.  It becomes trivial to find 
a line commit that screwed up something.  There's nothing like that on 
CVS or SVN, where it has to be done manually.  And even then, it is not 
linear.
* git patches can be created to be easy to email for those that have no 
write access.
* git has proven scalability (for both git and the kernel, probably some 
of the largest per day/month commit base of any known projects).


With Mercurial you get the same except faster and smaller and only a 
single api.  It is at least 40% slower than git in my (short) 
experience.  Monotone offers better verification but much, much slower 
performance.


In summary, once you use git, if you are like me, you'll realize that 
you've been doing source version control wrong all these years *sigh*.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: Migration to subversion

2008-01-04 Thread Gonzalo Garramuño

James Mansion wrote:

Gonzalo Garramuño wrote:
In summary, once you use git, if you are like me, you'll realize that 
you've been doing source version control wrong all these years *sigh*.



Does git work on Win32?



Yes, but not as well as on Linux.  There's two ports of it.

The cygwin port which should be more or less in sync with Linux but 
works very slow.  It is also probably not that well suited for windows 
projects, as I believe no CR/LF conversion is done.


The MinGW port which is much faster and already pretty functional (look 
for msysgit, IIRC).  It also handles CR/LF conversions.  This is likely 
the one you want to try.  Some advanced functionality may still be 
missing as it is not a complete project yet.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] mingw32 linker line exceeds win32 limitations

2008-01-03 Thread Gonzalo Garramuño

Brad King wrote:


CMake uses a link script approach to avoid placing the entire link
line in the makefile.  It is enabled on certain generators (including
MinGW) and used for linking libraries but has not been yet needed for
executables.  Is the target for which you're having problems a library
or an executable target?



Is this the same as it is used with the NMake Generator?

If so, please don't make this the default.  It makes it impossible to 
see what the link line is when make VERBOSE=1.


Or just have it turn on only when the line actually does exceed the limits.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: Parsing cmake command line parameters

2007-12-18 Thread Gonzalo Garramuño

Alexander Neundorf wrote:

Yes.
In KDE we have the macro MACRO_OPTIONAL_FIND_PACKAGE(), which adds an option 
around the find_package() call:

http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/MacroOptionalFindPackage.cmake?revision=520790view=markup

Beside that, it is really just a matter of syntax whether you do 
--enable-build-this

or -DENABLE_BUILD_THIS=TRUE


No, it isn't *just* a matter of syntax (which is also horrible, btw). 
It is also a matter of documentation.  -DENABLE_BUILD_THIS is documented 
nowhere.  configure --enable-build-this is documented if you run it 
without any flag.



But... what if we have this extreme case?

IF(${CMAKE_BUILD_TYPE} STREQUAL Debug)
  add_command_line_parameter(whatever)
ENDIF()



So?  You don't get the option if you don't run a debug build.  As simple 
as that.  A better syntax for add_option would be:


add_option( NAME TYPE HELP [OPTS] )

  with OPTS being:
  CONFIGURATION Debug
  REQUIRED  someotheroption

That avoids the need for if-thens.



I have (currently) two ideas:
either a special file, e.g. CMakeCustomArgs.txt, which in some way sets up the 
custom command line parameters.




Yuck!

Or have a cmake modules, which handles this stuff, and which also creates a 
custom target help-args or something like that, which prints the available 
args. This would not be available before cmake has successfully run.




Yuck! Why wouldn't it be available?  Have you guys used premake at all? 
 The premake.lua is ALWAYS read.  If no parameter is passed, there's a 
dry run of the file, and help with options get spit.

It is gorgeous.
Sure, lua runs 10 times faster than the cmake language does, but that's 
a different story.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] premake build system

2007-12-17 Thread Gonzalo Garramuño

Filipe Sousa wrote:

For those who love lua and want a build system there is premake
http://industriousone.com/premake

And I know that there is another build system that uses lua but I can't
find the link.



premake3/4 is tiny and its syntax is *really* nice.

What's similar to cmake:
- It creates Makefiles or IDE projects.

What's better than cmake (imho):
- Language syntax.
- You can easily add command-line flags like autotools.
- Install options match autotools.
- Tiny (only a couple of secs to compile it from source).
- Written in C (more easily ported than cmake).
- Makefiles generated are simple, readable and faster.
- C code is very readable and easy to follow.
- Uses relative paths.


What's worse:
- No dependency checking on .h files at all (yuck).
- Out-of-source builds is a property of the
  premake.lua script (yuck).
- Verbose builds is a feature of premake, not the Makefile,
  meaning you need to regenerate the makefile each time to
  get verbose output (yuck).
- No find_path or find_include
- No cross-platform modules for better support.
- Small language and compiler support.
- No coloring of builds.
- No testing framework.
- No packaging framework.
  (what they call dopackage is really doinstall)
- C code is a tad disorganized.
- No listing of make targets (no make help).


I really like it much better than the scons derivatives, but the lack of 
proper dependency checking is a killer.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] premake build system

2007-12-17 Thread Gonzalo Garramuño

Brandon Van Every wrote:

On Dec 17, 2007 5:46 AM, Gonzalo Garramuño [EMAIL PROTECTED] wrote:

premake3/4 is tiny and its syntax is *really* nice.


... Show me a tool that does something CMake

*can't* do, or does badly. ...

Well, in the quote that you did not keep, I posted that premake *is* a 
good example of a couple of things cmake cannot do (command-line flags 
and OO).  And syntax is certainly one of the things cmake does badly. 
Bad support (lack of, really) for relative paths is another weakness in 
cmake.


So premake is definitively a good example for what you want.

To be honest, if premake did dependencies right (or at least like waf 
does), I would certainly consider it as a valid alternative to cmake.


When Alex was asking about what for? in another thread, I think my 
quick eval of other systems proves to me your quest is not in vain.


I honestly don't think it will take 10 more years for a tool to match 
the benefits of cmake with a better syntax.  As I have said before, I 
think it is only 3 or so years away from happening.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: premake build system

2007-12-17 Thread Gonzalo Garramuño

Rodolfo Schulz de Lima wrote:
So, apart of forking, a build system that wants to be better than cmake 
should reimplement 90% of cmake's features, just to add those 10% missing?




Kind of.  Not really 90%, but more like 60-70%.  It would first have to:

* gotten dependencies correct (this is really hard).
* be fast in every aspect (hard without coding it in c/c++).
* be multi-platform.

Without those three, nothing else matters.  Once those are okay, you 
need to:


* support a couple of languages (say c++ and java).
* have an easy to extend (and well defined) framework.
  If, say, swig is not supported, but the framework is
  defined, someone else should be able to write a module for it.
* support a couple of common IDEs and compilers (mainly
  gcc and msvc).  Others will appear as need arises.
* have support to find files on disk (includes, libs, exes).
* have decent docs or at least a bunch of examples.
* be well supported with a mailing list
  (and not a dead one like jam).

Getting all that right is *HARD* and can easily be a full-time job.
Most of cmake competitors have not yet full-filled all of the above. 
Ergo, why cmake still rules.


Additional components like cpack or ctest are a plus, but they are not 
a major reason for sticking with cmake.


While a large amount of cmake's modules is nice when you start with it, 
it is not a deal breaker if the framework is good (and a good OO 
framework should be better than what cmake does with FIND_PACKAGE).


Things that would also earn tons of brownie points would be:
* smaller than cmake (both to compile and distribute).
* good for cross-compilation.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: premake build system

2007-12-17 Thread Gonzalo Garramuño

Bill Hoffman wrote:

Gonzalo Garramuño wrote:


* good for cross-compilation.

CVS CMake (and the coming 2.6 CMake) have extensive support for cross 
compilation.


http://www.cmake.org/Wiki/CMake_Cross_Compiling



I'm still having a lot of problems with it.  Even cross-compiling on a 
64-bit machine for 32-bit builds is, afaik, not really possible without 
major hacking of Platform/UnixPaths.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: premake build system

2007-12-17 Thread Gonzalo Garramuño

Bill Hoffman wrote:
It is harder than you think, but maybe you are right. If you look at 
Ohloh:  http://www.ohloh.net/projects/3238?p=CMake


It shows CMake as a 51 person year project at a cost of 2.7 million. 
That may not actually be far from the mark...




Well, following the same standard, imagine if you were using a common 
language like Ruby which is 125 person year project at a cost of 6 million.


You'd have had 4 million to spare and 50+ additional year/developers to 
begin with even before you wrote your first cmake line!




--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [Spam] Re: [CMake] Re: premake build system

2007-12-17 Thread Gonzalo Garramuño

Alexander Neundorf wrote:

On Monday 17 December 2007, Gonzalo Garramuño wrote:

Bill Hoffman wrote:

Gonzalo Garramuño wrote:

* good for cross-compilation.

CVS CMake (and the coming 2.6 CMake) have extensive support for cross
compilation.

http://www.cmake.org/Wiki/CMake_Cross_Compiling

I'm still having a lot of problems with it.  Even cross-compiling on a
64-bit machine for 32-bit builds is, afaik, not really possible without
major hacking of Platform/UnixPaths.


Ok, what are you doing exactly, what are the problems ?




First, trying simple 32-bit compiles on a 64-bit machine (Ubuntu OS).

For 32-bit compiles on a 64-bit machine, the problem is that UnixPaths 
does not change the location where it searches for files.


First, CMAKE_SYSTEM_LIBRARY_PATH is set incorrectly to always search 
lib/ paths instead of lib32/ or lib64/ paths.  This will create warnings 
for the most part as the linker is usually smart.  However, if a library 
is not present on 32-bits, the 64-bits file will get picked up and the 
problem will only appear show up when linking, not during configuration.


CMAKE_SYSTEM_PROGRAM_PATH also suffers from a similar issue.  This is an 
issue with modules that use pkgconfig, for example or that set settings 
from finding executables like ruby.  It isn't entirely clear to me if 
there is a standard location for 32-bit bin files (not libs) in Linux, thou.


CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES is also wrong, adding both 64 
and 32 bits paths.


Afaik, there's no variable indicating whether to compile for 32bits or 
not.  And cmake does not check for the -m32 flag at all.


I have my own UnixPaths and modules to work around most of the above, 
but it would be good to have this working out of the box.


Recent versions of cmake seem to have also added this:

# Enable use of lib64 search path variants by default.
SET_PROPERTIES(GLOBAL PROPERTIES FIND_LIBRARY_USE_LIB64_PATHS TRUE)

which seems highly undesirable or a so far undocumented feature.


---
For cross-compiling, I was trying to do some compiles from my Unix box 
to windows using a unix-mingw32 to windows toolchain.  I was utterly 
unsuccessful.  I just kept fixing one error only to find another one.  I 
had followed the cmake wiki for cross-compiling, but there were still 
many issues with paths in modules and the like.  If you want to walk me 
thru it, I'll start a new thread with the errors I find as I go thru it 
again.  Mind you, the stuff I want to compile has many dependencies, so 
it is a hard thing to do.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [Spam] Re: [CMake] Re: premake build system

2007-12-17 Thread Gonzalo Garramuño

David C Thompson wrote:

Gonzalo Garramuño wrote:

Alexander Neundorf wrote:

On Monday 17 December 2007, Gonzalo Garramuño wrote:

Bill Hoffman wrote:

Gonzalo Garramuño wrote:

* good for cross-compilation.

CVS CMake (and the coming 2.6 CMake) have extensive support for cross
compilation.

http://www.cmake.org/Wiki/CMake_Cross_Compiling

I'm still having a lot of problems with it.  Even cross-compiling on a
64-bit machine for 32-bit builds is, afaik, not really possible without
major hacking of Platform/UnixPaths.

Ok, what are you doing exactly, what are the problems ?

First, trying simple 32-bit compiles on a 64-bit machine (Ubuntu OS).

For 32-bit compiles on a 64-bit machine, the problem is that UnixPaths 
does not change the location where it searches for files.


Are you using setarch i386 cmake ? That should help by forcing uname
to advertise the architecture as 32-bit.



No, I'm not.  But using it does not seem to improve things that much. 
Still lots of paths get picked up wrong due to bad UnixPaths.cmake.


In my case, X11 and GL get picked from the 64-bit paths instead of 
32-bits (and yes, I have 32-bits versions in /usr/lib32).


For example:

-- Found X11: /usr/lib64/libX11.so---
It is impossible to order the linker search path in such a way that 
libraries specified as full paths will be picked by the linker.

Directories and libraries involved are:
Directory: /usr/lib32 contains:
Library: /usr/lib64/libGL.so
Library: /usr/lib64/libGLU.so

Directory: /usr/lib64 contains:
Library: /usr/lib32/libz.so
Library: /usr/local/lib32/libHalf.a
Library: /usr/local/lib32/libIex.a
Library: /usr/local/lib32/libIlmImf.a
Library: /usr/local/lib32/libImath.a


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Re: premake build system

2007-12-17 Thread Gonzalo Garramuño

Alexander Neundorf wrote:

I have my own UnixPaths and modules to work around most of the above,


Can you please post it ?



Sure.  It is really two pieces.  FindBuildDir.cmake which is called 
first and Platforms/UnixPaths.cmake.


FindBuildDir does the hard check of setting up a couple of variables. 
It sets CMAKE_NATIVE_ARCH to 32 or 64.


And sets the OS_32_BITS and OS_64_BITS variables to represent whether 
the machine can compile for that.


User calls (optionally) cmake with -DCMAKE_BUILD_ARCH=32 to build in 32 
bits.


Currently, I only have it working for Linux (tested) and Sun (not 
tested).  Windows and OSX are todo, as I don't have access to 64-bit 
versions of them.



UnixPaths.cmake is then set to search for 
/usr/local/lib${CMAKE_BUILD_ARCH} before it searches for any 
/usr/local/lib and other.


This is still kind of screwy now because try-compile will call 
UnixPaths.cmake without calling my FindBuildDir, which is a bug in how 
cmake deals with variables.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
#-*-cmake-*-
#
# This simple CMake extension makes sure that builds get
# created inside a BUILD/os-osversion-arch directory
# and that executables, obj files and lib files get placed
# correctly in subdirectories.
#
#
# Macro to check architecture
#
MACRO( CHECK_ARCHITECTURE )


  IF( NOT CMAKE_BUILD_ARCH )
SET( CMAKE_BUILD_ARCH $ENV{CMAKE_BUILD_ARCH} )
IF( NOT CMAKE_BUILD_ARCH )
  SET( CMAKE_BUILD_ARCH Native )
ENDIF( NOT CMAKE_BUILD_ARCH )
  ENDIF( NOT CMAKE_BUILD_ARCH )

  IF( NOT CMAKE_BUILD_ARCH MATCHES ^(Native|64|32)$ )
MESSAGE( FATAL_ERROR 
  CMAKE_BUILD_ARCH set but invalid.  
  Only Native, 64 and 32 are valid settings )
  ENDIF( NOT CMAKE_BUILD_ARCH MATCHES ^(Native|64|32)$ )

  #
  # Set Native architecture based on void* size
  #
  INCLUDE(CheckTypeSize)
  CHECK_TYPE_SIZE(void*  SIZEOF_VOID_PTR)

  IF( ${SIZEOF_VOID_PTR} MATCHES ^8$ )
SET( OS_32_BITS 0 )
SET( OS_64_BITS 1 )
SET( CMAKE_NATIVE_ARCH 64 )
  ELSE( ${SIZEOF_VOID_PTR} MATCHES ^8$ )
SET( OS_32_BITS 1 )
SET( OS_64_BITS 0 )
SET( CMAKE_NATIVE_ARCH 32 )
  ENDIF( ${SIZEOF_VOID_PTR} MATCHES ^8$ )

  MESSAGE( FATAL_ERROR void size: ${SIZEOF_VOID_PTR} )

  IF( UNIX )
EXECUTE_PROCESS( 
  COMMAND uname -a
  OUTPUT_VARIABLE OS_ARCH 
  )

#
# For Linux
#
IF( OS_ARCH MATCHES .*Linux.* )
  IF( OS_ARCH MATCHES .*x86_64.* )
SET( OS_32_BITS 1 )
  ELSEIF( OS_ARCH MATCHES .*ia64.* )
SET( OS_32_BITS 0 )
  ELSEIF( OS_ARCH MATCHES .*i686.* )
SET( OS_32_BITS 1 )
  ENDIF( OS_ARCH MATCHES .*x86_64.* )
ENDIF( OS_ARCH MATCHES .*Linux.* )

#
# For SUN
#
IF( OS_ARCH MATCHES .*SunOS.* )
  EXECUTE_PROCESS( 
COMMAND isainfo -v
OUTPUT_VARIABLE SUNOS_ARCH 
)

  IF ( SUNOS_ARCH MATCHES .*64-bit.* )
SET( OS_32_BITS 1 )
  ENDIF(  SUNOS_ARCH MATCHES .*64-bit.* )

ENDIF( OS_ARCH MATCHES .*SunOS.* )

IF( APPLE )
  #
  # @todo: add Apple 64-bit OS detection here
  #
ENDIF( APPLE )

  ELSE( UNIX )

#
# @todo: add windows 64-bit OS detection here
#

  ENDIF( UNIX )


  IF ( CMAKE_BUILD_ARCH STREQUAL Native )
SET( CMAKE_BUILD_ARCH ${CMAKE_NATIVE_ARCH} )
  ENDIF( CMAKE_BUILD_ARCH STREQUAL Native )

  IF( CMAKE_BUILD_ARCH EQUAL 32 )

IF( NOT OS_32_BITS )
  MESSAGE( FATAL_ERROR 
Sorry, but this platform cannot compile 32-bit applications )
ENDIF( NOT OS_32_BITS )

IF( NOT CMAKE_NATIVE_ARCH EQUAL 32 )

  IF( WIN32 )
  ELSE( WIN32 )

IF( CMAKE_COMPILER_IS_GNUCXX )
  ADD_DEFINITIONS( -m32 )
  SET( LINK_FLAGS -m32 ${LINK_FLAGS} )
ELSE( CMAKE_COMPILER_IS_GNUCXX )

  #
  # @todo: add 32-bit compile flags for non-GNU compilers here
  #
  
ENDIF( CMAKE_COMPILER_IS_GNUCXX )
  ENDIF( WIN32 )

ENDIF( NOT CMAKE_NATIVE_ARCH EQUAL 32 )

  ENDIF( CMAKE_BUILD_ARCH EQUAL 32 )

ENDMACRO( CHECK_ARCHITECTURE )


CHECK_ARCHITECTURE()

#
# Store build type
#
IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE Release CACHE STRING
  Choose the type of build, options are: None Debug Release RelWithDebInfo 
MinSizeRel.
  FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)

IF( CMAKE_BUILD_TYPE STREQUAL Debug )
  ADD_DEFINITIONS( -DDEBUG )
ENDIF( CMAKE_BUILD_TYPE STREQUAL Debug )

IF( NOT CMAKE_SYSTEM )
  MESSAGE( FATAL_ERROR CMAKE_SYSTEM was not set )
ENDIF( NOT CMAKE_SYSTEM )

#
# @bug in cmake2.5 in windows (workaround)
#
IF( NOT CMAKE_SYSTEM_VERSION )
  SET( CMAKE_SYSTEM_VERSION 5.1 )
  SET( CMAKE_SYSTEM ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION} )
ENDIF( NOT CMAKE_SYSTEM_VERSION )


IF( NOT CMAKE_BUILD_TYPE )
  MESSAGE( FATAL_ERROR CMAKE_BUILD_TYPE was not set )
ENDIF( NOT CMAKE_BUILD_TYPE )

IF( NOT CMAKE_BUILD_ARCH )
  MESSAGE( FATAL_ERROR CMAKE_BUILD_ARCH was not set )
ENDIF( NOT CMAKE_BUILD_ARCH )


SET( BUILD_DIR

Re: [CMake] Waf build tool

2007-12-16 Thread Gonzalo Garramuño

Brandon Van Every wrote:

On Dec 15, 2007 1:55 PM, Brandon Van Every [EMAIL PROTECTED] wrote:

I've subscribed to the SCons mailing list.  The SCons community has
people who got fed up with it and started their own RD.  It seems
that the SCons Python 1.5 limitation is a serious one, as developers
generally only know Python = 2.2.  Waf is the offering of a fellow
who clearly thinks OO is important in a build system for some reason.
http://code.google.com/p/waf/



A quick eval of waf

* Its dependency checker is broken.
  /usr/include is not checked for speed.
* Swig support is broken.
* no real multi platform support, it is all do it yourself.
* out-of-source builds is kind of broken.
* proper out-of-source builds needs the wscript to be set up
  with variants (good idea, but badly done).
* build dir creates stubs for all subdirectories, not only
  those in build (yuck).
* no listing of tasks (yuck).
* you are always forced to write a configure function (yuck).
* WAY too verbose (yuck).
* badly documented.

In summary, thanks.  But, no thanks.  With all those problems I did not 
even bother checking the speed.





--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Waf build tool

2007-12-16 Thread Gonzalo Garramuño

Alexander Neundorf wrote:


What's the purpose ?
CMake is kind-of going OO.



Meaning *what*, exactly?


Do you mean that
a) say FILE( READ ... )
will change to:
   File.read()  or x.read() where x is a file object?

   and LIST( APPEND ... )
   will be just a.append(x) or a += x

b) you'll be able to do:

class A
   attr_accessor :x
   def f( x )
  @x = x + 5
   end
end

class B  A
   def t(); end
end

a = A.new
a.x
a.f
a.x = 5

b = B.new
b.x
b.f
b.t

c) you'll have 'virtual' macros?
class A
   def f( x ); end
end

class B  A
   def f( x )
super
   end
end

a = A.new
b = B.new
b.f(1) # calls B::f, which in turn can call A::f, too.
a.f(1) # calls A::f

d) ...other...

I consider a) to c) the cornerstone of OO.  b and c cannot be done in 
cmake.  a) can (only partially) be done and with an uglier syntax.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Including of Platform/UnixPaths.cmake now broken

2007-12-10 Thread Gonzalo Garramuño


This used to work properly, but it has now changed behavior and is now 
borken.


Using CVS version, somewhat latest one.
cmake version 2.5-20071026

I have:

SET( CMAKE_MODULE_PATH  ${CMAKE_CURRENT_SOURCE_DIR}/modules )

to change cmake's search path behavior.

Inside my local modules dir, I have Platform/UnixPaths.cmake, to fix 
cmake's searching of 32-bit stuff on a 64-bit machine when -m32 is used.


I use my own variable -DCMAKE_BUILD_ARCH=32 to determine whether I am 
compiling 32-bits on a 64-bits machine.


The problem is that cmake now goes to check compiler and it runs 
Platform/UnixPaths.cmake without passing any of my variables to it (ie. 
CMAKE_BUILD_ARCH=).


Then, after it calls the compiler check, it seems it caches the 
CMAKE_SYSTEM_PATH and does not call Platform/UnixPaths anymore during 
the running of my CMakeLists.txt file.


Other local modules do get picked correctly with my variables set, so 
CMAKE_MODULE_PATH works ok, but not for Platform/UnixPaths.cmake.


This results in CMAKE_SYSTEM_PATH being set wrong (and thus, my compile 
not to work).


Previous versions would invoke UnixPaths.cmake multiple times, so even 
though the compiler check would call it wrongly without any variable 
set, during the course of my actual run of the CMakeLists.txt file, it 
would get called again but with my vars set, which allowed me to set the 
path correctly.


I'm either looking for:
	a) A correct UnixPaths.cmake module that handles 32-bits libs properly 
(the current one in CVS does not).


or

b) A fix to this broken behavior.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


  1   2   >