Skip to content

Commit b7dae4f

Browse files
committed
fix build issues
1 parent 989c262 commit b7dae4f

File tree

9 files changed

+80
-130
lines changed

9 files changed

+80
-130
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ examples/CreateWallAndWriteFile/CreateWallAndWriteFile/SimpleWall.ifc
3838
examples/CreateWallAndWriteFile/SimpleWall.ifc
3939
examples/LoadFileExampleNoGUI/LoadFileExampleNoGUI/x64/
4040
external/Carve/build/
41+
examples/CreateWallAndWriteFile/x64/

IfcPlusPlus/src/ifcpp/model/BasicTypes.h

Lines changed: 58 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,65 +17,79 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU
1717

1818
#pragma once
1919

20+
#if _MSC_VER >= 1600
2021
#include <memory>
21-
2222
#if _MSC_VER < 1900
23-
using std::tr1::shared_ptr;
24-
using std::tr1::weak_ptr;
25-
using std::tr1::dynamic_pointer_cast;
26-
using std::tr1::make_shared;
23+
using std::tr1::shared_ptr;
24+
using std::tr1::weak_ptr;
25+
using std::tr1::dynamic_pointer_cast;
26+
using std::tr1::make_shared;
2727
#elif _MSC_VER >= 1900
28-
using std::shared_ptr;
29-
using std::weak_ptr;
30-
using std::dynamic_pointer_cast;
31-
using std::make_shared;
28+
using std::shared_ptr;
29+
using std::weak_ptr;
30+
using std::dynamic_pointer_cast;
31+
using std::make_shared;
32+
#endif
3233
#elif defined __clang__
33-
using std::shared_ptr;
34-
using std::weak_ptr;
35-
using std::dynamic_pointer_cast;
36-
using std::make_shared;
37-
#elif defined __GNUC__
38-
#define _stricmp strcasecmp
39-
#if defined(__FreeBSD__)
40-
using std::shared_ptr;
41-
using std::weak_ptr;
42-
using std::dynamic_pointer_cast;
43-
using std::make_shared;
44-
#else
45-
using std::shared_ptr;
46-
using std::weak_ptr;
47-
using std::dynamic_pointer_cast;
48-
using std::make_shared;
49-
#endif
34+
#include <memory>
35+
using std::shared_ptr;
36+
using std::weak_ptr;
37+
using std::dynamic_pointer_cast;
38+
using std::make_shared;
39+
#elif defined __GNUC__ && !defined(__FreeBSD__)
40+
#if __GNUC__ < 5
41+
#include <tr1/memory>
42+
using std::tr1::shared_ptr;
43+
using std::tr1::weak_ptr;
44+
using std::tr1::dynamic_pointer_cast;
45+
using std::tr1::make_shared;
5046
#else
51-
#ifndef BOOST_SP_USE_QUICK_ALLOCATOR
52-
#define BOOST_SP_USE_QUICK_ALLOCATOR
53-
#endif
54-
#ifndef BOOST_SP_NO_ATOMIC_ACCESS
55-
#define BOOST_SP_NO_ATOMIC_ACCESS
56-
#endif
47+
#include <memory>
48+
using std::shared_ptr;
49+
using std::weak_ptr;
50+
using std::dynamic_pointer_cast;
51+
using std::make_shared;
52+
#endif
53+
#define _stricmp strcasecmp
54+
55+
#elif defined(__FreeBSD__)
56+
// Requires clang++ and libc++
57+
#include <memory>
58+
using std::shared_ptr;
59+
using std::weak_ptr;
60+
using std::dynamic_pointer_cast;
61+
using std::make_shared;
62+
#define _stricmp strcasecmp
63+
64+
#else
65+
#ifndef BOOST_SP_USE_QUICK_ALLOCATOR
66+
#define BOOST_SP_USE_QUICK_ALLOCATOR
67+
#endif
68+
#ifndef BOOST_SP_NO_ATOMIC_ACCESS
69+
#define BOOST_SP_NO_ATOMIC_ACCESS
70+
#endif
5771

