Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
0b150f69
Commit
0b150f69
authored
Aug 03, 2003
by
Andy Cedilnik
Browse files
ENH: Use the new RunCommand
parent
32c2ed2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Source/cmGlobalGenerator.cxx
View file @
0b150f69
...
...
@@ -24,6 +24,8 @@
#include
<windows.h>
#endif
int
cmGlobalGenerator
::
s_TryCompileTimeout
=
0
;
cmGlobalGenerator
::
cmGlobalGenerator
()
{
// do nothing duh
...
...
@@ -485,7 +487,9 @@ int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
makeCommand
+=
" all"
;
}
int
retVal
;
if
(
!
cmSystemTools
::
RunCommand
(
makeCommand
.
c_str
(),
*
output
,
retVal
,
0
,
false
))
int
timeout
=
cmGlobalGenerator
::
s_TryCompileTimeout
;
if
(
!
cmSystemTools
::
RunSingleCommand
(
makeCommand
.
c_str
(),
output
,
&
retVal
,
0
,
false
,
timeout
))
{
cmSystemTools
::
Error
(
"Generator: execution of make failed."
);
// return to the original directory
...
...
Source/cmGlobalGenerator.h
View file @
0b150f69
...
...
@@ -102,6 +102,7 @@ public:
void
SetConfiguredFilesPath
(
const
char
*
s
){
m_ConfiguredFilesPath
=
s
;}
void
GetLocalGenerators
(
std
::
vector
<
cmLocalGenerator
*>&
g
)
{
g
=
m_LocalGenerators
;}
static
int
s_TryCompileTimeout
;
protected:
cmStdString
m_FindMakeProgramFile
;
...
...
Source/cmGlobalVisualStudio6Generator.cxx
View file @
0b150f69
...
...
@@ -96,7 +96,7 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
cmSystemTools
::
ChangeDirectory
(
bindir
);
// if there are spaces in the makeCommand, assume a full path
// and convert it to a path with no spaces in it as the
// RunCommand does not like spaces
// Run
Single
Command does not like spaces
#if defined(_WIN32) && !defined(__CYGWIN__)
if
(
makeCommand
.
find
(
' '
)
!=
std
::
string
::
npos
)
{
...
...
@@ -116,7 +116,9 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
}
makeCommand
+=
" - Debug
\"
"
;
int
retVal
;
if
(
!
cmSystemTools
::
RunCommand
(
makeCommand
.
c_str
(),
*
output
,
retVal
,
0
,
false
))
int
timeout
=
cmGlobalGenerator
::
s_TryCompileTimeout
;
if
(
!
cmSystemTools
::
RunSingleCommand
(
makeCommand
.
c_str
(),
output
,
&
retVal
,
0
,
false
,
timeout
))
{
std
::
string
e
=
"Error executing make program
\"
"
;
e
+=
originalCommand
;
...
...
Source/cmGlobalVisualStudio7Generator.cxx
View file @
0b150f69
...
...
@@ -66,7 +66,7 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
// if there are spaces in the makeCommand, assume a full path
// and convert it to a path with no spaces in it as the
// RunCommand does not like spaces
// Run
Single
Command does not like spaces
#if defined(_WIN32) && !defined(__CYGWIN__)
if
(
makeCommand
.
find
(
' '
)
!=
std
::
string
::
npos
)
{
...
...
@@ -86,8 +86,9 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
}
int
retVal
;
if
(
!
cmSystemTools
::
RunCommand
(
makeCommand
.
c_str
(),
*
output
,
retVal
,
0
,
false
))
int
timeout
=
cmGlobalGenerator
::
s_TryCompileTimeout
;
if
(
!
cmSystemTools
::
RunSingleCommand
(
makeCommand
.
c_str
(),
output
,
&
retVal
,
0
,
false
,
timeout
))
{
cmSystemTools
::
Error
(
"Generator: execution of devenv failed."
);
// return to the original directory
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment