Skip to content

Commit a301a45

Browse files
committed
Remove dllexports
Always build with highest visual studio and thread warning as error
1 parent 2ef6841 commit a301a45

File tree

7 files changed

+25
-71
lines changed

7 files changed

+25
-71
lines changed

cmake/env.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra")
8484
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MCC_WARNING_FLAGS_SPACED}")
8585
endif()
8686

87+
if(MSVC)
88+
# Force to always compile with W4
89+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX")
90+
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
91+
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
92+
endif()
93+
endif()
94+
8795
add_compile_options("$<$<CONFIG:DEBUG>:-DDEBUG>")
8896

8997
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

source/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ add_library(modern.cpp.core
3838
Double.h
3939
Exec.cpp
4040
Exec.h
41-
ModernCppCore.h
4241
Serial.cpp
4342
Serial.h
4443
Timing.cpp

source/CPU.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
/* stl header */
3434
#include <array>
3535

36-
/* local header */
37-
#include "ModernCppCore.h"
38-
3936
/**
4037
* @brief VX (VX Apps) Namespace.
4138
*/
@@ -45,7 +42,7 @@ namespace VX {
4542
* @brief The CPU class for receiving information about the CPU.
4643
* @author Florian Becker <fb\@vxapps.com> (VX Apps)
4744
*/
48-
class MODERNCPPCORE_EXPORT CPU {
45+
class CPU {
4946

5047
public:
5148
/**

source/Double.h

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030

3131
#pragma once
3232

33-
/* local header */
34-
#include "ModernCppCore.h"
35-
3633
/**
3734
* @brief VX (VX Apps) Namespace.
3835
*/
@@ -44,8 +41,8 @@ namespace VX {
4441
* @param _right The second value.
4542
* @return True, if _left and _right are equal - otherwise false.
4643
*/
47-
bool MODERNCPPCORE_EXPORT doubleEquals( double _left,
48-
double _right );
44+
bool doubleEquals( double _left,
45+
double _right );
4946

5047
/**
5148
* @brief Is _left less _right or _orEqual? Rounded by default to second places.
@@ -55,9 +52,9 @@ namespace VX {
5552
* @return True, if _left less _right or _left and _right are equal and
5653
* _orEqual is set to true - otherwise false.
5754
*/
58-
bool MODERNCPPCORE_EXPORT doubleLess( double _left,
59-
double _right,
60-
bool _orEqual = false );
55+
bool doubleLess( double _left,
56+
double _right,
57+
bool _orEqual = false );
6158

6259
/**
6360
* @brief Is _left greater _right or _orEqual? Rounded by default to second places.
@@ -67,9 +64,9 @@ namespace VX {
6764
* @return True, if _left greater _right or _left and _right are equal and
6865
* _orEqual is set to true - otherwise false.
6966
*/
70-
bool MODERNCPPCORE_EXPORT doubleGreater( double _left,
71-
double _right,
72-
bool _orEqual = false );
67+
bool doubleGreater( double _left,
68+
double _right,
69+
bool _orEqual = false );
7370

7471
/**
7572
* @brief Is _value between _min and _max or _orEqual.
@@ -79,17 +76,17 @@ namespace VX {
7976
* @param _orEqual Is _value == _min or _value == _max
8077
* @return True, if _value is between _min and _max _orEqual - otherwise false.
8178
*/
82-
bool MODERNCPPCORE_EXPORT doubleBetween( double _value,
83-
double _min,
84-
double _max,
85-
bool _orEqual = false );
79+
bool doubleBetween( double _value,
80+
double _min,
81+
double _max,
82+
bool _orEqual = false );
8683

8784
/**
8885
* @brief Round a double _value by _places.
8986
* @param _value Value to round.
9087
* @param _places Places to round.
9188
* @return The rounded value.
9289
*/
93-
double MODERNCPPCORE_EXPORT doubleRound( double _value,
94-
std::size_t _places = 2 );
90+
double doubleRound( double _value,
91+
std::size_t _places = 2 );
9592
}

source/Exec.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
/* stl header */
3434
#include <string>
3535

36-
/* local header */
37-
#include "ModernCppCore.h"
38-
3936
/**
4037
* @brief VX (VX Apps) Namespace.
4138
*/
@@ -46,5 +43,5 @@ namespace VX {
4643
* @param _command Command to run.
4744
* @return Return the stdout output.
4845
*/
49-
std::string MODERNCPPCORE_EXPORT exec( const std::string &_command );
46+
std::string exec( const std::string &_command );
5047
}

source/ModernCppCore.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

source/Timing.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
#include <chrono>
3838
#include <string>
3939

40-
/* local header */
41-
#include "ModernCppCore.h"
42-
4340
/**
4441
* @brief VX (VX Apps) Namespace.
4542
*/
@@ -49,7 +46,7 @@ namespace VX {
4946
* @brief Print CPU and System Time on called block.
5047
* @author Florian Becker <fb\@vxapps.com> (VX Apps)
5148
*/
52-
class MODERNCPPCORE_EXPORT Timing {
49+
class Timing {
5350

5451
public:
5552
/**

0 commit comments

Comments
 (0)