Re: [CMake] Putting the git commit hash in a cmake variable

2018-10-10 Thread Isaiah Norton
Similar question with some suggestions in response: https://cmake.org/pipermail/cmake/2018-July/067887.html Best, Isaiah On Wed, Oct 10, 2018 at 5:05 PM Matt Schulte wrote: > Hi all, > > I'd like to set a CMake variable to the current git commit short hash. > This variable will be used as part

Re: [CMake] ExternalProject, continuous integration and caching builds

2018-09-05 Thread Isaiah Norton
> > CMake notices the downloaded tarball is up-to-date and > doesn't download it again, but it still extracts it again >From what I can tell, the 'check|download tarball' and 'extract tarball' commands are independent parts of the "download step": as long as the download step runs at all, it will

Re: [CMake] Linker and archiver options

2018-08-14 Thread Isaiah Norton
> > This seems like something that would be best-suited for a toolchain file > Is a toolchain file not equivalent to the corresponding list of '-D' initializers? (aside from convenience) On Tue, Aug 14, 2018 at 1:34 PM Michael Ellery wrote: > This seems like something that would be best-suited

Re: [CMake] Issues trying to use the Anaconda compiler tools with CMake

2018-08-13 Thread Isaiah Norton
conda recipes explicitly define INSTALL_RPATH, likely for this reason: https://github.com/AnacondaRecipes/vtk-feedstock/blob/791a1db9026fa2c81d171c38835b512adf221794/recipe/build.sh#L30 On Mon, Aug 13, 2018 at 11:54 AM Isaiah Norton wrote: > The RPATH is not included when using Anaconda beca

Re: [CMake] Issues trying to use the Anaconda compiler tools with CMake

2018-08-13 Thread Isaiah Norton
The RPATH is not included when using Anaconda because CMake considers the Anaconda lib path to be an implicit link directory (as reported by the compiler). Look at `$build_dir/CMakeFiles/CMakeOutput.log` in the section about "implicit link info". The simplest work-around is to set BUILD_RPATH manu

Re: [CMake] Parallel builds and auto generated header files

2018-07-24 Thread Isaiah Norton
I use essentially the technique in the answer below, except with `add_custom_target` instead of `add_custom_command`, so that the hash-generation is always run regardless of whether the temp file is successfully deleted: https://stackoverflow.com/a/41750028/508431 I also use a dummy `add_custom_c

Re: [CMake] CMake triggers Windows Defender

2018-07-05 Thread Isaiah Norton
I don't know what the turn-around time is, but you and others might consider submitting the exe as a false positive: https://www.microsoft.com/en-us/wdsi/filesubmission (If you are blocked by this issue, try adding an exclusion rule: https://support.microsoft.com/en-au/help/4028485/windows-10-add

Re: [CMake] compiling for both python2 and python3

2018-06-22 Thread Isaiah Norton
On Fri, Jun 22, 2018 at 4:36 AM Alexander Bürger wrote: > Hi, > > I am trying to find a good way to compile a python module for a c++ > library using boost-python for both python2 and python3 in the same > compilation. So far, The only solution I found for using > The headers CMake needs to find

Re: [CMake] [cmake-developers] Performance profiling for CMake scripts?

2018-06-20 Thread Isaiah Norton
I've used the following a few times recently to get a sense of hotspots: https://gist.github.com/ihnorton/05f1dea38e596e75ba106855d490e66a On Wed, Jun 20, 2018 at 10:17 AM Robert Dailey wrote: > I set my minimum required version to 3.6, which should enable those > policies by default (if they'r

Re: [CMake] Memory usage and configuration time for large project

2018-05-04 Thread Isaiah Norton
As one ballpark datapoint: a "superbuild" of 3D Slicer (slicer.org) has a similar object and library count: macbook-pro:s5nj inorton$ find ./ -name *.o | wc -l >14127 macbook-pro:s5nj inorton$ find ./ -name *.dylib -or -name *.so | wc -l > 2158 Based on a few quick tests, the aggregate

Re: [CMake] Cache variables from module

2018-05-03 Thread Isaiah Norton
> > Perhaps a newer cmake version will give an error. > Just tested with 3.11 -- sadly not. But the suggested fix does work. On Thu, May 3, 2018 at 10:39 AM, Isaiah Norton wrote: > PARENT_SCOPE and CACHE can't be used in the same call, presumably because > cache is glob

Re: [CMake] Cache variables from module

2018-05-03 Thread Isaiah Norton
PARENT_SCOPE and CACHE can't be used in the same call, presumably because cache is global. So cmake doesn't recognize those arguments, and instead sets the variable PETSC_VERSION to a list containing all the following arguments except PARENT_SCOPE (which does still apply). Perhaps a newer cmake ver

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

2018-03-30 Thread Isaiah Norton
> > A "CMAKE_JOB_POOLS" variable was added specify a value to use for > the "JOB_POOLS" property. This enables control over build > parallelism with command line configuration parameters when using > the Ninja generator. > Does this work with ExternalProject sub-builds? If not, I would sugge

Re: [CMake] Semicolons in windows path list for ExternalProject_Add or ExP_Add_Step

2012-02-16 Thread Isaiah Norton
ot;) message("libpath: ${libpath}") ExternalProject_Add( "hello_world" URL "C:/temp" LIST_SEPARATOR ^^ BUILD_COMMAND ${CMAKE_BUILD_TOOL} /p:VCBuildAdditionalLinkLibraryPaths="${libpath}" ) """ On Wed, Feb 15, 2012 at 4:02 PM, Isaiah

[CMake] Semicolons in windows path list for ExternalProject_Add or ExP_Add_Step

2012-02-15 Thread Isaiah Norton
Hi, Apologies in advance if I missed/misread something in the FAQ and the email threads I've found so far about semicolons. I am using Windows 7 64-bit, CMake 2.8.7, and "Visual Studio 10 Win64" generator with msbuild, VC++ Express 2010, Windows SDK7.1. I need to pass a windows-style path list th