[CMake] check_cxx_compiler_flag fails silently for complex compiler paths

2016-02-25 Thread Andrew Hundt
I believe check_cxx_compiler_flags is failing due to a long/complicated compiler path. Specifically my compiler is set to: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ CMake version: 3.4.3 Full trace output in gist where you can see lines warning of

Re: [CMake] ExternalProject_Add with flexible install commands

2016-02-25 Thread Knox, Kent
I don't need to use indirection, but the reason I decided to try was to simplify my code. I could either wrap the ExternalProject_Add() call in a branch/switch or a single set() call. I am using your 'hack' thusly: set( libxxx_inst_comm INSTALL_COMMAND ${CMAKE_COMMAND} -E echo_append ) and i

Re: [CMake] ExternalProject_Add with flexible install commands

2016-02-25 Thread David Cole via CMake
Do you need to do it indirectly through a variable like this? If you just use: INSTALL_COMMAND "" directly in the ExternalProject_Add call, it will work. If you really need to do it indirectly, there's probably a way, but it will also probably be more confusing for people reading the code in t

Re: [CMake] ExternalProject_Add with flexible install commands

2016-02-25 Thread Knox, Kent
Hi Petr~ Thanks for your reply. These set statements do not appear to work. Either the command 'installs' the dependency, or an error pops up. set( rocblas_INSTALL_COMMAND INSTALL_COMMAND "" ) --> this installs the dependency set( rocblas_INSTALL_COMMAND INSTALL_COMMAND " " ) --> /bin/sh: 1

Re: [CMake] cmake documentation incomplete

2016-02-25 Thread Nicholas Braden
I don't know about -B, but you can take advantage of the tool mode like this: cmake -E chdir path/to/build cmake [options] path/to/source Effectively you can use the chdir tool to spawn CMake with the working directory you want it to have. On Thu, Feb 25, 2016 at 9:37 AM, Vania Joloboff wrote:

Re: [CMake] cmake documentation incomplete

2016-02-25 Thread Vania Joloboff
Thanks Nicholas, Then if I run cmake from a shell script in working directory pwd (and I do not want to cd) can I tell cmake the first time to take the source in path-to-source and do the build in path-to-build ? I have read there is an undocumented option -B to do this ? Vania On 02/25/2016

Re: [CMake] cmake documentation incomplete

2016-02-25 Thread Nicholas Braden
Yes, an existing build saves all the information it needs in the build cache. Once you have created a build, you never need to specify the source directory again. On Thu, Feb 25, 2016 at 9:13 AM, Vania Joloboff wrote: > Hi, > > The cmake documentation says there are two alternatives > to start cm

Re: [CMake] cmake documentation incomplete

2016-02-25 Thread Vania Joloboff
Hi, The cmake documentation says there are two alternatives to start cmake cmake [] ( | ) But it does not explain nowhere the difference between the two... Does the path-to-existing-build retrieve itself the source dir and start like if it were invoked with path-to-source from path-to-existing-

[CMake] file(SHA1) vs string(SHA1) consistency

2016-02-25 Thread Ruslan Baratov via CMake
Hi, Following code produce same SHA1 on Linux: cmake_minimum_required(VERSION 3.0) set(test_string "a\nb") set(test_file "test.file") string(SHA1 sha1_string "${test_string}") file(WRITE "${test_file}" "${test_string}") file(SHA1 "${test_file}" sha1_file) message("sha1:"

Re: [CMake] ExternalProject_Add with flexible install commands

2016-02-25 Thread Petr Kmoch
Hi Kent, I believe it's not "empty quotes" that disables the install command, it's the empty string. So you should not escape the quotes: ### # Default behavior is to NOT install library, empty quotes should disable install set( libxxx_inst_comm INSTALL_COMMAND "" ) # Build t

[CMake] ExternalProject_Add with flexible install commands

2016-02-25 Thread Knox, Kent
I am having a problem passing parameters as a variable into ExternalProject_Add(). I seem to be fighting syntax, i've tried many different variants with the set() statement ### # Default behavior is to NOT install library, empty quotes should disable install set( libxxx_in