-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cmake generation fails when cmakepp.cmake is placed in a read-only directory #97
Comments
Ok - actually behaves "correctly". # get temp dir which is needed by a couple of functions in cmakepp
set(cmakepp_tmp_dir "$ENV{TMP}")
if(NOT cmakepp_tmp_dir)
set(cmakepp_tmp_dir "${CMAKE_CURRENT_LIST_DIR}/tmp")
endif()
file(TO_CMAKE_PATH "${cmakepp_tmp_dir}" cmakepp_tmp_dir) |
But no per-user temp dir as on windos. But isn´t there a cmake variable/property for temp dir already? Edit Asked on [email protected], waiting for answer |
Answered on [email protected]:
|
That will not work because cmakepp is often executed in script mode. In script mode the CMAKE_BINARY_DIR is the pwd. that means whenever you start cmakepp it will create a temp folder at that location. Another reason to not put it in the binary dir is because cmakepp caches results heavily andif the temp dir changes the results would have to be regenerated which takes quite a while. Therefore the solution has to be a global directory which is the same for every cmakepp instance. (except if configured otherwise) is TMPDIR define on all unix platforms? |
According to http://en.wikipedia.org/wiki/TMPDIR I would say: yes. |
I added a better strategy for deriving the tmp dir . first try to use |
Please re-open. CMake Error at /usr/share/cmake/Modules/cmakepp.cmake:24868 (file): |
The next release will have the fix. Do you want me to amend the v0.1.0 alpha version or rather wait for a new release? |
Am Donnerstag, 19. M�rz 2015, 13:58:20 schrieb Tobias Becker:
I'll wait for the next release. Having rpms for cmakepp currently is a I opted to re-enable building the the docs run all tests while packaging, To trigger a package build upon the next release, I see three options:
If you choose otion 2, please send me a personal email, so I can create & sent Overall packaging status can be viewed at Cd wrttn wtht vwls s mch trsr. |
I installed cmakepp in the cmake modules dir
/usr/share/cmake/Modules/
, using the rpm under linux.That directory does not allow write access to normal users.
drwxr-xr-x 9 root root 15016 12. Mär 21:51 /usr/share/cmake/Modules/
If I add the line
include(cmakepp)
to my CMakeLists.txt, cmake properly finds cmakepp.
But I get lots errors when I let cmake generate the build scripts:
CMake Error at /usr/share/cmake/Modules/cmakepp.cmake:16892 (file):
file Internal CMake error when trying to open file:
/usr/share/cmake/Modules/tmp/file_make_temporary_LjZKhAz1k3.tmp for
writing.
Call Stack (most recent call first):
/usr/share/cmake/Modules/cmakepp.cmake:5441 (file_make_temporary)
/usr/share/cmake/Modules/cmakepp.cmake:15617 (eval)
/usr/share/cmake/Modules/cmakepp.cmake:14673 (string_semicolon_decode)
/usr/share/cmake/Modules/cmakepp.cmake:21917 (structured_list_parse)
/usr/share/cmake/Modules/cmakepp.cmake:33436 (config_setup)
CMakeLists.txt:35 (include)
Just for the records, not a showstopper for me.
The text was updated successfully, but these errors were encountered: