[CMake] Documentation does not include --check-build-system

2011-11-25 Thread J Decker
I don't find any documentation on the command that cmake uses with a
cmake -E --check-build-system  Does this option happen to set any
specific cmake variable indicating that it is doing a check build?

I'm inquiring and I saw a post about it before
http://www.kwwidgets.org/Bug/view.php?id=2133   (closed)

about someone saying it might be nice to be able to bypass the
cmake_check_build_system rule in the makefile.

I would like to make building this project a single click interface.
- in the cmake script I can define some options to build all, install
or package during the configure.  But if I do, then the first thing
that is done is the cmake script is processed again (which it already
was), which triggers the make again, which calls cmake, etc.  I could
test to see if's a phase that isn't --check-build-system and do the
command?

Also I think I'd really just like to be the last thing done on a
'generate' in the cmake-gui (not entirely sure what the difference is
between configure and generate).
--

Powered by www.kitware.com

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

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

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


Re: [CMake] Build doesn't work with Mac OS X Lion...

2011-11-25 Thread Michael Jackson
There is a cmake variable that you set during  onfiguration time.
Something like os_x_architectures. There you can add the specific arch
that you want to build for.

-
Mike Jackson www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio

Sent from my mobile device. Please excuse the shortness of the reply.

On Nov 25, 2011, at 14:47, Dick Munroe  wrote:

> I've got a build that works just fine with Leopard.
>
> For reasons I won't get into, I had to upgrade one of my systems to Lion and 
> now (I've installed XCode 4.2) the build won't work.  I get the following 
> error:
>
> [  0%] Reaping winning child 0x10260c510 PID 1009
> Live child 0x10260c510 
> (libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o)
>  PID 1010
> Building CXX object 
> libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o
> Reaping winning child 0x10260c510 PID 1010
> Live child 0x10260c510 
> (libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o)
>  PID 1011
> llvm-g++-4.2: Invalid arch name : -O2
> Reaping losing child 0x10260c510 PID 1011
> make[2]: *** 
> [libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o]
>  Error 1
> Removing child 0x10260c510 PID 1011 from chain.
> Reaping losing child 0x10c20c290 PID 1008
> make[1]: *** [libxp/CMakeFiles/xp.dir/all] Error 2
> Removing child 0x10c20c290 PID 1008 from chain.
> Reaping losing child 0x10940e730 PID 996
>
> If I dig around, I find the CXX flags to be:
>
> -arch  -O2 -fPIC
>
> and for some reason the Lion g++ compiler is choking thinking that there 
> should be and arch value.  Which if I dig around in the Leopard build I find:
>
> -Dxp_EXPORTS  -arch i386 -O2 -g -fPIC
>
> Which brings up the questions, (1) with the same CMakeLists.txt file, why am 
> I getting different values and (2) how do I get the arch to be i386 on the 
> Lion build.
>
> Best,
>
> Dick Munroe
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

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

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

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


[CMake] parallel build using "cmake --build"?

2011-11-25 Thread Steve M. Robbins
Hi,

To build VTK on our windows build server, I wrote a small batch script
that invokes "cmake --build".

My developer machine is multicore; is there a way to get "cmake --build" 
to run multiple jobs?

Thanks,
-Steve


signature.asc
Description: Digital signature
--

Powered by www.kitware.com

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

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

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

Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Michael Hertling
On 11/25/2011 08:42 PM, Mathias Gaunard wrote:
> On 11/25/2011 07:19 PM, Michael Hertling wrote:
> 
>> That's caused by the absence of an SONAME in your baz/libtest.so. If
>> there's no DT_SONAME tag in a shared library you are linking against,
>> the linker will write a DT_NEEDED tag to the resulting binary which
>> points to the library as it has been specified in the linker command
>> line, i.e. ../baz/libtest.so in your case; examine with "readelf -d".
>> Then, of course, libtest.so can be found only if the search starts in
>> the appropriate directories, e.g. in bar since it's a sibling of baz:
>> "cd bar&&  ./foo" works. If there is an DT_SONAME tag in the library,
>> the linker uses this to set the DT_NEEDED tag in the resulting binary,
>> and CMake places an SONAME in each shared library by default, even if
>> the VERSION/SOVERSION property isn't specified. See [1] for a related
>> discussion. If you really want to create a shared library by yourself,
>> do it right, e.g. with
> 
> Thank you very much for the information.
> I had no idea shared objects had that kind of behaviour.
> 
> 
>> and note that PRE_BUILD is actually PRE_LINK for Makefiles,
> 
> I know, just using PRE_BUILD because it looks better when compared to 
> POST_BUILD.
> 
> 
>> LIBRARY_OUTPUT_PATH has been obsolete for a long time, and
>> the LINK_DIRECTORIES() command means asking for trouble.
> 
> I was wondering if those variables could be affecting the base directory 
> used in the RPATH or other so-related things.

They do, but for DT_NEEDED tags containing a "/", the runtime linker
ignores rpath settings - i.e. the DT_RPATH tags generated by -rpath
options when the binary has been created. Therefore, the DT_NEEDED
tag "../baz/libtest.so" is used immediately without referring to
any DT_RPATH tags incorporated in the same binary.

>> [1] 
>> http://www.mail-archive.com/cmake-wChDC6UyXvPYtjvyW6yDsg@public.gmane.org/msg33482.html
> 
> Doesn't seem to work :(

Strange, the ML archives have it right. One more try:



Regards,

Michael
--

Powered by www.kitware.com

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

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

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


Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Mathias Gaunard

On 11/25/2011 07:19 PM, Michael Hertling wrote:


That's caused by the absence of an SONAME in your baz/libtest.so. If
there's no DT_SONAME tag in a shared library you are linking against,
the linker will write a DT_NEEDED tag to the resulting binary which
points to the library as it has been specified in the linker command
line, i.e. ../baz/libtest.so in your case; examine with "readelf -d".
Then, of course, libtest.so can be found only if the search starts in
the appropriate directories, e.g. in bar since it's a sibling of baz:
"cd bar&&  ./foo" works. If there is an DT_SONAME tag in the library,
the linker uses this to set the DT_NEEDED tag in the resulting binary,
and CMake places an SONAME in each shared library by default, even if
the VERSION/SOVERSION property isn't specified. See [1] for a related
discussion. If you really want to create a shared library by yourself,
do it right, e.g. with


Thank you very much for the information.
I had no idea shared objects had that kind of behaviour.



and note that PRE_BUILD is actually PRE_LINK for Makefiles,


I know, just using PRE_BUILD because it looks better when compared to 
POST_BUILD.




LIBRARY_OUTPUT_PATH has been obsolete for a long time, and
the LINK_DIRECTORIES() command means asking for trouble.


I was wondering if those variables could be affecting the base directory 
used in the RPATH or other so-related things.




[1] 
http://www.mail-archive.com/cmake-wChDC6UyXvPYtjvyW6yDsg@public.gmane.org/msg33482.html


Doesn't seem to work :(

--

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] Build doesn't work with Mac OS X Lion...

