mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
ENH: Changed preprocessed source extension to .i and assembly extension to .s for more portability.
This commit is contained in:
parent
fe3d8078c5
commit
dd37d0652f
@ -4,8 +4,8 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -o <PREPROCESSED_SOURCE> -E <SOURCE>")
|
||||
SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -o <ASSEMBLY_SOURCE> -S <SOURCE>")
|
||||
SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
@ -14,7 +14,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -o <PREPROCESSED_SOURCE> -E <SOURCE>")
|
||||
SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -o <ASSEMBLY_SOURCE> -S <SOURCE>")
|
||||
SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
|
@ -306,13 +306,13 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
|
||||
{
|
||||
this->WriteObjectConvenienceRule(
|
||||
ruleFileStream, "target to preprocess a source file",
|
||||
(base + ".E").c_str(), lo->second);
|
||||
(base + ".i").c_str(), lo->second);
|
||||
}
|
||||
if(do_assembly_rules)
|
||||
{
|
||||
this->WriteObjectConvenienceRule(
|
||||
ruleFileStream, "target to generate assembly for a file",
|
||||
(base + ".S").c_str(), lo->second);
|
||||
(base + ".s").c_str(), lo->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -509,12 +509,12 @@ cmMakefileTargetGenerator
|
||||
if(do_preprocess_rules)
|
||||
{
|
||||
commands.clear();
|
||||
std::string relativeObjE = relativeObjBase + ".E";
|
||||
std::string relativeObjI = relativeObjBase + ".i";
|
||||
|
||||
std::string preprocessEcho = "Preprocessing ";
|
||||
preprocessEcho += lang;
|
||||
preprocessEcho += " source to ";
|
||||
preprocessEcho += relativeObjE;
|
||||
preprocessEcho += relativeObjI;
|
||||
this->LocalGenerator->AppendEcho(
|
||||
commands, preprocessEcho.c_str(),
|
||||
cmLocalUnixMakefileGenerator3::EchoBuild
|
||||
@ -528,7 +528,7 @@ cmMakefileTargetGenerator
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(preprocessRule, commands);
|
||||
|
||||
vars.PreprocessedSource = relativeObjE.c_str();
|
||||
vars.PreprocessedSource = relativeObjI.c_str();
|
||||
|
||||
// Expand placeholders in the commands.
|
||||
for(std::vector<std::string>::iterator i = commands.begin();
|
||||
@ -545,14 +545,14 @@ cmMakefileTargetGenerator
|
||||
}
|
||||
|
||||
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
|
||||
relativeObjE.c_str(),
|
||||
relativeObjI.c_str(),
|
||||
force_depends, commands, false);
|
||||
}
|
||||
|
||||
if(do_assembly_rules)
|
||||
{
|
||||
commands.clear();
|
||||
std::string relativeObjS = relativeObjBase + ".S";
|
||||
std::string relativeObjS = relativeObjBase + ".s";
|
||||
|
||||
std::string assemblyEcho = "Compiling ";
|
||||
assemblyEcho += lang;
|
||||
|
Loading…
Reference in New Issue
Block a user