[CMake] FILE(LOCK ... GUARD FILE) fails with cmake -P

2017-06-22 Thread Sergey Zakharchenko
Hello, CMake crashes on an assertion when I use FILE(LOCK ... GUARD FILE) inside of a file called (directly or indirectly) from cmake -P. $ cat x.cmake FILE(LOCK . DIRECTORY GUARD FILE) $ cat y.cmake INCLUDE(x.cmake) $ cmake -P x.cmake Assertion failed: (!this->FileScopes.empty()), function Lo

Re: [CMake] Emacs cmake-mode indentation flaw

2017-06-03 Thread Sergey Zakharchenko
Hi Chuck, Frank, > On Fri, Jun 2, 2017 at 1:57 AM, Frank Roland wrote: >> I indents the closing paren would expect it to be indented like this: >> foo( >>bar >>) >> I would expect the single closing paren to be not indendet. > It's really a matter of personal style. There's a multitude o

Re: [CMake] Multiple ELSE() clauses

2017-03-20 Thread Sergey Zakharchenko
Rolf, 2017-03-20 14:06 GMT+03:00 Rolf Eike Beer : > https://gitlab.kitware.com/cmake/cmake/issues/14335 Since the issue is marked "easy" and it's over 3 years old, I assume nobody cares? OK then. Best regards, -- DoubleF -- Powered by www.kitware.com Please keep messages on-topic and check

[CMake] Multiple ELSE() clauses

2017-03-20 Thread Sergey Zakharchenko
Hello, I've just noticed that CMake doesn't forbid multiple ELSE() (not just ELSEIF()) clauses, and proceeds without warnings. IF(1) ELSE() ELSE() ENDIF() Is this expected? Best regards, -- DoubleF -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: htt

Re: [CMake] cmake -DX=Y -P : problem unsetting variables defined on command line

2017-02-09 Thread Sergey Zakharchenko
Hello Nils, >> cmake -DX=Y -P x.cmake > > > The above sets the *cache* variable X. OK, I didn't think that really applied as the script is executed standalone, so there's no cache in the regular sense of the word. Thanks for the explanation. Best regards, -- DoubleF -- Powered by www.kitware

[CMake] cmake -DX=Y -P : problem unsetting variables defined on command line

2017-02-09 Thread Sergey Zakharchenko
Hello list, I've been using CMake for quite some time and have only now found out this disturbing difference between SET(X) and SET(X ""). It happens in cmake -P mode when you try to unset variables which are defined on the command line, e.g. cmake -DX=Y -P x.cmake This x.cmake gives "X=Y": SET

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

2016-02-26 Thread Sergey Zakharchenko
Hello, 2016-02-25 17:58 GMT+03:00 Ruslan Baratov via CMake : > * since CMake is a cross-platform tool I think it make sense that command > `file(WRITE "..." "a\nb")` produce identical files on all platforms Seconded; READ and WRITE could at least have a BINARY flag that does it so that I don't ha

[CMake] [nitpick] Incorrect FILE(COPY) error message

2016-02-09 Thread Sergey Zakharchenko
Hello, The FILE(COPY) command displays an incorrect error message when its argyument is empty: $ cat >x.cmake FILE(COPY "" DESTINATION ".") $ cmake -P x.cmake CMake Error at x.cmake:1 (FILE): file INSTALL encountered an empty string input file name. INSTALL should obviously be COPY. This happ

[CMake] Fwd: FILE(UPLOAD) doesn't seem to respect custom CA settings while DOWNLOAD does

2016-01-14 Thread Sergey Zakharchenko
Hello, I'm trying to get CMake to talk to an SSL server using a self-signed certificate. It works just fine with downloads. The certificate path appears in the LOG: successfully set certificate verify locations: CAfile: /path/to/my/certificate.pem CApath: /etc/ssl/certs and the TLS handshake