2011-11-25 Thread Dick Munroe

I've got a build that works just fine with Leopard.

For reasons I won't get into, I had to upgrade one of my systems to Lion 
and now (I've installed XCode 4.2) the build won't work.  I get the 
following error:


[  0%] Reaping winning child 0x10260c510 PID 1009
Live child 0x10260c510 
(libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o) 
PID 1010
Building CXX object 
libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o

Reaping winning child 0x10260c510 PID 1010
Live child 0x10260c510 
(libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o) 
PID 1011

llvm-g++-4.2: Invalid arch name : -O2
Reaping losing child 0x10260c510 PID 1011
make[2]: *** 
[libxp/CMakeFiles/xp.dir/Users/munroe/Documents/My_SVN/ESPlanner_Computation_Engine.U2011-11-01/Common/xmllib/print/libxp.cpp.o] 
Error 1

Removing child 0x10260c510 PID 1011 from chain.
Reaping losing child 0x10c20c290 PID 1008
make[1]: *** [libxp/CMakeFiles/xp.dir/all] Error 2
Removing child 0x10c20c290 PID 1008 from chain.
Reaping losing child 0x10940e730 PID 996

If I dig around, I find the CXX flags to be:

-arch  -O2 -fPIC

and for some reason the Lion g++ compiler is choking thinking that there 
should be and arch value.  Which if I dig around in the Leopard build I 
find:


-Dxp_EXPORTS  -arch i386 -O2 -g -fPIC

Which brings up the questions, (1) with the same CMakeLists.txt file, 
why am I getting different values and (2) how do I get the arch to be 
i386 on the Lion build.


Best,

Dick Munroe

--

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] Do not build/install import library

2011-11-25 Thread Matthias Gehre
Works great, thank you!
--

Powered by www.kitware.com

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

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

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


Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Michael Hertling
On 11/25/2011 12:28 PM, Mathias Gaunard wrote:
> There is some strange CMake behaviour I don't quite understand.
> 
> In the project attached, I build a shared library for which I want to 
> specify a custom build command; to do this I generate a dummy library 
> which I then replace by another file in a POST_BUILD command 
> (alternatives involving imported libraries do not work properly across 
> different scopes).
> 
> If I do not replace the library, then the executable correctly links 
> against libtest.so.
> If I do, it links instead with ../baz/libtest.so (sic), which of course, 
> fails when trying to run the program.
> 
> Why is it putting a relative path into my executable? Why is it 
> different depending on whether I replace the .so by another one or not?
> 
> Thank you very much for any insight on what's happening.

That's caused by the absence of an SONAME in your baz/libtest.so. If
there's no DT_SONAME tag in a shared library you are linking against,
the linker will write a DT_NEEDED tag to the resulting binary which
points to the library as it has been specified in the linker command
line, i.e. ../baz/libtest.so in your case; examine with "readelf -d".
Then, of course, libtest.so can be found only if the search starts in
the appropriate directories, e.g. in bar since it's a sibling of baz:
"cd bar && ./foo" works. If there is an DT_SONAME tag in the library,
the linker uses this to set the DT_NEEDED tag in the resulting binary,
and CMake places an SONAME in each shared library by default, even if
the VERSION/SOVERSION property isn't specified. See [1] for a related
discussion. If you really want to create a shared library by yourself,
do it right, e.g. with

