[CMake] find_path and double symbolic link

2019-09-14 Thread Kris Thielemans
Hi all I have a weird situation where find_file finds a file (which is a link to a link), but find_path sets an empty variable. find_path(CBLAS_INCLUDE_DIR cblas.h PATHS /usr/include /usr/local/include ) message(STATUS "KT CBLAS_INCLUDE_DIR ${CB

[CMake] cached variable for multiple files. Use FILEPATH ?

2019-06-23 Thread Kris Thielemans
Hi I need to store multiple libraries in one cached variable. Do I still give it type FILEPATH? Thanks Kris PS: In case you want to know why. We use a superbuild and need to pass the location of the external project's libraries to the dependent project. We currently do that via a non

Re: [CMake] using variables in ExternalProject_Add arguments

2019-06-22 Thread Kris Thielemans
DHDF5_ROOT:PATH=${HDF5_ROOT} -DHDF5_INCLUDE_DIRS:PATH=${HDF5_INCLUDE_DIRS} -DHDF5_FIND_DEBUG:BOOL=ON ) WRONG: set(PATCH_COMMAND "${GIT} apply ${PATCHFILE}") CORRECT: set(PATCH_COMMAND ${GIT} apply ${PATCHFILE}) Kris From: Kris Thielemans Sent: 21 June 2019 1

[CMake] using variables in ExternalProject_Add arguments

2019-06-21 Thread Kris Thielemans
Dear all We have a Superbuild https://github.com/CCPPETMR/SIRF-SuperBuild. I'm trying to introduce variables to reduce duplication. However, I'm getting weird errors. 2 examples below. Any ideas? (I'm running this on Windows 10 at present with CMake 3.13.2). Many thanks Kris 1. Us

Re: [CMake] ExternalProjectAdd and patch on Windows

2019-06-21 Thread Kris Thielemans
Thanks Cristian That works wonderfully! Kris From: Cristian Adam Sent: 20 June 2019 12:28 To: Kris Thielemans Cc: CMake Mail List Subject: Re: [CMake] ExternalProjectAdd and patch on Windows Hi, If the users have git installed, you could try find_program(git...), and then

[CMake] ExternalProjectAdd and patch on Windows

