Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
André Pedro
CMake
Commits
6b7257db
Commit
6b7257db
authored
20 years ago
by
Andy Cedilnik
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Add check for previous bootstrap in the source tree when doing out-of-source build
parent
ace5f90d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bootstrap
+41
-0
41 additions, 0 deletions
bootstrap
with
41 additions
and
0 deletions
bootstrap
+
41
−
0
View file @
6b7257db
...
...
@@ -21,6 +21,17 @@ CMAKE_KNOWN_C_COMPILERS="cc gcc xlc icc tcc"
CMAKE_KNOWN_CXX_COMPILERS
=
"aCC xlC CC g++ c++ icc como "
CMAKE_KNOWN_MAKE_PROCESSORS
=
"make gmake"
CMAKE_PROBLEMATIC_FILES
=
"
\
CMakeCache.txt
\
CMakeSystem.cmake
\
CMakeCCompiler.cmake
\
CMakeCXXCompiler.cmake
\
Source/cmConfigure.h
\
Source/CTest/Curl/config.h
\
Utilities/cmexpat/expatConfig.h
\
Utilities/cmexpat/expatDllConfig.h
\
"
CMAKE_CXX_SOURCES
=
"
\
cmake
\
cmakewizard
\
...
...
@@ -332,6 +343,36 @@ echo "---------------------------------------------"
# Get CMake version
echo
"
`
cmake_version
`
"
# Check for in-source build
cmake_in_source_build
=
if
[
-f
"
${
cmake_binary_dir
}
/Source/cmake.cxx"
-a
\
-f
"
${
cmake_binary_dir
}
/Source/cmake.h"
]
;
then
if
[
-n
"
${
cmake_verbose
}
"
]
;
then
echo
"Warning: This is an in-source build"
fi
cmake_in_source_build
=
TRUE
fi
# If this is not an in-source build, then Bootstrap stuff should not exist.
if
[
-z
"
${
cmake_in_source_build
}
"
]
;
then
# Did somebody bootstrap in the source tree?
if
[
-e
"
${
cmake_source_dir
}
/Bootstrap.cmk"
]
;
then
cmake_error 10
"Found directory
\"
${
cmake_source_dir
}
/Bootstrap.cmk
\"
.
Looks like somebody did bootstrap CMake in the source tree, but now you are
trying to do bootstrap in the binary tree. Please remove Bootstrap.cmk
directory from the source tree."
fi
# Is there a cache in the source tree?
for
cmake_problematic_file
in
${
CMAKE_PROBLEMATIC_FILES
}
;
do
if
[
-e
"
${
cmake_source_dir
}
/
${
cmake_problematic_file
}
"
]
;
then
cmake_error 10
"Found
\"
${
cmake_source_dir
}
/
${
cmake_problematic_file
}
\"
.
Looks like somebody tried to build CMake in the source tree, but now you are
trying to do bootstrap in the binary tree. Please remove
\"
${
cmake_problematic_file
}
\"
from the source tree."
fi
done
fi
# Make bootstrap directory
[
-d
"
${
cmake_bootstrap_dir
}
"
]
||
mkdir
"
${
cmake_bootstrap_dir
}
"
if
[
!
-d
"
${
cmake_bootstrap_dir
}
"
]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment