summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-04-04 16:01:41 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-04-04 16:01:41 (GMT)
commit04d53a38659ca8baa893f3c6c8715c0d150eaddf (patch)
tree6cb2c428b6f58df5b13aa7293365c2eae5ea821b /Source/cmUnixMakefileGenerator.cxx
parent5d850d2a5683d788a7d7eb8f80259d05676de4c6 (diff)
downloadCMake-04d53a38659ca8baa893f3c6c8715c0d150eaddf.zip
CMake-04d53a38659ca8baa893f3c6c8715c0d150eaddf.tar.gz
CMake-04d53a38659ca8baa893f3c6c8715c0d150eaddf.tar.bz2
ENH: separate the ar program for cxx and c
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index f427bdf..789789b 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -692,7 +692,15 @@ void cmUnixMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
target = this->ConvertToOutputPath(target.c_str());
std::string depend = "$(";
depend += this->CreateMakeVariable(name, "_SRC_OBJS") + ")";
- std::string command = "$(CMAKE_AR) $(CMAKE_AR_ARGS) ";
+ std::string command;
+ if(t.HasCxx())
+ {
+ command = "$(CMAKE_CXX_AR) $(CMAKE_CXX_AR_ARGS) ";
+ }
+ else
+ {
+ command = "$(CMAKE_AR) $(CMAKE_AR_ARGS) ";
+ }
command += target;
command += " $(";
command += this->CreateMakeVariable(name, "_SRC_OBJS") + ")";
@@ -1499,6 +1507,8 @@ void cmUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
"CMAKE_RANLIB = @CMAKE_RANLIB@\n"
"CMAKE_AR = @CMAKE_AR@\n"
"CMAKE_AR_ARGS = @CMAKE_AR_ARGS@\n"
+ "CMAKE_CXX_AR = @CMAKE_CXX_AR@\n"
+ "CMAKE_CXX_AR_ARGS = @CMAKE_CXX_AR_ARGS@\n"
"CMAKE_C_COMPILER = @CMAKE_C_COMPILER@\n"
"CMAKE_C_FLAGS = @CMAKE_C_FLAGS@\n"
"CMAKE_SHLIB_CFLAGS = @CMAKE_SHLIB_CFLAGS@\n"