diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2014-01-16 15:43:29 +0100 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2014-01-16 15:43:29 +0100 |
commit | 3d6c77bf7f19f3543605d768314af9ede4aedbe9 (patch) | |
tree | 391d2ec89abfdd1f4be6af08b7a3365a693c03db /CMakeLists.txt | |
parent | c7ca708fd5f31dc9f0aa29f952f5fa4f2ea0afa9 (diff) | |
download | mariadb-git-3d6c77bf7f19f3543605d768314af9ede4aedbe9.tar.gz |
Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTION
Bug#68338 RFE: make tmpdir a build-time configurable option
Post-push fix: 'cmake -LH | grep TMP' showed TMPDIR as a BOOL option,
which was a bit confusing: show it as a PATH instead.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d47e04c61b1..0208022b6ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -329,14 +329,17 @@ IF(SYSCONFDIR) SET(DEFAULT_SYSCONFDIR "${SYSCONFDIR}") ENDIF() -OPTION(TMPDIR -"PATH to MySQL TMP dir. If unspecified, defaults to P_tmpdir in <stdio.h>" OFF) -IF(TMPDIR) - # Quote it, to make it a const char string. - SET(DEFAULT_TMPDIR "\"${TMPDIR}\"") -ELSE() - # Do not quote it, to refer to the P_tmpdir macro in <stdio.h>. - SET(DEFAULT_TMPDIR "P_tmpdir") +IF(UNIX) + SET(TMPDIR "P_tmpdir" + CACHE PATH + "PATH to MySQL TMP dir. Defaults to the P_tmpdir macro in <stdio.h>") + IF(TMPDIR STREQUAL "P_tmpdir") + # Do not quote it, to refer to the P_tmpdir macro. + SET(DEFAULT_TMPDIR "P_tmpdir") + ELSE() + # Quote it, to make it a const char string. + SET(DEFAULT_TMPDIR "\"${TMPDIR}\"") + ENDIF() ENDIF() # Run platform tests |