58-
#include <boost/shared_ptr.hpp>
59-
#include <boost/weak_ptr.hpp>
60-
using boost::shared_ptr;
61-
using boost::weak_ptr;
62-
using boost::dynamic_pointer_cast;
63-
using boost::make_shared;
72+
#include <boost/shared_ptr.hpp>
73+
#include <boost/weak_ptr.hpp>
74+
using boost::shared_ptr;
75+
using boost::weak_ptr;
76+
using boost::dynamic_pointer_cast;
77+
using boost::make_shared;
6478
#endif
6579

6680
struct vec4
6781
{
6882
vec4() {}
69-
vec4( double r, double g, double b, double a ) : m_r(r), m_g( g ), m_b( b ), m_a( a ){}
70-
vec4( const vec4& other ) : m_r( other.m_r ), m_g( other.m_g ), m_b( other.m_b ), m_a( other.m_a ) {}
71-
void setColor( const vec4& other )
83+
vec4(double r, double g, double b, double a) : m_r(r), m_g(g), m_b(b), m_a(a) {}
84+
vec4(const vec4& other) : m_r(other.m_r), m_g(other.m_g), m_b(other.m_b), m_a(other.m_a) {}
85+
void setColor(const vec4& other)
7286
{
7387
m_r = other.m_r;
7488
m_g = other.m_g;
7589
m_b = other.m_b;
7690
m_a = other.m_a;
7791
}
78-
void setColor( double r, double g, double b, double a )
92+
void setColor(double r, double g, double b, double a)
7993
{
8094
m_r = r;
8195
m_g = g;
@@ -87,7 +101,7 @@ struct vec4
87101
double b() const { return m_b; }
88102
double a() const { return m_a; }
89103

90-
vec4& operator =( const vec4& other )
104+
vec4& operator =(const vec4& other)
91105
{
92106
m_r = other.m_r;
93107
m_g = other.m_g;
@@ -100,4 +114,4 @@ struct vec4
100114
double m_g = 0;
101115
double m_b = 0;
102116
double m_a = 0;
103-
};
117+
};

examples/CreateWallAndWriteFile/CreateWallAndWriteFile.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,13 @@ EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|x64 = Debug|x64
11-
Debug|x86 = Debug|x86
1211
Release|x64 = Release|x64
13-
Release|x86 = Release|x86
1412
EndGlobalSection
1513
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1614
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Debug|x64.ActiveCfg = Debug|x64
1715
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Debug|x64.Build.0 = Debug|x64
18-
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Debug|x86.ActiveCfg = Debug|Win32
19-
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Debug|x86.Build.0 = Debug|Win32
2016
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Release|x64.ActiveCfg = Release|x64
2117
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Release|x64.Build.0 = Release|x64
22-
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Release|x86.ActiveCfg = Release|Win32
23-
{ECE47E9B-9C3B-45AF-AA56-8DE83C3E5955}.Release|x86.Build.0 = Release|Win32
2418
EndGlobalSection
2519
GlobalSection(SolutionProperties) = preSolution
2620
HideSolutionNode = FALSE

examples/CreateWallAndWriteFile/CreateWallAndWriteFile.vcxproj

Lines changed: 8 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4-
<ProjectConfiguration Include="Debug|Win32">
5-
<Configuration>Debug</Configuration>
6-
<Platform>Win32</Platform>
7-
</ProjectConfiguration>
8-
<ProjectConfiguration Include="Release|Win32">
9-
<Configuration>Release</Configuration>
10-
<Platform>Win32</Platform>
11-
</ProjectConfiguration>
124
<ProjectConfiguration Include="Debug|x64">
135
<Configuration>Debug</Configuration>
146
<Platform>x64</Platform>
@@ -26,19 +18,6 @@
2618
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2719
</PropertyGroup>
2820
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30-
<ConfigurationType>Application</ConfigurationType>
31-
<UseDebugLibraries>true</UseDebugLibraries>
32-
<PlatformToolset>v142</PlatformToolset>
33-
<CharacterSet>Unicode</CharacterSet>
34-
</PropertyGroup>
35-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36-
<ConfigurationType>Application</ConfigurationType>
37-
<UseDebugLibraries>false</UseDebugLibraries>
38-
<PlatformToolset>v142</PlatformToolset>
39-
<WholeProgramOptimization>true</WholeProgramOptimization>
40-
<CharacterSet>Unicode</CharacterSet>
41-
</PropertyGroup>
4221
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4322
<ConfigurationType>Application</ConfigurationType>
4423
<UseDebugLibraries>true</UseDebugLibraries>
@@ -57,48 +36,23 @@
5736
</ImportGroup>
5837
<ImportGroup Label="Shared">
5938
</ImportGroup>
60-
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62-
</ImportGroup>
63-
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65-
</ImportGroup>
6639
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
6740
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
6841
</ImportGroup>
6942
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
7043
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
7144
</ImportGroup>
7245
<PropertyGroup Label="UserMacros" />
73-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74-
<LinkIncremental>true</LinkIncremental>
75-
</PropertyGroup>
7646
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
7747
<LinkIncremental>true</LinkIncremental>
78-
</PropertyGroup>
79-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
80-
<LinkIncremental>false</LinkIncremental>
48+
<CopyLocalProjectReference>true</CopyLocalProjectReference>
49+
<CopyCppRuntimeToOutputDir>true</CopyCppRuntimeToOutputDir>
8150
</PropertyGroup>
8251
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
8352
<LinkIncremental>false</LinkIncremental>
84-
<OutDir>bin\</OutDir>
85-
<IntDir>bin\$(Configuration)\</IntDir>
53+
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
54+
<IntDir>$(Platform)\$(Configuration)\</IntDir>
8655
</PropertyGroup>
87-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
88-
<ClCompile>
89-
<PrecompiledHeader>Use</PrecompiledHeader>
90-
<WarningLevel>Level3</WarningLevel>
91-
<Optimization>Disabled</Optimization>
92-
<SDLCheck>true</SDLCheck>
93-
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94-
<ConformanceMode>true</ConformanceMode>
95-
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
96-
</ClCompile>
97-
<Link>
98-
<SubSystem>Console</SubSystem>
99-
<GenerateDebugInformation>true</GenerateDebugInformation>
100-
</Link>
101-
</ItemDefinitionGroup>
10256
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
10357
<ClCompile>
10458
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -109,34 +63,15 @@
10963
<ConformanceMode>true</ConformanceMode>
11064
<PrecompiledHeaderFile>
11165
</PrecompiledHeaderFile>
112-
<AdditionalIncludeDirectories>..\..\..\IfcPlusPlus\src</AdditionalIncludeDirectories>
66+
<AdditionalIncludeDirectories>..\..\IfcPlusPlus\src</AdditionalIncludeDirectories>
11367
</ClCompile>
11468
<Link>
11569
<SubSystem>Console</SubSystem>
11670
<GenerateDebugInformation>true</GenerateDebugInformation>
117-
<AdditionalLibraryDirectories>..\..\..\IfcPlusPlus\bin</AdditionalLibraryDirectories>
71+
<AdditionalLibraryDirectories>..\..\IfcPlusPlus\bin</AdditionalLibraryDirectories>
11872
<AdditionalDependencies>IfcPlusPlusd.lib</AdditionalDependencies>
11973
</Link>
12074
</ItemDefinitionGroup>
121-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
122-
<ClCompile>
123-
<PrecompiledHeader>Use</PrecompiledHeader>
124-
<WarningLevel>Level3</WarningLevel>
125-
<Optimization>MaxSpeed</Optimization>
126-
<FunctionLevelLinking>true</FunctionLevelLinking>
127-
<IntrinsicFunctions>true</IntrinsicFunctions>
128-
<SDLCheck>true</SDLCheck>
129-
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
130-
<ConformanceMode>true</ConformanceMode>
131-
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
132-
</ClCompile>
133-
<Link>
134-
<SubSystem>Console</SubSystem>
135-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
136-
<OptimizeReferences>true</OptimizeReferences>
137-
<GenerateDebugInformation>true</GenerateDebugInformation>
138-
</Link>
139-
</ItemDefinitionGroup>
14075
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
14176
<ClCompile>
14277
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -149,7 +84,7 @@
14984
<PreprocessorDefinitions>ENABLE_OPENMP;NDEBUG;_CONSOLE;UNICODE;WIN32;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
15085
<ConformanceMode>false</ConformanceMode>
15186
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
152-
<AdditionalIncludeDirectories>..\..\..\IfcPlusPlus\src</AdditionalIncludeDirectories>
87+
<AdditionalIncludeDirectories>..\..\IfcPlusPlus\src</AdditionalIncludeDirectories>
15388
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
15489
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
15590
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
@@ -165,7 +100,7 @@
165100
<OptimizeReferences>
166101
</OptimizeReferences>
167102
<GenerateDebugInformation>true</GenerateDebugInformation>
168-
<AdditionalLibraryDirectories>..\..\..\IfcPlusPlus\bin</AdditionalLibraryDirectories>
103+
<AdditionalLibraryDirectories>..\..\IfcPlusPlus\bin</AdditionalLibraryDirectories>
169104
<AdditionalDependencies>IfcPlusPlus.lib</AdditionalDependencies>
170105
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
171106
</Link>

examples/CreateWallAndWriteFile/CreateWallAndWriteFile.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</Filter>
1616
</ItemGroup>
1717
<ItemGroup>
18-
<ClCompile Include="CreateWallAndWriteFile.cpp">
18+
<ClCompile Include="src/main.cpp">
1919
<Filter>Source Files</Filter>
2020
</ClCompile>
2121
</ItemGroup>

examples/CreateWallAndWriteFile/CreateWallAndWriteFile.vcxproj.user

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<ShowAllFiles>true</ShowAllFiles>
55
</PropertyGroup>
66
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
7-
<LocalDebuggerEnvironment>PATH=..\..\..\IfcPlusPlus\bin%3b$(PATH)</LocalDebuggerEnvironment>
7+
<LocalDebuggerEnvironment>PATH=..\..\IfcPlusPlus\bin%3b$(PATH)</LocalDebuggerEnvironment>
88
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
99
</PropertyGroup>
1010
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
11-
<LocalDebuggerEnvironment>PATH=..\..\..\IfcPlusPlus\bin%3b$(PATH)</LocalDebuggerEnvironment>
11+
<LocalDebuggerEnvironment>PATH=..\..\IfcPlusPlus\bin%3b$(PATH)</LocalDebuggerEnvironment>
1212
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
1313
</PropertyGroup>
1414
</Project>

examples/CreateWallAndWriteFile/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <ifcpp/IFC4/include/IfcPerson.h>
3838
#include <ifcpp/IFC4/include/IfcPersonAndOrganization.h>
3939
#include <ifcpp/IFC4/include/IfcPolyline.h>
40-
#include <ifcpp/IFC4/include/IfcPolyloop.h>
40+
#include <ifcpp/IFC4/include/IfcPolyLoop.h>
4141
#include <ifcpp/IFC4/include/IfcPositiveLengthMeasure.h>
4242
#include <ifcpp/IFC4/include/IfcProductDefinitionShape.h>
4343
#include <ifcpp/IFC4/include/IfcPropertySet.h>

examples/LoadFileExampleConsole/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ IF(NOT WIN32)
1313
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
1414
ENDIF(NOT WIN32)
1515

16-
find_package(OpenMP)
16+
if(NOT DEFINED USE_OPENMP)
17+
set(USE_OPENMP True)
18+
endif()
19+
20+
if(USE_OPENMP)
21+
find_package(OpenMP)
22+
endif()
1723

1824
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/IfcPlusPlus/Debug)
1925
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/IfcPlusPlus/${CMAKE_BUILD_TYPE})

examples/SimpleViewerExampleQt/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ SET(IFCPPVIEWER_MOC_FILES
6060
src/gui/MainWindow.h
6161
src/gui/TabReadWrite.h
6262
src/gui/TabView.h
63-
src/gui/storeyShiftWidget.h
63+
src/gui/StoreyShiftWidget.h
6464
src/viewer/ViewerWidget.h
6565
)
6666

@@ -80,7 +80,7 @@ ADD_EXECUTABLE(SimpleViewerExample
8080
set_target_properties(SimpleViewerExample PROPERTIES DEBUG_POSTFIX "d")
8181

8282
target_link_libraries(SimpleViewerExample
83-
debug Carved optimized Carve
83+
debug carved optimized carve
8484
debug IfcPlusPlusd optimized IfcPlusPlus
8585
Qt5::Core
8686
Qt5::Gui

0 commit comments

Comments
 (0)