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

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

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

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

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:

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

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

Re: [cmake-developers] [CMake] 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

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 <isaiah.nor...@gmail.com> wrote: > PARENT_SCOPE and CACHE can't be used in the same call, presumab

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

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

[cmake-developers] PSA: VS2017 borks CMake + existing VS2015 install

2018-02-18 Thread Isaiah Norton
After installing Visual Studio 2017 (Community, in my case), the following SDK reinstall step is apparently necessary to build with the VS2015 toolchain from CMake: https://stackoverflow.com/a/45319119/508431 (to re-run the installer, go to Programs and Features, double-click Visual Studio

Re: [cmake-developers] Server handshake with only build directory

2018-01-24 Thread Isaiah Norton
;rchi...@microsoft.com> > wrote: > > Tobias, can you make sure it still supports passing the source directory > > too? > > > > > > > > Otherwise we’ll have to have version dependent arguments that we pass to > > CMake server. > > > &

Re: [cmake-developers] Server handshake with only build directory

2018-01-23 Thread Isaiah Norton
> > > Any objections from the core team about enabling server-mode with a > > build directory only? I can send in a patch, it is simple to add this. > > Fine with me. > Awesome, thanks. Please cc me (@ihnorton). Isaiah On Tue, Jan 23, 2018 at 6:40 AM, Brad King wrote: >

Re: [cmake-developers] Server handshake with only build directory

2018-01-22 Thread Isaiah Norton
pers-boun...@cmake.org] *On > Behalf Of *Isaiah Norton > *Sent:* Monday, January 22, 2018 8:43 AM > *To:* Tobias Hunger <tobias.hun...@gmail.com> > *Cc:* CMake Developers <cmake-developers@cmake.org> > *Subject:* Re: [cmake-developers] Server handshake with only build > d

Re: [cmake-developers] Server handshake with only build directory

2018-01-22 Thread Isaiah Norton
gs > being used and to make it very explicit what is going to be used. > > Best Regards, > Tobias > > On Mon, Jan 22, 2018 at 4:54 PM, Isaiah Norton <isaiah.nor...@gmail.com> > wrote: > > I'd like to use cmake server with only a build directory argument > (mostly in

[cmake-developers] Server handshake with only build directory

2018-01-22 Thread Isaiah Norton
I'd like to use cmake server with only a build directory argument (mostly in order to query the cache), but receive an error in return: ``` > cmake --version cmake version 3.9.4 > cmake -E server --experimental --debug > [== "CMake Server" ==[ >

[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