COMMAND g++ -shared ${CMAKE_CURRENT_SOURCE_DIR}/dummy.cpp
   -o ${CMAKE_CURRENT_BINARY_DIR}/test.so
   -Wl,-soname,libtest.so
   -fPIC

and note that PRE_BUILD is actually PRE_LINK for Makefiles,
LIBRARY_OUTPUT_PATH has been obsolete for a long time, and
the LINK_DIRECTORIES() command means asking for trouble.

Regards,

Michael

[1] http://www.mail-archive.com/cmake@cmake.org/msg33482.html
--

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] iOS Archiving (Xcode 4.2, Lion, CMake2.8-6)

2011-11-25 Thread Daniel Dekkers
Hi,

Has anyone managed to perform a successful iOS Archiving pass yet?

Our apps run on the simulator (both iPhone (5.0) and iPad (5.0)) and on the 
actual devices iPhone 3GS (5.0.1) and iPad2 (5.0.1), but archiving always gives 
a link error:

Ld 
/Users/danieldekkers/Library/Developer/Xcode/DerivedData/All-fgyaqwkvsryjkhbiepprnmdcager/ArchiveIntermediates/Discs/InstallationBuildProductsLocation/Application/Discs.app/Discs
 normal armv7
cd /Users/danieldekkers/development
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
setenv PATH 
"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ -arch 
armv7 -isysroot 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk 
-L/Users/danieldekkers/Library/Developer/Xcode/DerivedData/All-fgyaqwkvsryjkhbiepprnmdcager/ArchiveIntermediates/Discs/BuildProductsPath/Release-iphoneos
 
-F/Users/danieldekkers/Library/Developer/Xcode/DerivedData/All-fgyaqwkvsryjkhbiepprnmdcager/ArchiveIntermediates/Discs/BuildProductsPath/Release-iphoneos
 -filelist 
/Users/danieldekkers/Library/Developer/Xcode/DerivedData/All-fgyaqwkvsryjkhbiepprnmdcager/ArchiveIntermediates/Discs/IntermediateBuildFilesPath/All.build/Release-iphoneos/Discs.build/Objects-normal/armv7/Discs.LinkFileList
 -dead_strip -ObjC -framework OpenGLES -framework UIKit -framework Foundation 
-framework CoreGraphics -framework QuartzCore -framework CoreData -framework 
Coremotion -Wl,-search_paths_first -Wl,-headerpad_max_install_names 
/Users/danieldekkers/development/build/iOS/ES1/rendertools/src/Rel
 ease-iphoneos/libRenderTools.a -lz -miphoneos-version-min=4.3 -o 
/Users/danieldekkers/Library/Developer/Xcode/DerivedData/All-fgyaqwkvsryjkhbiepprnmdcager/ArchiveIntermediates/Discs/InstallationBuildProductsLocation/Application/Discs.app/Discs
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ failed 
with exit code 1

This is a problem, because you have to archive an ipa file, AdHoc or AppStore 
to ship your application.

These are our IOS specific settings at the moment, lots of trial-and-error, but 
at least they work on the simulator and attached devices:

IF( RT_IOS )
# "Toolchain" settings can (for the time being) just be included...
SET (CMAKE_SYSTEM_NAME Generic)
SET (CMAKE_SYSTEM_VERSION 1)
SET (CMAKE_SYSTEM_PROCESSOR arm)

SET (RT_SDKVER "5.0" CACHE PATH "iOS SDK version" )
SET (DEVROOT "/Developer/Platforms/iPhoneOS.platform/Developer")
SET (SDKROOT "${DEVROOT}/SDKs/iPhoneOS${RT_SDKVER}.sdk")
IF( EXISTS ${SDKROOT} )
SET (CMAKE_OSX_SYSROOT "${SDKROOT}")
ELSE()
MESSAGE( "Warning, iOS SDK path not found: " ${SDKROOT})
ENDIF()
SET (CMAKE_OSX_ARCHITECTURES "$(ARCHS_UNIVERSAL_IPHONE_OS)") # Either 
"$(ARCHS_UNIVERSAL_IPHONE_OS)" or "arm6" "arm7"

# SET (CMAKE_C_COMPILER "${DEVROOT}/usr/bin/gcc")  # Can be 
removed, just let Xcode choose the default.
# SET (CMAKE_CXX_COMPILER "${DEVROOT}/usr/bin/g++")# Can be 
removed, just let Xcode choose the default.