2019-06-20 Thread Kris Thielemans
Hi all I have a superbuild project where I need to patch a library (HDF5) after download. In Windows, there's no "patch" or "sed" command, and this has to run on other people's computer. I can almost achieve what I want in Powershell like so get-content ConfigureChecks.cmake | %{$_ -repla

Re: [CMake] dependencies on system include files

2018-12-18 Thread Kris Thielemans
Thanks David It seems that a rebuild is the only way. We’ll add that to our instructions then! Kris From: David Blaikie Sent: 17 December 2018 15:37 To: Kris Thielemans Cc: CMake Mail List Subject: Re: [CMake] dependencies on system include files If you're willing to

[CMake] dependencies on system include files

2018-12-16 Thread Kris Thielemans
Hi all I've just had a problem caused by an upgrade of my system files (in this particular case: boost). Rebuilding our software didn't correctly rebuild those files that depend on the updated boost files. (I'm using CMake 3.9 with make on Ubuntu 16.04) Checking a bit more carefully it appe

Re: [CMake] custom commands, targets and parallel builds

2018-11-25 Thread Kris Thielemans
> From: Alan W. Irwin, Sent: 25 November 2018 01:48 Many thanks Alan, answers and questions below > On 2018-11-25 00:23-0000 Kris Thielemans wrote: > > > I'm trying to add doxygen-generated comments to my Python module build > > via SWIG using https://github.com/m7th

[CMake] custom commands, targets and parallel builds

2018-11-24 Thread Kris Thielemans
Hi all I'm trying to add doxygen-generated comments to my Python module build via SWIG using https://github.com/m7thon/doxy2swig. This means I need to run doxygen first, then run doxy2swig, and only then run swig. However, I'm getting reports that parallel builds are failing (sometimes). My

Re: [CMake] How to get RPATH option (-Wl, -rpath, /path/to/local/lib) ?

2018-02-01 Thread Kris Thielemans
Hi There a wiki page covering this https://cmake.org/Wiki/CMake_RPATH_handling I find it a bit confusing (and the example code for the “full RPATH” option seems to set CMAKE_INSTALL_RPATH twice), but it should help. It might be outdated for OSX as El Capitan introduced extra security req

Re: [CMake] (no subject)

2018-01-31 Thread Kris Thielemans
You have to specify the full path to the locally installed cmake, or add its location to your PATH environment variables (before anything else) ATB Kris From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of kartikay gupta Sent: 31 January 2018 17:30 To: cmake@cmake.org Subject: [CMake] (

Re: [CMake] downloading ftp URL problems

2018-01-27 Thread Kris Thielemans
Thanks Cristian I'll look at curl. Https links work instantly but there isn't one for FFTW Kris On 27 Jan 2018 12:07, "Cristian Adam" wrote: > On Sat, Jan 27, 2018 at 12:12 PM, Kris Thielemans < > kris.f.thielem...@gmail.com> wrote: > >> Dear

Re: [CMake] downloading ftp URL problems

2018-01-27 Thread Kris Thielemans
Dear all I have had no response to this. The problem continues with CMake 3.10.2. I have no idea what causes this or how to fix it. Any help would be much appreciated. Kris From: Kris Thielemans Sent: 19 December 2017 08:15 To: cmake@cmake.org Subject: downloading ftp URL problems

Re: [CMake] Unexpected recompilation with ctest compiled MSVC project

2018-01-18 Thread Kris Thielemans
Hi Simon It definitely isn’t expected behaviour. MSVC should do exactly the same. It seems to point to a problem in your CMake files or elsewhere. Does the same thing happen if you just build immediately? Obviously, you shouldn’t do “rebuild” but just “build”. I haven’t checked RTK. Sor

Re: [CMake] how to add a test that calls ctest

2017-12-30 Thread Kris Thielemans
TESTS COMMAND ${CMAKE_CTEST_COMMAND} -C $ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SIRF-prefix/src/SIRF-build/) Best wishes Kris From: Kris Thielemans Sent: 23 December 2017 09:12 To: 'CMake Mail List' Subject: how to add a test that calls ctest H

[CMake] how to add a test that calls ctest

2017-12-23 Thread Kris Thielemans
/src/SIRF-build/) But this gives me errors like 1: 4: Test command: NOT_AVAILABLE 1: Test not available in configuration "$(Configuration)". Best wishes Kris Thielemans Reader in Medical Imaging Physics at University College London -- Powered by www.kitware.com Plea

Re: [CMake] ExternalProject_Add and Git Update? How do I make these work?

2017-12-23 Thread Kris Thielemans
Hi The strange thing here is Cannot rebase: You have unstaged changes. Please commit or stash them. No rebase in progress? Why would it be rebasing? Maybe a local config setting that a pull is always pull --rebase? In any case, my guess is that your discount/Source is in a funny state compare to

[CMake] downloading ftp URL problems

2017-12-19 Thread Kris Thielemans
just a loop with different sleep_seconds doing the following Set(url "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip";) execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep "${sleep_seconds}") file( DOWNLOAD "${url}" "C:/Users/krisf/Documents/d

[CMake] setting PYTHONPATH for test

2017-07-29 Thread Kris Thielemans
Hi I'm trying to add to the PYTHONPATH for a test that uses Python. I do that using set_test_properties. When using the makefile generator, I need to add ${CMAKE_CURRENT_BINARY_DIR}. However, for Visual Studio I also need to add for instance ${CMAKE_CURRENT_BINARY_DIR}/Release. My current CMak

Re: [CMake] avoiding finding system libraries (motivation is superbuilds)

2017-05-16 Thread Kris Thielemans
still finds a system boost or a gtest in /usr/local/lib. Are we doing anything wrong? Kris PS: apologies for the long delay in answering. On 5 May 2017 at 13:37, Robert Maynard wrote: > Have you tried using CMAKE_PREFIX_PATH instead of CMAKE_INSTALL_PREFIX? > > On Thu, May 4, 2017 at

[CMake] avoiding finding system libraries (motivation is superbuilds)

2017-05-04 Thread Kris Thielemans
Hi Short question: if we have a library/include files installed both in the usual system locations and outside, how do we force CMake to find the latter? (without modifying the CMake files of the project). Motivation: We're trying to make a SuperBuild that builds/downloads a specific versi

[CMake] dependency on external libraries (and Visual Studio)

2017-04-20 Thread Kris Thielemans
Hi I have a project with a shared library that depends on some external static libraries. Those are CMake imported targets. It appears that my shared library does not get rebuild when the external libraries are updated. (It would need to be relinked). Is this expected? A bit more info on my

Re: [CMake] installing source (or object) files

2017-01-19 Thread Kris Thielemans
not 100% happy with it. If anyone has a replacement for that, I'd be happy to know (but it's probably not for the CMake list). Hope this clarifies why I need to export registry.cxx (or its object file). Kris -Original Message- From: Michael Ellery Sent: 19 January 2017 16:0

