Skip to content

Commit

Permalink
cmake: put virtualenv directories under TMPDIR
Browse files Browse the repository at this point in the history
this was required for cmake-check to find ceph-disk and ceph-detect-init
in the PATH

Signed-off-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley committed Apr 29, 2016
1 parent 6cb1ff4 commit 1342ea8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@ install(TARGETS rados librados-config DESTINATION bin)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/
DESTINATION ${PYTHON_INSTDIR})

# virtualenv base directory for ceph-disk and ceph-detect-init
set(CEPH_BUILD_VIRTUALENV $ENV{TMPDIR})
if(NOT CEPH_BUILD_VIRTUALENV)
set(CEPH_BUILD_VIRTUALENV /tmp)
endif()

add_subdirectory(pybind)
add_subdirectory(ceph-disk)
add_subdirectory(ceph-detect-init)
Expand Down
2 changes: 1 addition & 1 deletion src/ceph-detect-init/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(CEPH_DETECT_INIT_VIRTUALENV ${CMAKE_BINARY_DIR}/ceph-detect-init-virtualenv)
set(CEPH_DETECT_INIT_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv)

add_custom_target(ceph-detect-init
COMMAND
Expand Down
2 changes: 1 addition & 1 deletion src/ceph-disk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(CEPH_DISK_VIRTUALENV ${CMAKE_BINARY_DIR}/ceph-disk-virtualenv)
set(CEPH_DISK_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv)

add_custom_target(ceph-disk
COMMAND
Expand Down

0 comments on commit 1342ea8

Please sign in to comment.