SET (CMAKE_FIND_ROOT_PATH "${DEVELOPMENT_ROOT}" "${SDKROOT}" 
"${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

SET( RT_DEPLOYMENT_TARGET "4.3" CACHE STRING "minimum required SDK" )

SET( GCC_INPUT_FILETYPE "Objective-C++" )
SET( CMAKE_CXX_FLAGS "-x objective-c++ -mno-thumb" )

# For iOS builds this is needed for the app to initiate the 
UIApplication delegate instance...
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ObjC" )

# Look in the correct build directories when linking the app to the 
RenderTools library...
SET( CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator" )
ENDIF()

Just wondering if someone is following the same path.

Thanks,

Daniel 
--

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] Checking for empty list

2011-11-25 Thread Michael Hertling
On 11/25/2011 03:15 PM, Michael Wild wrote:
> On 11/25/2011 02:52 PM, Daniel Dekkers wrote:
>> Hi,
>>
>>  
>>
>> I know it should be out there somewhere in the documentation, but can’t
>> find it.
>>
>> How do I check for an empty list?
>>
>> I can use LIST(LENGTH MYLIST LISTCOUNT) with an extra variable LISTCOUNT
>> but isn’t there a single command?
>>
>>  
>>
>> Thanks,
>>
>> Daniel
>>
> 
> 
> An empty list is an empty variable, and evaluates to FALSE. So you can use
> 
> if(NOT MYLIST)
>   message("Either MYLIST is empty or otherwise FALSE")
> endif()

...or otherwise FALSE: Exactly, and due to this, it's not bullet-proof:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(EMPTY NONE)
SET(MYLIST "FALSE")
LIST(LENGTH MYLIST n)
MESSAGE("Length of MYLIST: ${n}")
IF(MYLIST)
MESSAGE("IF() says MYLIST is not empty.")
ELSE()
MESSAGE("IF() says MYLIST is empty.")
ENDIF()

Because of non-empty strings - constituting non-empty lists - which
evaluate to FALSE in the IF() command, the only really safe way to
check whether a list is empty is using LIST(LENGTH ...), AFAICS.

Regards,

Michael
--

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] add_test WORKING_DIRECTORY

2011-11-25 Thread W Eryk Wolski
I am testing against reference data in the source directory.
However, I would like to perform out of source builds.


With
add_test(SpoofTest ${BinOut}/SpoofTest )
the test dont find's the data, because the data path is hard coded in the
tests and the build directory location is arbitrary.


My Idea is to use the WORKING_DIRECTORY option to execute the tests in the
Source directory.

add_test(NAME SpoofTest
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${BinOut}/SpoofTest)

However, I do not understand the COMMAND parameter.

This is what I am getting when I run ctest:
Checking test dependency graph end
test 1
Start 1: SpoofTest

1: Test command: NOT_AVAILABLE
Test not available without configuration.  (Missing "-C "?)
1/1 Test #1: SpoofTest ***Not Run   0.00 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   2.29 sec

The following tests FAILED:
  1 - SpoofTest (Not Run)
Errors while running CTest

Can anyone please explain the COMMAND parameter to me!

Regards
Eryk







-- 
Witold Eryk Wolski

Heidmark str 5
D-28329 Bremen
tel.: 04215261837
--

Powered by www.kitware.com

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

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

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

[CMake] CMake with cminpack, link libraries

2011-11-25 Thread Fabian Torres
Hi

I'm trying to use cminpack. I've downloaded cminpack 1.1.3 and configure it
with cmake to create a Xcode 3.2 project. After building the xcode project
successfully I found that it generates a debug directory which contains the
library or if the shared_libs option in cmake was on or off respectively.
The examples works fine.

Know I'm creating an Xcode project with Cmake in which I'm going to use the
cminpack function lmdif1 I attach the CMakelist.txt which I'm using. I have
no problems in generating the xcode project with CMake, but when I build
the project I get the next errors

"_dpmpar", referenced from _main ProbeClaibration.o
"_lmdif1", referenced from _main ProbeCalibration.o

Symbol(s) not found

After some research I found that it may be a problem linking the cminpack
library.I'm new using CMake and I'm not sure if I`m using the correct
method to link the cminpack libraries with
LINK_DIRECTORIES(/opt/cminpack-binary).

I wonder if you can help me figure it out. And also want to know which
library do you recomend mi to use, the static libcminpack.a lib or the
dynamic libcminpack.dlyb lib.

Thanks for your help. I`m really stuck on this and I need to solve my
problem as soon as possible.



Thanks again

-- 
Fabián Torres Robles
Maestria en Ciencias en Ingeniería Electrónica
Ingeniería en Sistemas Electrónicos
tel. 58081280, 0445534661338
e-mail fabian.trob...@gmail.com, dae.w...@gmail.com
cmake_minimum_required(VERSION 2.6)
 
PROJECT(ProbeCalibration)
 
FIND_PACKAGE(VTK)

IF(VTK_FOUND)
INCLUDE(${VTK_USE_FILE})
ELSE(VTK_FOUND)
MESSAGE(FATAL_ERROR
"VTK NOT FOUND. PLEASE SET VTK_DIR.")
ENDIF(VTK_FOUND)

FIND_PACKAGE(ITK)

IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
MESSAGE(FATAL_ERROR
"ITK NOT FOUND. PLEASE SET ITK_DIR.")
ENDIF(ITK_FOUND)

include_directories(/opt/cminpack-1.1.3 ${ProbeCalibration_SOURCE_DIR})
LINK_DIRECTORIES(/opt/cminpack-binary)
 
add_executable(ProbeCalibration ImageCrop.h itkImageToVTKImageFilter.h 
MyStyle.h PickPixel.h ProbeCalibration.cxx)
 
target_link_libraries(ProbeCalibration ${VTK_LIBRARIES} ${ITK_LIBRARIES})--

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] link_directories issue, cmake 2.8.5