Re: [CMake] installing source (or object) files

2017-01-18 Thread Kris Thielemans
ng the .cxx. It seems safer to export the object file as that is guaranteed to have been compiled with the correct flags, but I don't know how to do that. I hope my message below makes more sense now. Thanks Kris From: Kris Thielemans Sent: 27 December 2016 16:12 To: cmake@cmake.or

Re: [CMake] Install destination problem

2016-12-28 Thread Kris Thielemans
Hi My guess is that you have a local variable CMAKE_INSTALL_PREFIX being shadowed by the global variable. Best to add the CACHE keyword etc in your set statement, then there’ll be only 1 variable. Kris From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Chris Johnson Sent: 27 De

[CMake] installing source (or object) files

2016-12-27 Thread Kris Thielemans
Hi all I have a non-standard set-up where I have a library that needs to be linked together with some extra source files that contain "registries"). So in my CMakeLists.txt I use Add_executable(wonderful_program wonderful_program.cxx registry.cxx) target_link_libraries(wonderful_program my

Re: [CMake] problems with Visual Studio Express 2013 [SOLVED, I think]

2014-11-09 Thread Kris Thielemans
> From: Kris Thielemans > Sent: 05 March 2014 11:28 > > Hi all > > We're trying to build an application using ITK on Windows using Visual Studio > Express 2013 (downloads of all software happened last week, so I guess > we're up-to-date). Unfortunately, we

Re: [CMake] problems with Visual Studio Express 2013

2014-04-04 Thread Kris Thielemans
From: Brad King, Sent: 10 March 2014 13:00 > > On 03/10/2014 05:36 AM, Kris Thielemans wrote: > > Attached are these 2 log files. They seem conflicting to me: the > > CMakeOutput.log seems to say everything is fine, while the CMakeError.log > > says that the executable c

[CMake] problems with Visual Studio Express 2013

2014-03-05 Thread Kris Thielemans
Hi all We're trying to build an application using ITK on Windows using Visual Studio Express 2013 (downloads of all software happened last week, so I guess we're up-to-date). Unfortunately, we get a lot of configuration errors (see full list below), implying that CMake 2.8.12.2 has problems with t

[CMake] SWIG_ADD_MODULE and other files on mingw

2012-10-28 Thread Kris Thielemans
Hi I'm using cmake to call swig to generate my a python interface to my C++ library. I crafted the following CMakeLists.txt from the FAQ: FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) FIND_PACKAGE(PythonLibs) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) SET_SOURCE_FILES_PROPERTIES(stir.i P

Re: [CMake] add_executable and extension of source file

2012-02-27 Thread Kris Thielemans
ments are below > -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On > Behalf Of Michael Hertling > Sent: 24 February 2012 22:15 > To: cmake@cmake.org > Subject: Re: [CMake] add_executable and extension of source file > > On 02/24/2

Re: [CMake] Can't generate Release build in Visual Studio 9

2012-02-24 Thread Kris Thielemans
Hi Mauricio The SLN solution contains all possible build-types. The user just have to select which one they want (i.e. in Visual Studio, not cmake) Kris > -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On > Behalf Of Mauricio Klein > Sent: 24 February

[CMake] add_executable and extension of source file

2012-02-24 Thread Kris Thielemans
Hi I have a project where I have C++ and C source files. I'm adding executables for this (via macros) like this foreach(executable ${SOURCES}) add_executable(${executable} ${executable} ) target_link_libraries(${executable} ${STIR_LIBRARIES}) endforeach() where ${SOURCES} is a list of sour