Separate compilation for commands included in cmBootstrapCommands1

This commit is contained in:
Daniel Pfeifer
2016-10-19 21:59:14 +02:00
parent f69e768d94
commit 64f9c282f3
20 changed files with 198 additions and 45 deletions

View File

@@ -390,6 +390,89 @@ set(SRCS
cmake.cxx
cmake.h
cmAddCustomCommandCommand.cxx
cmAddCustomCommandCommand.h
cmAddCustomTargetCommand.cxx
cmAddCustomTargetCommand.h
cmAddDefinitionsCommand.cxx
cmAddDefinitionsCommand.h
cmAddDependenciesCommand.cxx
cmAddDependenciesCommand.h
cmAddExecutableCommand.cxx
cmAddExecutableCommand.h
cmAddLibraryCommand.cxx
cmAddLibraryCommand.h
cmAddSubDirectoryCommand.cxx
cmAddSubDirectoryCommand.h
cmAddTestCommand.cxx
cmAddTestCommand.h
cmBreakCommand.cxx
cmBreakCommand.h
cmBuildCommand.cxx
cmBuildCommand.h
cmCMakeMinimumRequired.cxx
cmCMakeMinimumRequired.h
cmCMakePolicyCommand.cxx
cmCMakePolicyCommand.h
cmCommandArgumentsHelper.cxx
cmCommandArgumentsHelper.h
cmConfigureFileCommand.cxx
cmConfigureFileCommand.h
cmContinueCommand.cxx
cmContinueCommand.h
cmCoreTryCompile.cxx
cmCoreTryCompile.h
cmCreateTestSourceList.cxx
cmCreateTestSourceList.h
cmDefinePropertyCommand.cxx
cmDefinePropertyCommand.h
cmElseCommand.cxx
cmElseCommand.h
cmEnableLanguageCommand.cxx
cmEnableLanguageCommand.h
cmEnableTestingCommand.cxx
cmEnableTestingCommand.h
cmEndForEachCommand.cxx
cmEndForEachCommand.h
cmEndFunctionCommand.cxx
cmEndFunctionCommand.h
cmEndIfCommand.cxx
cmEndIfCommand.h
cmEndMacroCommand.cxx
cmEndMacroCommand.h
cmEndWhileCommand.cxx
cmEndWhileCommand.h
cmExecProgramCommand.cxx
cmExecProgramCommand.h
cmExecuteProcessCommand.cxx
cmExecuteProcessCommand.h
cmFileCommand.cxx
cmFileCommand.h
cmFindBase.cxx
cmFindBase.h
cmFindCommon.cxx
cmFindCommon.h
cmFindFileCommand.cxx
cmFindFileCommand.h
cmFindLibraryCommand.cxx
cmFindLibraryCommand.h
cmFindPackageCommand.cxx
cmFindPackageCommand.h
cmFindPathCommand.cxx
cmFindPathCommand.h
cmFindProgramCommand.cxx
cmFindProgramCommand.h
cmForEachCommand.cxx
cmForEachCommand.h
cmFunctionCommand.cxx
cmFunctionCommand.h
cmParseArgumentsCommand.cxx
cmParseArgumentsCommand.h
cmPathLabel.cxx
cmPathLabel.h
cmSearchPath.cxx
cmSearchPath.h
cm_auto_ptr.hxx
cm_get_date.h
cm_get_date.c

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmAddExecutableCommand.h"
#include "cmGlobalGenerator.h"
// cmExecutableCommand
bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus&)

View File

@@ -2,8 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmAddLibraryCommand.h"
#include "cmGlobalGenerator.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmake.h"
// cmLibraryCommand

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmAddSubDirectoryCommand.h"
#include "cmSystemTools.h"
// cmAddSubDirectoryCommand
bool cmAddSubDirectoryCommand::InitialPass(
std::vector<std::string> const& args, cmExecutionStatus&)

View File