2011-11-25 Thread Alexander Neundorf
On Friday 25 November 2011, Michael Hertling wrote:
> On 11/23/2011 05:39 PM, Vladimir Chebotarev wrote:
> > Hello.
> > 
> > I've just found an issue with link_directories and cmake 2.8.5.
> > If I give an absolute but not normalized path like
> > c:/bla-bla-bla/../bla/bla as its argument (with default CMP0015),
> > cmake thinks it is relative path and shows a warning about explicitly
> > undefined policy. Also it normalizes path making it relative and
> > actually makes a mistake during that, so the final VC project can't find
> > the path to library.
> 
> Take that path, use it to fully specify the library's location and
> eliminate LINK_DIRECTORIES() from your project, cf. [1]. Then, if
> things still don't work, report anew on the persisting problems.

This is on Windows, or are you crosscompiling or something ?
Strange. This is what cmLinkDirectoriesCommand.cxx does:

  ...
  std::string unixPath = dir;
  cmSystemTools::ConvertToUnixSlashes(unixPath);
  if(!cmSystemTools::FileIsFullPath(unixPath.c_str()))


and the implementation of FileIsFullPath() follows. It looks like it should go 
into the branch where it checks for the ':'

bool SystemTools::FileIsFullPath(const char* in_name)
{
  kwsys_stl::string name = in_name;
#if defined(_WIN32) || defined(__CYGWIN__)
  // On Windows, the name must be at least two characters long.
  if(name.length() < 2)
{
return false;
}
  if(name[1] == ':')
{
return true;
}
  if(name[0] == '\\')
{
return true;
}
#else
  // On UNIX, the name must be at least one character long.
  if(name.length() < 1)
{
return false;
}
#endif
#if !defined(_WIN32)
  if(name[0] == '~')
{
return true;
}
#endif
  // On UNIX, the name must begin in a '/'.
  // On Windows, if the name begins in a '/', then it is a full
  // network path.
  if(name[0] == '/')
{
return true;
}
  return false;
}


Alex
--

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] steps to add support for new (D) language into CMake?

2011-11-25 Thread Gour
Hello!

I'd like to help bring support for D language available via
cmaked2 project (http://code.google.com/p/cmaked2/) into CMake project
itself.

Can anyone outline all the required steps how to do it?

Thank you.


Sincerely,
Gour

-- 
From anger, complete delusion arises, and from delusion 
bewilderment of memory. When memory is bewildered, 
intelligence is lost, and when intelligence is lost 
one falls down again into the material pool.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


signature.asc
Description: PGP signature
--

Powered by www.kitware.com

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

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

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

Re: [CMake] VS2005 and cmake

2011-11-25 Thread John Drescher
On Fri, Nov 25, 2011 at 3:55 AM, Tom Deblauwe  wrote:
> Hello,
>
> Are you sure that is not some kind of extension or plugin that you are
> using?
> I don't think you can reload all the projects at once in VS2005?
> Best regards,
> Tom,
>

CMake installs a visual studio macro that handles this. When there is
a large change the macro should pop up in the GUI asking you ( I
believe) if you want to continue building or cancel. In either case it
should reload all projects. In the 3 to 4 years I have used CMake with
visual studio (2005 and 2008) I have sometimes seen this fail and
Visual Studio would prompt for reloading.

John
--

Powered by www.kitware.com

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

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

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


Re: [CMake] XCode: Detect debug build to enable /D_Debug or similar?

2011-11-25 Thread g...@novadsp.com

Thanks.

On 25/11/2011 14:52, Michael Wild wrote:

On 11/25/2011 03:40 PM, g...@novadsp.com wrote:
[ Fixed TOFU ]

On 24/11/2011 22:22, Michael Hertling wrote:

On 11/24/2011 07:08 PM, g...@novadsp.com wrote:

How can I do this? Specifically generating for XCode.




--

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] XCode: Detect debug build to enable /D_Debug or similar?

2011-11-25 Thread Michael Wild
On 11/25/2011 03:40 PM, g...@novadsp.com wrote:
[ Fixed TOFU ]
> On 24/11/2011 22:22, Michael Hertling wrote:
>> On 11/24/2011 07:08 PM, g...@novadsp.com wrote:
>>> How can I do this? Specifically generating for XCode.
>>>
>>> My cmakefile has this:
>>>
>>> if (${CMAKE_CFG_INTDIR} STREQUAL "Debug")
>>> Message("We are generating/building debug code for ${this_target}")
>>> ADD_DEFINITIONS(/D_DEBUG)
>>> endif()
>>>
>>> But _DEBUG is never defined.
>>>
>>> This question comes up twice on StackOverflow. Both answers are
>>> endlessly mutually referential ...
>>>
>>> Thx++
>>
>> SET_DIRECTORY_PROPERTIES(PROPERTIES COMPILE_DEFINITIONS_DEBUG _DEBUG)
>>
>> Regards,
>>
>> Michael
>
> I forgot to aks - what is the recommended way of adding multiple
> definitions? i.e. /D_DEBUG /D_NO_GZIP?
> 
> Thx++
> 

set_directory_properties(PROPERTIES
  COMPILE_DEFINITIONS_DEBUG "_DEBUG;_NO_GZIP")

Either using quotes and semicolon-separated list as above, or use the
set_property command:

set_property(DIRECTORY PROPERTY
  COMPILE_DEFINITIONS_DEBUG _DEBUG _NO_GZIP)


