summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Help/prop_test/TIMEOUT.rst2
-rw-r--r--Modules/FindCoin3D.cmake3
-rw-r--r--Source/CMakeLists.txt1
-rw-r--r--Source/CPack/cpack.cxx2
-rw-r--r--Source/CursesDialog/ccmake.cxx3
-rw-r--r--Source/cmArchiveWrite.cxx4
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmLocale.h31
-rw-r--r--Source/cmSystemTools.cxx3
-rw-r--r--Source/cmakemain.cxx2
-rw-r--r--Source/ctest.cxx3
-rw-r--r--Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in2
-rwxr-xr-xbootstrap8
13 files changed, 50 insertions, 16 deletions
diff --git a/Help/prop_test/TIMEOUT.rst b/Help/prop_test/TIMEOUT.rst
index 0b247b8601..d1cb90d0ac 100644
--- a/Help/prop_test/TIMEOUT.rst
+++ b/Help/prop_test/TIMEOUT.rst
@@ -6,4 +6,4 @@ How many seconds to allow for this test.
This property if set will limit a test to not take more than the
specified number of seconds to run. If it exceeds that the test
process will be killed and ctest will move to the next test. This
-setting takes precedence over CTEST_TESTING_TIMEOUT.
+setting takes precedence over :variable:`CTEST_TEST_TIMEOUT`.
diff --git a/Modules/FindCoin3D.cmake b/Modules/FindCoin3D.cmake
index b5c3a96791..f90860c812 100644
--- a/Modules/FindCoin3D.cmake
+++ b/Modules/FindCoin3D.cmake
@@ -5,8 +5,7 @@
# Find Coin3D (Open Inventor)
#
# Coin3D is an implementation of the Open Inventor API. It provides
-# data structures and algorithms for 3D visualization
-# http://www.coin3d.org/
+# data structures and algorithms for 3D visualization.
#
# This module defines the following variables
#
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 07839f3422..8a83c3e3dd 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -277,6 +277,7 @@ set(SRCS
cmLocalGenerator.cxx
cmLocalGenerator.h
cmLocalUnixMakefileGenerator3.cxx
+ cmLocale.h
${MACH_SRCS}
cmMakeDepend.cxx
cmMakeDepend.h
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 00bfe5be46..6106472f19 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -26,7 +26,6 @@
#include <cmsys/CommandLineArguments.hxx>
#include <cmsys/SystemTools.hxx>
#include <cmsys/Encoding.hxx>
-#include <locale.h>
//----------------------------------------------------------------------------
static const char * cmDocumentationName[][2] =
@@ -101,7 +100,6 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
// this is CPack.
int main (int argc, char const* const* argv)
{
- setlocale(LC_CTYPE, "");
cmsys::Encoding::CommandLineArguments args =
cmsys::Encoding::CommandLineArguments::Main(argc, argv);
argc = args.argc();
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 28f3d9b787..3d92a2dfd6 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -16,7 +16,6 @@
#include <signal.h>
#include <sys/ioctl.h>
-#include <locale.h>
#include "cmCursesMainForm.h"
#include "cmCursesStandardIncludes.h"
@@ -95,8 +94,6 @@ void CMakeMessageHandler(const char* message, const char* title, bool&,
int main(int argc, char const* const* argv)
{
- setlocale(LC_CTYPE, "");
-
cmsys::Encoding::CommandLineArguments encoding_args =
cmsys::Encoding::CommandLineArguments::Main(argc, argv);
argc = encoding_args.argc();
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index c24c68e4de..cf2fe82ee8 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -12,6 +12,7 @@
#include "cmArchiveWrite.h"
#include "cmSystemTools.h"
+#include "cmLocale.h"
#include <cmsys/ios/iostream>
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
@@ -260,6 +261,9 @@ bool cmArchiveWrite::AddFile(const char* file,
}
const char* out = file + skip;
+ cmLocaleRAII localeRAII;
+ static_cast<void>(localeRAII);
+
// Meta-data.
std::string dest = prefix? prefix : "";
dest += out;
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index fbf2140369..dfa6cc9d10 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1132,7 +1132,7 @@ cmLocalUnixMakefileGenerator3
if(echo_comment)
{
const char* comment = ccg.GetComment();
- if(comment && !*comment)
+ if(comment && *comment)
{
this->AppendEcho(commands, comment,
cmLocalUnixMakefileGenerator3::EchoGenerate);
diff --git a/Source/cmLocale.h b/Source/cmLocale.h
new file mode 100644
index 0000000000..727f0f5d40
--- /dev/null
+++ b/Source/cmLocale.h
@@ -0,0 +1,31 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2015 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmLocale_h
+#define cmLocale_h
+
+#include <locale.h>
+
+class cmLocaleRAII
+{
+ const char* OldLocale;
+public:
+ cmLocaleRAII(): OldLocale(setlocale(LC_CTYPE, 0))
+ {
+ setlocale(LC_CTYPE, "");
+ }
+ ~cmLocaleRAII()
+ {
+ setlocale(LC_CTYPE, this->OldLocale);
+ }
+};
+
+#endif
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index e9735ed410..6a7467f34f 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -26,6 +26,7 @@
#include <cmsys/Encoding.hxx>
#if defined(CMAKE_BUILD_WITH_CMAKE)
# include "cmArchiveWrite.h"
+# include "cmLocale.h"
# include <cm_libarchive.h>
# include <cmsys/Terminal.h>
#endif
@@ -1690,6 +1691,8 @@ long copy_data(struct archive *ar, struct archive *aw)
bool extract_tar(const char* outFileName, bool verbose,
bool extract)
{
+ cmLocaleRAII localeRAII;
+ static_cast<void>(localeRAII);
struct archive* a = archive_read_new();
struct archive *ext = archive_write_disk_new();
archive_read_support_compression_all(a);
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 6d25b70385..e0bd55bb28 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -25,7 +25,6 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include <cmsys/Encoding.hxx>
-#include <locale.h>
#ifdef CMAKE_BUILD_WITH_CMAKE
//----------------------------------------------------------------------------
@@ -173,7 +172,6 @@ static void cmakemainProgressCallback(const char *m, float prog,
int main(int ac, char const* const* av)
{
- setlocale(LC_CTYPE, "");
cmsys::Encoding::CommandLineArguments args =
cmsys::Encoding::CommandLineArguments::Main(ac, av);
ac = args.argc();
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index b77c231ca9..c0eb8acc65 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -19,7 +19,6 @@
#include "CTest/cmCTestScriptHandler.h"
#include "CTest/cmCTestLaunch.h"
#include "cmsys/Encoding.hxx"
-#include <locale.h>
//----------------------------------------------------------------------------
static const char * cmDocumentationName[][2] =
@@ -117,8 +116,6 @@ static const char * cmDocumentationOptions[][2] =
// this is a test driver program for cmCTest.
int main (int argc, char const* const* argv)
{
- setlocale(LC_CTYPE, "");
-
cmsys::Encoding::CommandLineArguments encoding_args =
cmsys::Encoding::CommandLineArguments::Main(argc, argv);
argc = encoding_args.argc();
diff --git a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
index 43c0ba7a1a..c018e0862b 100644
--- a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
+++ b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
@@ -1,14 +1,12 @@
#include <cmSystemTools.h>
#include <cmsys/Encoding.hxx>
#include <string>
-#include <locale.h>
#define RETVAL @_retval@
int
main(int ac, char **av)
{
- setlocale(LC_CTYPE, "");
cmsys::Encoding::CommandLineArguments args =
cmsys::Encoding::CommandLineArguments::Main(ac, av);
int argc = args.argc();
diff --git a/bootstrap b/bootstrap
index a88eb6a1c0..e7d0496d2c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -72,6 +72,7 @@ cmake_bootstrap_qt_gui=""
cmake_bootstrap_qt_qmake=""
cmake_sphinx_man=""
cmake_sphinx_html=""
+cmake_sphinx_qthelp=""
cmake_sphinx_build=""
# Determine whether this is a Cygwin environment.
@@ -410,6 +411,7 @@ Configuration:
--sphinx-man build man pages with Sphinx
--sphinx-html build html help with Sphinx
+ --sphinx-qthelp build qch help with Sphinx
--sphinx-build=<sb> use <sb> as the sphinx-build executable
Directory and file names:
@@ -646,6 +648,7 @@ while test $# != 0; do
--qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;;
--sphinx-man) cmake_sphinx_man="1" ;;
--sphinx-html) cmake_sphinx_html="1" ;;
+ --sphinx-qthelp) cmake_sphinx_qthelp="1" ;;
--sphinx-build=*) cmake_sphinx_build=`cmake_arg "$1"` ;;
--help) cmake_usage ;;
--version) cmake_version_display ; exit 2 ;;
@@ -1661,6 +1664,11 @@ if [ "x${cmake_sphinx_html}" != "x" ]; then
set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE FILEPATH "Build html help with Sphinx" FORCE)
' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
fi
+if [ "x${cmake_sphinx_qthelp}" != "x" ]; then
+ echo '
+set (SPHINX_QTHELP "'"${cmake_sphinx_qthelp}"'" CACHE FILEPATH "Build qch help with Sphinx" FORCE)
+' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
+fi
if [ "x${cmake_sphinx_build}" != "x" ]; then
echo '
set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE)