Commit Graph

14 Commits

Author SHA1 Message Date
Stephen Kelly af8a1643c1 Remove c_str calls when using stream APIs.
Use an ad-hoc clang tool for matching the calls which should be
ported.
2014-03-11 15:03:50 +01:00
Stephen Kelly 21c573f682 Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
2014-03-11 15:03:50 +01:00
Ben Boeckel 84fdc9921c stringapi: Pass configuration names as strings 2014-03-08 13:05:36 -05:00
Ben Boeckel 270eb96df0 strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.

The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
2014-03-08 13:05:35 -05:00
Brad King 94389f6388 cmake: Add '-E sleep' command
Add a cmake command-line interface to provide a cross-platform 'sleep'.
2014-01-21 13:50:49 -05:00
Brad King e0228e2b04 cmake: Improve '-E create_symlink' edge case handling (#14713)
The logic added by commit ffc0b5e4 (Overwrite the symlink if it already
exists, 2007-02-15) does not recognize and remove existing broken links
before replacing them.  Improve the logic to remove any existing
destination file or link (but not directory).  On failure, report an
error message explaining why the existing path could not be removed or
the new one could not be created.

Add a RunCMake.CommandLine test to cover 'cmake -E' cases.  Start with
test cases covering 'cmake -E create_symlink' behavior on UNIX platforms.
2014-01-20 14:02:21 -05:00
Clinton Stimpson 5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -05:00
Flynn Marquardt d384b5aa7b cmake: Fix mt return value when hosted on posix (#14605)
On posix platforms return values are limited to a range from 0 to 255.
Cross compiling/linking with MSVC on linux/wine leads to a
misinterpretation of the return value 1090650113 of mt.exe.
2013-12-02 10:17:31 -05:00
Brad King 132c40a8a8 cmake: Validate -E cmake_autogen argument count (#14545)
Do not access an argument index not known to exist.

Port the change from commit 9ef66f2b (cmake: Validate -E cmake_automoc
argument count, 2013-11-05) to the new location of the code.
2013-11-05 07:39:45 -05:00
Stephen Kelly be23dcfeb1 Rename the cmake_automoc command to cmake_autogen.
There is no need for a "cmake_automoc" backward compatibility command
because it is internal, undocumented, and only executed from a matching
version of cmake.
2013-10-24 09:14:13 +02:00
Stephen Kelly 52d5d4e915 Rename the cmQtAutoGenerator instances to reflect coming features. 2013-10-24 09:14:12 +02:00
Stephen Kelly 5c058c8f12 Rename the cmQtAutomoc class to cmQtAutoGenerators.
It will be extended to process .ui and .qrc files too.
2013-10-24 09:14:12 +02:00
Brad King c076476d7d cmake: Drop "cmake -E comspec" Win9x helper
Since we dropped Win9x support there is no need for this helper.
2013-10-19 07:19:49 -04:00
Brad King c04995b46e cmake: Split -E command implementation into separate source file
Move the cmake::ExecuteCMakeCommand static method and all the static
methods it calls out of the 'cmake' class to a separate 'cmcmd' class.
Build the latter as part of the main cmake executable with cmakemain.cxx
and not in CMakeLib.  Drop unused header includes from "cmake.cxx".

By moving this implementation out of cmake.cxx we avoid carrying it
around in all the executables that use class 'cmake'.  It is needed only
for the main "cmake -E" functionality.
2013-10-03 17:30:28 -04:00