Michael
--

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] XCode: Detect debug build to enable /D_Debug or similar?

2011-11-25 Thread g...@novadsp.com
I forgot to aks - what is the recommended way of adding multiple 
definitions? i.e. /D_DEBUG /D_NO_GZIP?


Thx++

On 24/11/2011 22:22, Michael Hertling wrote:

On 11/24/2011 07:08 PM, g...@novadsp.com wrote:

How can I do this? Specifically generating for XCode.

My cmakefile has this:

if (${CMAKE_CFG_INTDIR} STREQUAL "Debug")
Message("We are generating/building debug code for ${this_target}")
ADD_DEFINITIONS(/D_DEBUG)
endif()

But _DEBUG is never defined.

This question comes up twice on StackOverflow. Both answers are
endlessly mutually referential ...

Thx++


SET_DIRECTORY_PROPERTIES(PROPERTIES COMPILE_DEFINITIONS_DEBUG _DEBUG)

Regards,

Michael
--

Powered by www.kitware.com

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

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

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




--

Powered by www.kitware.com

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

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

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


Re: [CMake] Checking for empty list

2011-11-25 Thread Michael Wild
Yes. If you RTFM about the IF() command you see that you can either use
the variable name MYLIST or the variable value ${MYLIST}. AFAIK for this
kind of test you would need to put the latter in quotes, however.

Michael

On 11/25/2011 03:29 PM, Daniel Dekkers wrote:
> Thanks, so...
> 
> IF( MYLIST )
>   MESSAGE( STATUS "List is not empty" )
> ENDIF()
> 
> Without the ${...} surrounding MYLIST, which confuses me, but probably makes
> sense if you (better than I do) know what you're doing ;-)
> 
> -Oorspronkelijk bericht-
> Van: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Namens Michael
> Wild
> Verzonden: vrijdag 25 november 2011 15:15
> Aan: cmake@cmake.org
> Onderwerp: Re: [CMake] Checking for empty list
> 
> On 11/25/2011 02:52 PM, Daniel Dekkers wrote:
>> Hi,
>>
>>  
>>
>> I know it should be out there somewhere in the documentation, but 
>> can't find it.
>>
>> How do I check for an empty list?
>>
>> I can use LIST(LENGTH MYLIST LISTCOUNT) with an extra variable 
>> LISTCOUNT but isn't there a single command?
>>
>>  
>>
>> Thanks,
>>
>> Daniel
>>
> 
> 
> An empty list is an empty variable, and evaluates to FALSE. So you can use
> 
> if(NOT MYLIST)
>   message("Either MYLIST is empty or otherwise FALSE")
> endif()
> 
> Michael
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

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

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

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


Re: [CMake] Checking for empty list

2011-11-25 Thread Daniel Dekkers
Thanks, so...

IF( MYLIST )
MESSAGE( STATUS "List is not empty" )
ENDIF()

Without the ${...} surrounding MYLIST, which confuses me, but probably makes
sense if you (better than I do) know what you're doing ;-)

-Oorspronkelijk bericht-
Van: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Namens Michael
Wild
Verzonden: vrijdag 25 november 2011 15:15
Aan: cmake@cmake.org
Onderwerp: Re: [CMake] Checking for empty list

On 11/25/2011 02:52 PM, Daniel Dekkers wrote:
> Hi,
> 
>  
> 
> I know it should be out there somewhere in the documentation, but 
> can't find it.
> 
> How do I check for an empty list?
> 
> I can use LIST(LENGTH MYLIST LISTCOUNT) with an extra variable 
> LISTCOUNT but isn't there a single command?
> 
>  
> 
> Thanks,
> 
> Daniel
> 


An empty list is an empty variable, and evaluates to FALSE. So you can use

if(NOT MYLIST)
  message("Either MYLIST is empty or otherwise FALSE")
endif()

Michael
--

Powered by www.kitware.com

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

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

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

--

Powered by www.kitware.com

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

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

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


Re: [CMake] Checking for empty list

2011-11-25 Thread Michael Wild
On 11/25/2011 02:52 PM, Daniel Dekkers wrote:
> Hi,
> 
>  
> 
> I know it should be out there somewhere in the documentation, but can’t
> find it.
> 
> How do I check for an empty list?
> 
> I can use LIST(LENGTH MYLIST LISTCOUNT) with an extra variable LISTCOUNT
> but isn’t there a single command?
> 
>  
> 
> Thanks,
> 
> Daniel
> 


An empty list is an empty variable, and evaluates to FALSE. So you can use

if(NOT MYLIST)
  message("Either MYLIST is empty or otherwise FALSE")
endif()

Michael
--

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] Checking for empty list

2011-11-25 Thread Rolf Eike Beer
> Hi,
> I know it should be out there somewhere in the documentation, but can't
find
> it.
> How do I check for an empty list?
> I can use LIST(LENGTH MYLIST LISTCOUNT) with an extra variable LISTCOUNT
but
> isn't there a single command?

if (MYLIST)

Eike
--

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] Checking for empty list

2011-11-25 Thread Daniel Dekkers
Hi,

 

I know it should be out there somewhere in the documentation, but can't find
it.

How do I check for an empty list?

