Skip to content

Commit 86f129a

Browse files
committed
Merge branch 'master' of https://github.com/LSTS/dune
2 parents bdd167f + 03c4030 commit 86f129a

File tree

4 files changed

+47
-31
lines changed

4 files changed

+47
-31
lines changed

cmake/Compiler.cmake

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -150,25 +150,33 @@ macro(dune_probe_cxx)
150150
if(DUNE_CXX_MICROSOFT)
151151
set(DUNE_CXX_NAME "Microsoft")
152152

153-
if(MSVC60)
153+
# https://learn.microsoft.com/en-us/cpp/overview/compiler-versions
154+
# https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
155+
if(MSVC_VERSION EQUAL 1200)
154156
message(FATAL_ERROR "Visual Studio 6.0 is not supported")
155-
elseif(MSVC14)
156-
set(msv_version "2015")
157-
elseif(MSVC12)
158-
set(msv_version "2013")
159-
elseif(MSVC11)
160-
set(msv_version "2012")
161-
elseif(MSVC10)
162-
set(msv_version "2010")
163-
elseif(MSVC90)
164-
set(msv_version "2008")
165-
elseif(MSVC80)
166-
set(msv_version "2005")
167-
elseif(MSVC71)
168-
set(msv_version "2003")
169-
elseif(MSVC70)
157+
elseif(MSVC_VERSION EQUAL 1300)
170158
set(msv_version "2002")
171-
endif(MSVC60)
159+
elseif(MSVC_VERSION EQUAL 1310)
160+
set(msv_version "2003")
161+
elseif(MSVC_VERSION EQUAL 1400)
162+
set(msv_version "2005")
163+
elseif(MSVC_VERSION EQUAL 1500)
164+
set(msv_version "2008")
165+
elseif(MSVC_VERSION EQUAL 1600)
166+
set(msv_version "2010")
167+
elseif(MSVC_VERSION EQUAL 1700)
168+
set(msv_version "2012")
169+
elseif(MSVC_VERSION EQUAL 1800)
170+
set(msv_version "2013")
171+
elseif(MSVC_VERSION EQUAL 1900)
172+
set(msv_version "2015")
173+
elseif(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920)
174+
set(msv_version "2017")
175+
elseif(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930)
176+
set(msv_version "2019")
177+
elseif(MSVC_VERSION GREATER_EQUAL 1930)
178+
set(msv_version "2022")
179+
endif()
172180

173181
set(DUNE_CXX_CANONICAL "vs${msv_version}")
174182
set(DUNE_CXX_FLAGS "${DUNE_CXX_FLAGS} /wd4251 /wd4244 /wd4267 /wd4800 /wd4805 /wd4305 /wd4244 /wd4996")

programs/tests/test_AtomicInteger.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939

4040
using namespace DUNE::Concurrency;
4141

42+
static constexpr int thread_num = 10;
43+
4244
class TestIncrement: public Thread
4345
{
4446
private:
@@ -65,7 +67,6 @@ main(void)
6567

6668
AtomicInteger aint(0);
6769
long target = 10000;
68-
int thread_num = 10;
6970

7071
TestIncrement* tests[thread_num];
7172
for (int i = 0; i < thread_num; i++)

src/Sensors/VantagePro2/Parser.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ namespace Sensors
101101
#ifdef __GNUC__
102102
struct __attribute__((__packed__)) LOOPData
103103
#elif defined(_MSC_VER)
104-
__pragma(pack(push, 1)) struct LOOPData __pragma(pack(pop))
104+
__pragma(pack(push, 1)) struct LOOPData
105105
#endif
106106
{
107107
uint8_t Ack; // Acknowledge char
@@ -151,6 +151,9 @@ namespace Sensors
151151
uint8_t CR; // '\r' 0x0d
152152
uint16_t WCRC; // CRC check bytes (CCITT-16 standard) 2bytes
153153
};
154+
#if defined(_MSC_VER)
155+
__pragma(pack(pop))
156+
#endif
154157

155158
//! DAVIS' LOOP data packet data.
156159
LOOPData m_LOOPData;

src/Vision/PointGrey/Task.cmake

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
if(DUNE_SYS_HAS___ARM_ARCH_7A__)
1+
if(POINTGREY)
2+
if(DUNE_SYS_HAS___ARM_ARCH_7A__)
3+
if(NOT DUNE_SYS_HAS_OPENCV)
4+
set(TASK_ENABLED FALSE)
5+
endif(NOT DUNE_SYS_HAS_OPENCV)
26

3-
if(NOT DUNE_SYS_HAS_OPENCV)
4-
set(TASK_ENABLED FALSE)
5-
endif(NOT DUNE_SYS_HAS_OPENCV)
6-
7-
if(NOT DUNE_SYS_HAS_EXIV2)
8-
set(TASK_ENABLED FALSE)
9-
endif(NOT DUNE_SYS_HAS_EXIV2)
7+
if(NOT DUNE_SYS_HAS_EXIV2)
8+
set(TASK_ENABLED FALSE)
9+
endif(NOT DUNE_SYS_HAS_EXIV2)
1010

11-
if(NOT DUNE_SYS_HAS_FLYCAPTURE)
11+
if(NOT DUNE_SYS_HAS_FLYCAPTURE)
12+
set(TASK_ENABLED FALSE)
13+
endif(NOT DUNE_SYS_HAS_FLYCAPTURE)
14+
elseif(DUNE_OS_WINDOWS)
15+
set(TASK_ENABLED FALSE)
16+
endif(DUNE_SYS_HAS___ARM_ARCH_7A__)
17+
else()
1218
set(TASK_ENABLED FALSE)
13-
endif(NOT DUNE_SYS_HAS_FLYCAPTURE)
14-
15-
endif(DUNE_SYS_HAS___ARM_ARCH_7A__)
19+
endif(POINTGREY)
1620

1721
set(TASK_LICENSE "Proprietary")

0 commit comments

Comments
 (0)