Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brad King
CMake
Commits
695ce684
Commit
695ce684
authored
Jun 03, 2014
by
Brad King
Browse files
Merge branch 'fix-build-crash-on-bad-generator' into release
parents
687e0d63
44e2923f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Source/cmake.cxx
View file @
695ce684
...
...
@@ -2667,11 +2667,17 @@ int cmake::Build(const std::string& dir,
}
if
(
!
it
.
Find
(
"CMAKE_GENERATOR"
))
{
std
::
cerr
<<
"Error: could find
generator
in Cache
\n
"
;
std
::
cerr
<<
"Error: could
not
find
CMAKE_GENERATOR
in Cache
\n
"
;
return
1
;
}
cmsys
::
auto_ptr
<
cmGlobalGenerator
>
gen
(
this
->
CreateGlobalGenerator
(
it
.
GetValue
()));
if
(
!
gen
.
get
())
{
std
::
cerr
<<
"Error: could create CMAKE_GENERATOR
\"
"
<<
it
.
GetValue
()
<<
"
\"\n
"
;
return
1
;
}
std
::
string
output
;
std
::
string
projName
;
if
(
!
it
.
Find
(
"CMAKE_PROJECT_NAME"
))
...
...
Tests/RunCMake/CommandLine/RunCMakeTest.cmake
View file @
695ce684
include
(
RunCMake
)
run_cmake_command
(
build-no-cache
${
CMAKE_COMMAND
}
--build
${
RunCMake_SOURCE_DIR
}
)
run_cmake_command
(
build-no-generator
${
CMAKE_COMMAND
}
--build
${
RunCMake_SOURCE_DIR
}
/cache-no-generator
)
run_cmake_command
(
build-bad-generator
${
CMAKE_COMMAND
}
--build
${
RunCMake_SOURCE_DIR
}
/cache-bad-generator
)
if
(
UNIX
)
run_cmake_command
(
E_create_symlink-missing-dir
${
CMAKE_COMMAND
}
-E create_symlink T missing-dir/L
...
...
Tests/RunCMake/CommandLine/build-bad-generator-result.txt
0 → 100644
View file @
695ce684
1
Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt
0 → 100644
View file @
695ce684
^Error: could create CMAKE_GENERATOR "Bad Generator"$
Tests/RunCMake/CommandLine/build-no-cache-result.txt
0 → 100644
View file @
695ce684
1
Tests/RunCMake/CommandLine/build-no-cache-stderr.txt
0 → 100644
View file @
695ce684
^Error: could not load cache$
Tests/RunCMake/CommandLine/build-no-generator-result.txt
0 → 100644
View file @
695ce684
1
Tests/RunCMake/CommandLine/build-no-generator-stderr.txt
0 → 100644
View file @
695ce684
^Error: could not find CMAKE_GENERATOR in Cache$
Tests/RunCMake/CommandLine/cache-bad-generator/CMakeCache.txt
0 → 100644
View file @
695ce684
CMAKE_GENERATOR:INTERNAL=Bad Generator
Tests/RunCMake/CommandLine/cache-no-generator/CMakeCache.txt
0 → 100644
View file @
695ce684
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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