@@ -4,48 +4,48 @@
// that CMake knows about at compile time.
// This is sort of a boot strapping approach since you would
// like to have CMake to build CMake.
#include "cmAddCustomCommandCommand.cxx"
#include "cmAddCustomTargetCommand.cxx"
#include "cmAddDefinitionsCommand.cxx"
#include "cmAddDependenciesCommand.cxx"
#include "cmAddExecutableCommand.cxx"
#include "cmAddLibraryCommand.cxx"
#include "cmAddSubDirectoryCommand.cxx"
#include "cmAddTestCommand.cxx"
#include "cmBreakCommand.cxx"
#include "cmBuildCommand.cxx"
#include "cmCMakeMinimumRequired.cxx"
#include "cmCMakePolicyCommand.cxx"
#include "cmCommandArgumentsHelper.cxx"
#include "cmAddCustomCommandCommand.h"
#include "cmAddCustomTargetCommand.h"
#include "cmAddDefinitionsCommand.h"
#include "cmAddDependenciesCommand.h"
#include "cmAddExecutableCommand.h"
#include "cmAddLibraryCommand.h"
#include "cmAddSubDirectoryCommand.h"
#include "cmAddTestCommand.h"
#include "cmBreakCommand.h"
#include "cmBuildCommand.h"
#include "cmCMakeMinimumRequired.h"
#include "cmCMakePolicyCommand.h"
#include "cmCommandArgumentsHelper.h"
#include "cmCommands.h"
#include "cmConfigureFileCommand.cxx"
#include "cmContinueCommand.cxx"
#include "cmCoreTryCompile.cxx"
#include "cmCreateTestSourceList.cxx"
#include "cmDefinePropertyCommand.cxx"
#include "cmElseCommand.cxx"
#include "cmEnableLanguageCommand.cxx"
#include "cmEnableTestingCommand.cxx"
#include "cmEndForEachCommand.cxx"
#include "cmEndFunctionCommand.cxx"
#include "cmEndIfCommand.cxx"
#include "cmEndMacroCommand.cxx"
#include "cmEndWhileCommand.cxx"
#include "cmExecProgramCommand.cxx"
#include "cmExecuteProcessCommand.cxx"
#include "cmFileCommand.cxx"
#include "cmFindBase.cxx"
#include "cmFindCommon.cxx"
#include "cmFindFileCommand.cxx"
#include "cmFindLibraryCommand.cxx"
#include "cmFindPackageCommand.cxx"
#include "cmFindPathCommand.cxx"
#include "cmFindProgramCommand.cxx"
#include "cmForEachCommand.cxx"
#include "cmFunctionCommand.cxx"
#include "cmParseArgumentsCommand.cxx"
#include "cmPathLabel.cxx"
#include "cmSearchPath.cxx"
#include "cmConfigureFileCommand.h"
#include "cmContinueCommand.h"
#include "cmCoreTryCompile.h"
#include "cmCreateTestSourceList.h"
#include "cmDefinePropertyCommand.h"
#include "cmElseCommand.h"
#include "cmEnableLanguageCommand.h"
#include "cmEnableTestingCommand.h"
#include "cmEndForEachCommand.h"
#include "cmEndFunctionCommand.h"
#include "cmEndIfCommand.h"
#include "cmEndMacroCommand.h"
#include "cmEndWhileCommand.h"
#include "cmExecProgramCommand.h"
#include "cmExecuteProcessCommand.h"
#include "cmFileCommand.h"
#include "cmFindBase.h"
#include "cmFindCommon.h"
#include "cmFindFileCommand.h"
#include "cmFindLibraryCommand.h"
#include "cmFindPackageCommand.h"
#include "cmFindPathCommand.h"
#include "cmFindProgramCommand.h"
#include "cmForEachCommand.h"
#include "cmFunctionCommand.h"
#include "cmParseArgumentsCommand.h"
#include "cmPathLabel.h"
#include "cmSearchPath.h"
void GetBootstrapCommands1(std::vector<cmCommand*>& commands)
{

View File

@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCMakeMinimumRequired.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
// cmCMakeMinimumRequired

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmConfigureFileCommand.h"
#include "cmSystemTools.h"
#include <cmsys/RegularExpression.hxx>
// cmConfigureFileCommand

View File

@@ -2,6 +2,9 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmContinueCommand.h"
#include "cmExecutionStatus.h"
#include "cmSystemTools.h"
// cmContinueCommand
bool cmContinueCommand::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status)

