Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
e40aaa57
Commit
e40aaa57
authored
Apr 12, 2001
by
Ken Martin
Browse files
some bug fixes
parent
fb6c4b87
Changes
7
Hide whitespace changes
Inline
Side-by-side
Source/Makefile.in
View file @
e40aaa57
...
...
@@ -26,7 +26,7 @@ cmCustomCommand.o \
cmCacheManager.o
\
cmSourceGroup.o
DEPENDS
=
$(srcdir)
/
*
.h
${CMAKE_CONFIG_DIR}
/CMake/Source/cmConfigure.h
DEPENDS
=
$(srcdir)
/
*
.h
$(srcdir)
/
*
.cxx
${CMAKE_CONFIG_DIR}
/CMake/Source/cmConfigure.h
cmCollectFlags.o
:
$(DEPENDS)
CMakeBuildTargets.o
:
$(DEPENDS)
...
...
Source/cmAddLibraryCommand.cxx
View file @
e40aaa57
...
...
@@ -14,6 +14,7 @@
=========================================================================*/
#include
"cmAddLibraryCommand.h"
#include
"cmCacheManager.h"
// cmLibraryCommand
bool
cmAddLibraryCommand
::
Invoke
(
std
::
vector
<
std
::
string
>&
args
)
...
...
@@ -28,6 +29,12 @@ bool cmAddLibraryCommand::Invoke(std::vector<std::string>& args)
std
::
vector
<
std
::
string
>
srclists
(
++
s
,
args
.
end
());
m_Makefile
->
AddLibrary
(
args
[
0
].
c_str
(),
srclists
);
// Add an entry into the cache
cmCacheManager
::
GetInstance
()
->
AddCacheEntry
(
args
[
0
].
c_str
(),
m_Makefile
->
GetCurrentOutputDirectory
(),
cmCacheManager
::
INTERNAL
);
return
true
;
}
Source/cmCacheManager.cxx
View file @
e40aaa57
...
...
@@ -25,6 +25,7 @@ const char* cmCacheManagerTypes[] =
"PATH"
,
"FILEPATH"
,
"STRING"
,
"INTERNAL"
,
0
};
...
...
Source/cmCacheManager.h
View file @
e40aaa57
...
...
@@ -35,7 +35,7 @@ public:
* text entry box, FILEPATH is a full path to a file which
* can be different than just a path input
*/
enum
CacheEntryType
{
BOOL
=
0
,
PATH
,
FILEPATH
,
STRING
};
enum
CacheEntryType
{
BOOL
=
0
,
PATH
,
FILEPATH
,
STRING
,
INTERNAL
};
static
CacheEntryType
StringToType
(
const
char
*
);
//! Singleton pattern get instance of the cmCacheManager.
static
cmCacheManager
*
GetInstance
();
...
...
Source/cmMakefile.h
View file @
e40aaa57
...
...
@@ -97,7 +97,9 @@ public:
void
AddExecutable
(
const
char
*
exename
,
const
std
::
vector
<
std
::
string
>
&
srcs
);
/**
* Add a utility on which this project depends.
* Add a utility on which this project depends. A utility is an executable
* name as would be specified to the ADD_EXECUTABLE or UTILITY_SOURCE
* commands. It is not a full path nor does it have an extension.
*/
void
AddUtility
(
const
char
*
);
...
...
Source/cmUnixMakefileGenerator.cxx
View file @
e40aaa57
...
...
@@ -19,6 +19,7 @@
#include
"cmSystemTools.h"
#include
"cmClassFile.h"
#include
"cmMakeDepend.h"
#include
"cmCacheManager.h"
void
cmUnixMakefileGenerator
::
GenerateMakefile
()
{
...
...
@@ -69,6 +70,7 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
// for each target add to the list of targets
fout
<<
"TARGETS = "
;
const
cmTargets
&
tgts
=
m_Makefile
->
GetTargets
();
// libraries
for
(
cmTargets
::
const_iterator
l
=
tgts
.
begin
();
l
!=
tgts
.
end
();
l
++
)
{
...
...
@@ -76,7 +78,12 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
{
fout
<<
"
\\\n
lib"
<<
l
->
first
.
c_str
()
<<
"${CMAKE_LIB_EXT}"
;
}
else
}
// executables
for
(
cmTargets
::
const_iterator
l
=
tgts
.
begin
();
l
!=
tgts
.
end
();
l
++
)
{
if
(
!
l
->
second
.
m_IsALibrary
)
{
fout
<<
"
\\\n
"
<<
l
->
first
.
c_str
();
}
...
...
@@ -216,21 +223,18 @@ void cmUnixMakefileGenerator::OutputDependencies(std::ostream& fout)
{
bool
found
=
false
;
// loop over the list of directories that the libraries might
// be in, looking for a LIBRARY=(lib) line.
for
(
dir
=
libdirs
.
begin
();
dir
!=
libdirs
.
end
()
&&
!
found
;
++
dir
)
// be in, looking for an ADD_LIBRARY(lib...) line. This would
// be stored in the cache
const
char
*
cacheValue
=
cmCacheManager
::
GetInstance
()
->
GetCacheValue
(
lib
->
c_str
());
if
(
cacheValue
)
{
std
::
string
expression
=
"LIBRARY.*=.*"
;
expression
+=
lib
->
c_str
();
if
(
cmSystemTools
::
Grep
(
dir
->
c_str
(),
"CMakeTargets.make"
,
expression
.
c_str
()))
{
std
::
string
libpath
=
*
dir
;
libpath
+=
"/lib"
;
libpath
+=
*
lib
;
libpath
+=
"${CMAKE_LIB_EXT}"
;
fout
<<
libpath
<<
" "
;
found
=
true
;
}
std
::
string
libpath
=
cacheValue
;
libpath
+=
"/lib"
;
libpath
+=
*
lib
;
libpath
+=
"${CMAKE_LIB_EXT}"
;
fout
<<
libpath
<<
" "
;
found
=
true
;
}
}
...
...
@@ -243,10 +247,10 @@ void cmUnixMakefileGenerator::OutputDependencies(std::ostream& fout)
{
bool
found
=
false
;
// loop over the list of directories that the utilities might
// be in, looking for an EXECUTABLE
S=
(util) line.
// be in, looking for an
ADD_
EXECUTABLE(util
...
) line.
for
(
dir
=
utildirs
.
begin
();
dir
!=
utildirs
.
end
()
&&
!
found
;
++
dir
)
{
std
::
string
expression
=
"
EXECUTABLES.*
=.*"
;
std
::
string
expression
=
"
TARGETS
=.*"
;
expression
+=
util
->
c_str
();
if
(
cmSystemTools
::
Grep
(
dir
->
c_str
(),
"CMakeTargets.make"
,
expression
.
c_str
()))
...
...
@@ -267,6 +271,7 @@ void cmUnixMakefileGenerator::OutputMakeFlags(std::ostream& fout)
fout
<<
"INCLUDE_FLAGS = "
;
std
::
vector
<
std
::
string
>&
includes
=
m_Makefile
->
GetIncludeDirectories
();
std
::
vector
<
std
::
string
>::
iterator
i
;
fout
<<
"-I"
<<
m_Makefile
->
GetStartDirectory
()
<<
" "
;
for
(
i
=
includes
.
begin
();
i
!=
includes
.
end
();
++
i
)
{
std
::
string
include
=
*
i
;
...
...
Source/cmWrapTclCommand.cxx
View file @
e40aaa57
...
...
@@ -44,6 +44,9 @@ bool cmWrapTclCommand::Invoke(std::vector<std::string>& args)
}
}
// add in a depend in the vtkWrapTcl executable
m_Makefile
->
AddUtility
(
"vtkWrapTcl"
);
// what is the current source dir
std
::
string
cdir
=
m_Makefile
->
GetCurrentDirectory
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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