I've been fiddling with making MIPSpro compile CMake 3.6.3, alas seeing not much success (learning lots, achieving little). I was wondering if anybody had any ideas.
Here are the first few errors I get:
Code:
cc-3316 CC: ERROR File = /usr/include/CC/stl_vector.h, Line = 637
The expression must be a pointer to a complete object type.
construct(_M_finish, *(_M_finish - 1));
^
detected during instantiation of "void
std::vector<cmState::SnapshotDataType,
std::allocator<cmState::SnapshotDataType>>::_M_insert_aux(s
td::vector<cmState::SnapshotDataType,
std::allocator<cmState::SnapshotDataType>>::iterator,
const cmState::SnapshotDataType &)"
cc-1070 CC: ERROR File = /usr/include/CC/stl_construct.h, Line = 53
The indicated type is incomplete.
new (__p) _T1(__value);
^
A template was detected during header processing.
instantiation of "void std::construct(cmState::SnapshotDataType *,
const <error-type> &)" at line 637 of
"/usr/include/CC/stl_vector.h"
instantiation of "void std::vector<cmState::SnapshotDataType,
std::allocator<cmState::SnapshotDataType>>::_M_insert_aux
(std::vector<cmState::SnapshotDataType,
std::allocator<cmState::SnapshotDataType>>::iterator,
const cmState::SnapshotDataType &)"
cc-3316 CC: ERROR File = /usr/include/CC/stl_vector.h, Line = 638
The expression must be a pointer to a complete object type.
++_M_finish;
^
detected during instantiation of "void
std::vector<cmState::SnapshotDataType,
std::allocator<cmState::SnapshotDataType>>::_M_insert_aux(s
td::vector<cmState::SnapshotDataType,
std::allocator<cmState::SnapshotDataType>>::iterator,
const cmState::SnapshotDataType &)"
So what I'm getting is that cmState::SnapshotDataType is not completely defined.
Here is the relevent portion of cmState.h:
Code:
#ifndef cmState_h
#define cmState_h
#include "cmStandardIncludes.h"
#include "cmAlgorithms.h"
#include "cmLinkedTree.h"
#include "cmPolicies.h"
#include "cmPropertyDefinitionMap.h"
#include "cmPropertyMap.h"
class cmake;
class cmCommand;
class cmDefinitions;
class cmListFileBacktrace;
class cmCacheManager;
class cmState
{
struct SnapshotDataType;
struct PolicyStackEntry;
struct BuildsystemDirectoryStateType;
typedef cmLinkedTree<SnapshotDataType>::iterator PositionType;
friend class Snapshot;
public:
cmState();
~cmState();
enum SnapshotType
{
BaseType,
BuildsystemDirectoryType,
FunctionCallType,
MacroCallType,
IncludeFileType,
InlineListFileType,
PolicyScopeType,
VariableScopeType
};
And cmState.cxx:
Code:
#include "cmState.h"
#include "cmAlgorithms.h"
#include "cmCacheManager.h"
#include "cmCommand.h"
#include "cmDefinitions.h"
#include "cmVersion.h"
#include "cmake.h"
#include <assert.h>
struct cmState::SnapshotDataType
{
cmState::PositionType ScopeParent;
cmState::PositionType DirectoryParent;
cmLinkedTree<cmState::PolicyStackEntry>::iterator Policies;
cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyRoot;
cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyScope;
cmState::SnapshotType SnapshotType;
bool Keep;
cmLinkedTree<std::string>::iterator ExecutionListFile;
cmLinkedTree<cmState::BuildsystemDirectoryStateType>::iterator
BuildSystemDirectory;
cmLinkedTree<cmDefinitions>::iterator Vars;
cmLinkedTree<cmDefinitions>::iterator Root;
cmLinkedTree<cmDefinitions>::iterator Parent;
std::vector<std::string>::size_type IncludeDirectoryPosition;
std::vector<std::string>::size_type CompileDefinitionsPosition;
std::vector<std::string>::size_type CompileOptionsPosition;
};
I've tried a lot of things, such as moving the struct declaration into the header and attempting to explicitly declare cmLinkedTree<SnapshotDataType>::iterator in various places. For a long time I thought this was an issue with that typedef of a template being in a header, but I have drifted away from that theory.
Does anybody have any thoughts?