I can use LIST(LENGTH MYLIST LISTCOUNT) with an extra variable LISTCOUNT but
isn't there a single command?

 

Thanks,

Daniel

--

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] Do not build/install import library

2011-11-25 Thread Michael Hertling
On 11/25/2011 10:22 AM, Matthias Gehre wrote:
> 2011/11/25 Michael Hertling :
>> On 11/24/2011 07:53 PM, Mathias Gaunard wrote:
>>> On 11/23/2011 10:14 PM, Matthias Gehre wrote:
 Hi,

 thanks for this very nice cmake. I switched just recently to get
 lightspark (lightspark.github.com)
 crossplatform, and it worked really smooth.

 One question, though: I cannot seem to find a way to _not_
 build/install the import libraries (foobar.dll.a) on win32.
 I do not need them, because I'm using MinGW's direct linking feature.
 All I found was ways to
 rename it, but not to keep it from building.
>>>
>>> Use the MODULE type of library
>>
>> CMake does not allow to link against a library of type MODULE.
>>
>> ATM, I don't know if one can prevent the import libraries from being
>> built without modifying the platform files or rewriting the affected
>> rule variables; it seems as if --out-implib is present anywhere. In
>> order to prevent them from being installed, it should be sufficient
>> to drop the ARCHIVE DESTINATION clause from the INSTALL() command
>> for the concerned targets.
>>
> 
> Thanks!
> I'm now using the following snippet to install the *.so on linux and just the
> dll on win32. Looks a bit hackish, though.
> 
> ADD_LIBRARY(spark SHARED ${LIBSPARK_SOURCES})
> ...
> #We have to use LIBRARY on linux, but that installs the import library on 
> win32

No, the .so is indeed a LIBRARY on *nix, but the .dll is a RUNTIME on
Windows, and the import library is an ARCHIVE, so it's sufficient to
just drop the ARCHIVE DESTINATION to prevent the latter from being
installed.

> IF(WIN32)
>   INSTALL(TARGETS spark RUNTIME DESTINATION ${PRIVATELIBDIR})
> ELSE()
>   INSTALL(TARGETS spark LIBRARY DESTINATION ${PRIVATELIBDIR})
> ENDIF()

Try

INSTALL(TARGETS spark
RUNTIME DESTINATION ...
LIBRARY DESTINATION ...
)

without an ARCHIVE DESTINATION; it's less hackish and should work, too.

Regards,

Michael
--

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] link_directories issue, cmake 2.8.5

2011-11-25 Thread Vladimir Chebotarev
On Fri, Nov 25, 2011 at 01:33:49PM +0100, Andreas Pakulat wrote:
> On 25.11.11 15:06:02, Vladimir Chebotarev wrote:
> > Actually, I already have normalized the path by myself, using 
> > get_filename_component,
> > and everything is ok at the moment.
> > Original message should have been treated as a bug report, however,
> 
> If you want to report a bug, report it on
> http://public.kitware.com/Bug/my_view_page.php. 

I do not want (since I solved the problem for myself), but if you think this 
information
is worth adding as a bug report, I'll do it.
I'm just not sure how many attention you pay to the quality of the product.

-- 
Best Regards,
Vladimir.
--

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] link_directories issue, cmake 2.8.5

2011-11-25 Thread Andreas Pakulat
On 25.11.11 15:06:02, Vladimir Chebotarev wrote:
> Hi, Michael.
> 
> On Fri, Nov 25, 2011 at 03:37:38AM +0100, Michael Hertling wrote:
> > On 11/23/2011 05:39 PM, Vladimir Chebotarev wrote:
> > > I've just found an issue with link_directories and cmake 2.8.5.
> > > If I give an absolute but not normalized path like
> > > c:/bla-bla-bla/../bla/bla as its argument (with default CMP0015),
> > > cmake thinks it is relative path and shows a warning about explicitly 
> > > undefined policy.
> > > Also it normalizes path making it relative and actually makes a mistake
> > > during that, so the final VC project can't find the path to library.
> > 
> > Take that path, use it to fully specify the library's location and
> > eliminate LINK_DIRECTORIES() from your project, cf. [1]. Then, if
> > things still don't work, report anew on the persisting problems.
> 
> Actually, I already have normalized the path by myself, using 
> get_filename_component,
> and everything is ok at the moment.
> Original message should have been treated as a bug report, however,

If you want to report a bug, report it on
http://public.kitware.com/Bug/my_view_page.php. 

> if you wish, I could make further investigations about link_directories.

The point that Michael tried to get across is that you avoid
link_directories as much as possible. It has various drawbacks as
explained in the link that Michael included.

Andreas

--

Powered by www.kitware.com

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

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

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


[CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Mathias Gaunard

There is some strange CMake behaviour I don't quite understand.

In the project attached, I build a shared library for which I want to 
specify a custom build command; to do this I generate a dummy library 
which I then replace by another file in a POST_BUILD command 
(alternatives involving imported libraries do not work properly across 
different scopes).


If I do not replace the library, then the executable correctly links 
against libtest.so.
If I do, it links instead with ../baz/libtest.so (sic), which of course, 
fails when trying to run the program.


Why is it putting a relative path into my executable? Why is it 
different depending on whether I replace the .so by another one or not?


Thank you very much for any insight on what's happening.


test.tar.gz
Description: GNU Zip compressed data
--

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] link_directories issue, cmake 2.8.5

