Skip to content

Commit

Permalink
Fix CMake's temporary path
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Mar 18, 2023
1 parent 9a48b2c commit 50c4002
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMake/cmake_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#cmakedefine01 FLINT_USES_FENV

#define FLINT_TMPPATH "@FLINT_TMPPATH@"

#ifdef _MSC_VER
#define access _access
#define strcasecmp _stricmp
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(FLINT_WANT_ASSERT ON)
endif()

# temporary directory
if(NOT DEFINED TMPPATH)
set(FLINT_TMPPATH "/tmp" CACHE STRING "Path to a directory meant for temporary files for host system (NOTE: Will probably become redundant in the future). Only relevant if host do not have read and write access to /tmp [default=/tmp].")
else()
set(FLINT_TMPPATH "${TMPPATH}" CACHE STRING "Path to a directory meant for temporary files for host system (NOTE: Will probably become redundant in the future). Only relevant if host do not have read and write access to /tmp [default=/tmp].")
endif()

# pthread configuration

if(MSVC)
Expand Down

0 comments on commit 50c4002

Please sign in to comment.