View File

@@ -3,6 +3,7 @@
#include "cmCreateTestSourceList.h"
#include "cmSourceFile.h"
#include "cmSystemTools.h"
// cmCreateTestSourceList
bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args,

View File

@@ -5,6 +5,7 @@
#include "cmAlgorithms.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
cmFindBase::cmFindBase()
{

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFindCommon.h"
#include "cmSystemTools.h"
#include <algorithm>
#include <functional>

View File

@@ -2,7 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFindLibraryCommand.h"
#include "cmGlobalGenerator.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include <cmsys/Directory.hxx>
cmFindLibraryCommand::cmFindLibraryCommand()

View File

@@ -4,9 +4,12 @@
#include "cmAlgorithms.h"
#include "cmState.h"
#include "cmVersion.h"
#include <cmSystemTools.h>
#include <cmsys/Directory.hxx>
#include <cmsys/Encoding.hxx>
#include <cmsys/FStream.hxx>
#include <cmsys/RegularExpression.hxx>
#ifdef CMAKE_BUILD_WITH_CMAKE

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFindPathCommand.h"
#include "cmSystemTools.h"
#include <cmsys/Glob.hxx>
cmFindPathCommand::cmFindPathCommand()

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFindProgramCommand.h"
#include "cmSystemTools.h"
#include <stdlib.h>
#if defined(__APPLE__)

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmForEachCommand.h"
#include "cmSystemTools.h"
#include <cm_auto_ptr.hxx>
cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf)

View File

@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFunctionCommand.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmake.h"
// define the class for function commands

View File

@@ -3,6 +3,7 @@
#include "cmParseArgumentsCommand.h"
#include "cmAlgorithms.h"
#include "cmSystemTools.h"
static std::string escape_arg(const std::string& arg)
{

View File

@@ -4,6 +4,7 @@
#include "cmAlgorithms.h"
#include "cmFindCommon.h"
#include "cmSystemTools.h"
cmSearchPath::cmSearchPath(cmFindCommon* findCmd)
: FC(findCmd)

View File

@@ -327,6 +327,47 @@ CMAKE_CXX_SOURCES="\
cmExprLexer \
cmExprParser \
cmExprParserHelper \
cmAddCustomCommandCommand \
cmAddCustomTargetCommand \
cmAddDefinitionsCommand \
cmAddDependenciesCommand \
cmAddExecutableCommand \
cmAddLibraryCommand \
cmAddSubDirectoryCommand \
cmAddTestCommand \
cmBreakCommand \
cmBuildCommand \
cmCMakeMinimumRequired \
cmCMakePolicyCommand \
cmCommandArgumentsHelper \
cmConfigureFileCommand \
cmContinueCommand \
cmCoreTryCompile \
cmCreateTestSourceList \
cmDefinePropertyCommand \
cmElseCommand \
cmEnableLanguageCommand \
cmEnableTestingCommand \
cmEndForEachCommand \
cmEndFunctionCommand \
cmEndIfCommand \
cmEndMacroCommand \
cmEndWhileCommand \
cmExecProgramCommand \
cmExecuteProcessCommand \
cmFileCommand \
cmFindBase \
cmFindCommon \
cmFindFileCommand \
cmFindLibraryCommand \
cmFindPackageCommand \
cmFindPathCommand \
cmFindProgramCommand \
cmForEachCommand \
cmFunctionCommand \
cmParseArgumentsCommand \
cmPathLabel \
cmSearchPath \
"
if ${cmake_system_mingw}; then
@@ -1323,10 +1364,6 @@ for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_
done
# Generate dependencies for cmBootstrapCommands1.cxx
for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands1.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do
cmBootstrapCommands1Deps="${cmBootstrapCommands1Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`"
done
cmBootstrapCommands1Deps=`echo $cmBootstrapCommands1Deps`
for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands2.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do
cmBootstrapCommands2Deps="${cmBootstrapCommands2Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`"
done