2011-11-25 Thread Vladimir Chebotarev
Hi, Michael.

On Fri, Nov 25, 2011 at 03:37:38AM +0100, Michael Hertling wrote:
> On 11/23/2011 05:39 PM, Vladimir Chebotarev wrote:
> > I've just found an issue with link_directories and cmake 2.8.5.
> > If I give an absolute but not normalized path like
> > c:/bla-bla-bla/../bla/bla as its argument (with default CMP0015),
> > cmake thinks it is relative path and shows a warning about explicitly 
> > undefined policy.
> > Also it normalizes path making it relative and actually makes a mistake
> > during that, so the final VC project can't find the path to library.
> 
> Take that path, use it to fully specify the library's location and
> eliminate LINK_DIRECTORIES() from your project, cf. [1]. Then, if
> things still don't work, report anew on the persisting problems.

Actually, I already have normalized the path by myself, using 
get_filename_component,
and everything is ok at the moment.
Original message should have been treated as a bug report, however,
if you wish, I could make further investigations about link_directories.

-- 
Best Regards,
Vladimir.
--

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] Do not build/install import library

2011-11-25 Thread Matthias Gehre
2011/11/25 Michael Hertling :
> On 11/24/2011 07:53 PM, Mathias Gaunard wrote:
>> On 11/23/2011 10:14 PM, Matthias Gehre wrote:
>>> Hi,
>>>
>>> thanks for this very nice cmake. I switched just recently to get
>>> lightspark (lightspark.github.com)
>>> crossplatform, and it worked really smooth.
>>>
>>> One question, though: I cannot seem to find a way to _not_
>>> build/install the import libraries (foobar.dll.a) on win32.
>>> I do not need them, because I'm using MinGW's direct linking feature.
>>> All I found was ways to
>>> rename it, but not to keep it from building.
>>
>> Use the MODULE type of library
>
> CMake does not allow to link against a library of type MODULE.
>
> ATM, I don't know if one can prevent the import libraries from being
> built without modifying the platform files or rewriting the affected
> rule variables; it seems as if --out-implib is present anywhere. In
> order to prevent them from being installed, it should be sufficient
> to drop the ARCHIVE DESTINATION clause from the INSTALL() command
> for the concerned targets.
>

Thanks!
I'm now using the following snippet to install the *.so on linux and just the
dll on win32. Looks a bit hackish, though.

ADD_LIBRARY(spark SHARED ${LIBSPARK_SOURCES})
...
#We have to use LIBRARY on linux, but that installs the import library on win32
IF(WIN32)
  INSTALL(TARGETS spark RUNTIME DESTINATION ${PRIVATELIBDIR})
ELSE()
  INSTALL(TARGETS spark LIBRARY DESTINATION ${PRIVATELIBDIR})
ENDIF()
--

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] VS2005 and cmake

2011-11-25 Thread Tom Deblauwe

Hello,

Are you sure that is not some kind of extension or plugin that you are 
using?

I don't think you can reload all the projects at once in VS2005?
Best regards,
Tom,

Op 24/11/2011 18:01, Michael Jackson schreef:
That is odd. With the later versions of cmake and visual studio 2005 
pro you should be getting a single dialog asking if you want to reload 
all the projects. At least that is what I remember about VS2005 Pro. 
It certainly works that way for VS2008 Pro.


-
Mike Jackson www.bluequartz.net 

Sent from my mobile device. Please excuse the shortness of the reply.

On Nov 24, 2011, at 11:31, Tom Deblauwe > wrote:



Hello,

I'm using VS2005 PRO SP1 on windows 7.

Best regards
Tom,

Op 24/11/2011 15:58, Michael Jackson schreef:

What version of visual studio are you using? The paid for versions
should not have this problem.


-
Mike Jacksonwww.bluequartz.net
Principal Software engineermike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio

Sent from my mobile device. Please excuse the shortness of the reply.

On Nov 24, 2011, at 3:12, Tom Deblauwe  wrote:


Hello,

I was wondering about the best workflow for using cmake with visual studio. Now it is 
almost ok except for one thing: when you have your generated visual studio solution open 
and you change something in the cmakelists.txt file of one of your projects in your 
solution, then you get a "Reload" dialog for each project in your solution, 
because cmake regenerated every .vcproj file. Is there a workaround for this in any way?

Best regards,
Tom,
--

Powered bywww.kitware.com

Visit other Kitware open-source projects 
athttp://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


--
*Tom Deblauwe*
*R&D Engineer*

Traficon International N.V.
Vlamingstraat 19
B-8560 Wevelgem
Belgium
Tel.: +32 (0)56 37.22.00
Fax: +32 (0)56 37.21.96
URL: www.traficon.com 
--

Powered by www.kitware.com 

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


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


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


--
*Tom Deblauwe*
*R&D Engineer*

Traficon International N.V.
Vlamingstraat 19
B-8560 Wevelgem
Belgium
Tel.: +32 (0)56 37.22.00
Fax: +32 (0)56 37.21.96
URL: www.traficon.com 
--

Powered by www.kitware.com

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

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

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