Skip to content

Commit aa2136c

Browse files
U-tub\kreijstalU-tub\kreijstal
U-tub\kreijstal
authored and
U-tub\kreijstal
committed
It compiles with clang on windows as well
1 parent 050e37f commit aa2136c

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

src/ode/ode/src/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ void dxWorldProcessMemArena::FreeMemArena (dxWorldProcessMemArena *arena)
646646
size_t dxWorldProcessMemArena::AdjustArenaSizeForReserveRequirements(size_t arenareq, float rsrvfactor, unsigned rsrvminimum)
647647
{
648648
float scaledarena = arenareq * rsrvfactor;
649-
size_t adjustedarena = (scaledarena < SIZE_MAX) ? (size_t)scaledarena : SIZE_MAX;
649+
size_t adjustedarena = (scaledarena < (float)SIZE_MAX) ? (size_t)scaledarena : SIZE_MAX;
650650
size_t boundedarena = (adjustedarena > rsrvminimum) ? adjustedarena : (size_t)rsrvminimum;
651651
return dEFFICIENT_SIZE(boundedarena);
652652
}

src/webots/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ if(WIN32)
1515
add_definitions(-DUNICODE -D_UNICODE)
1616
endif()
1717
# Set visibility settings globally
18-
add_compile_options(-fvisibility=default -fno-gnu-unique)
18+
add_compile_options(-fvisibility=default)
19+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
20+
add_compile_options(-fno-gnu-unique)
21+
endif()
1922

2023
# Add cmake modules
2124
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

src/webots/nodes/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ target_compile_options(nodes_lib
66
PUBLIC
77
-frtti
88
-fvisibility=default
9-
-fno-gnu-unique
109
)
10+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
11+
add_compile_options(-fno-gnu-unique)
12+
endif()
1113

1214
# Find STB headers
1315
find_path(STB_INCLUDE_DIR

src/webots/nodes/utils/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ target_compile_options(nodes_utils_lib
1313
PUBLIC
1414
-frtti
1515
-fvisibility=default
16-
-fno-gnu-unique
1716
)
17+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
18+
add_compile_options(-fno-gnu-unique)
19+
endif()
1820

1921
# Set position independent code
2022
set_property(TARGET nodes_utils_lib PROPERTY POSITION_INDEPENDENT_CODE ON)

src/webots/nodes/utils/WbVirtualRealityHeadset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include <wren/viewport.h>
4242

4343
#include <openvr.h>
44-
#include <openvr_capi.h>
44+
//#include <openvr_capi.h>
4545

4646
#include <QtCore/QFile>
4747
#include <QtCore/QStandardPaths>

src/webots/vrml/WbNodeReader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ WbNode *WbNodeReader::createNode(const QString &modelName, WbTokenizer *tokenize
109109
tokenizer->reportError(QObject::tr("Skipped unknown '%1' node or PROTO").arg(modelName));
110110
else
111111
// qDebug() << "WbNodeReader::createNode: Cannot report error, tokenizer is NULL for unknown model:" << modelName;
112-
return NULL;
112+
return NULL;
113+
return NULL;
113114
}
114115

115116
WbNode *WbNodeReader::readNode(WbTokenizer *tokenizer, const QString &worldPath) {

0 commit comments

Comments
 (0)