[CMake] FILE(LOCK ... GUARD FILE) fails with cmake -P
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 LockFileScope, file /wrkdirs/usr/ports/devel/cmake/work/cmake-3.5.0/Source/cmFileLockPool.cxx, line 76. Abort trap (core dumped) $ cmake -P y.cmake Assertion failed: (!this->FileScopes.empty()), function LockFileScope, file /wrkdirs/usr/ports/devel/cmake/work/cmake-3.5.0/Source/cmFileLockPool.cxx, line 76. Abort trap (core dumped) I've tested this with different base systems and CMake versions from 3.4.1 to 3.7.2 with similar results (doesn't matter if I lock a file instead either). It's easy to work around (wrap code with function) but a bit inelegant. I understand there may be some limitation but there could at least be some sensible error message like with 'GUARD FUNCTION' when it's not used in a function definition... Best regards, -- DoubleF -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Emacs cmake-mode indentation flaw
Hi Chuck, Frank, > On Fri, Jun 2, 2017 at 1:57 AM, Frank Rolandwrote: >> 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 of different ways that people format multi-line function calls so no one way is right or wrong. That's true and I know much CMake code is written in the style which matches the current cmake-mode behaviour, but it would be awesome if it could be configurable; I'd certainly be willing to help test/debug this (my preferences match Frank's). Best regards, -- DoubleF -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Multiple ELSE() clauses
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 the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Multiple ELSE() clauses
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: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] cmake -DX=Y -P : problem unsetting variables defined on command line
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.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] cmake -DX=Y -P : problem unsetting variables defined on command line
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(X) MESSAGE("X=${X}") This, too, gives "X=Y": UNSET(X) MESSAGE("X=${X}") This one finally gives "X=" (which I would have expected in the first place): SET(X "") MESSAGE("X=${X}") Is this OK? Is this documented anywhere? Best regards, -- DoubleF -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] file(SHA1) vs string(SHA1) consistency
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 have to reimplement 'cat' for each platform... Best regards, -- DoubleF -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] [nitpick] Incorrect FILE(COPY) error message
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 happens with at least CMake 3.0.1 and 3.4.1. Best regards, -- DoubleF P.S. I gave up on the FILE(UPLOAD) custom TLS certificate issue I reported previously. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Fwd: FILE(UPLOAD) doesn't seem to respect custom CA settings while DOWNLOAD does
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 succeeds. However, it doesn't seem to work with UPLOAD (note CAfile is 'none'): successfully set certificate verify locations: CAfile: none CApath: /etc/ssl/certs SSLv3, TLS handshake, Client hello (1): [512 bytes data] SSLv3, TLS handshake, Server hello (2): [66 bytes data] SSLv3, TLS handshake, CERT (11): [5986 bytes data] SSLv3, TLS alert, Server hello (2): [2 bytes data] SSL certificate problem: self signed certificate in certificate chain Neither setting CMAKE_TLS_CAINFO to point to the certificate, nor adding a TLS_CAINFO argument work. Is there anything I'm missing? I'm using CMake version 3.4.1. Best regards, -- DoubleF -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake