File tree Expand file tree Collapse file tree 7 files changed +23
-10
lines changed Expand file tree Collapse file tree 7 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_CXX_COMPILER_ID} MATCHES
29
29
endif ()
30
30
else ()
31
31
# MSVC
32
- # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14")
33
32
34
33
if (NOT DEFINED MSVC_RUNTIME_TYPE )
35
34
if (NOT WITH_TESTS )
Original file line number Diff line number Diff line change 1
- macro (BuildThirdparty TargetName ThirdpartySrcPath ThirdpartyOutFile )
1
+ macro (BuildThirdparty TargetName ThirdpartySrcPath ThirdpartyOutFile ExtraBuildOptions )
2
2
3
3
set (BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} /${TargetName}/build )
4
4
set (INST_DIR ${CMAKE_CURRENT_BINARY_DIR} /${TargetName}/install )
@@ -7,7 +7,7 @@ macro (BuildThirdparty TargetName ThirdpartySrcPath ThirdpartyOutFile)
7
7
8
8
add_custom_command (
9
9
OUTPUT ${BUILD_DIR} /CMakeCache.txt
10
- COMMAND ${CMAKE_COMMAND} ARGS -G "${CMAKE_GENERATOR} " -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX= "${INST_DIR} " -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} "${ThirdpartySrcPath} "
10
+ COMMAND ${CMAKE_COMMAND} ARGS -G "${CMAKE_GENERATOR} " -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX= "${INST_DIR} " -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} "${ThirdpartySrcPath} " ${ExtraBuildOptions}
11
11
WORKING_DIRECTORY ${BUILD_DIR}
12
12
COMMENT "Prebuild ${TargetName} library"
13
13
)
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ struct ContainerReflector
116
116
Value GetValueByIndex (int64_t idx) const override
117
117
{
118
118
auto p = m_value.begin ();
119
- std::advance (p, idx);
119
+ std::advance (p, static_cast < size_t >( idx) );
120
120
return Reflect (*p);
121
121
}
122
122
};
Original file line number Diff line number Diff line change @@ -278,8 +278,8 @@ Value CallExpression::CallGlobalRange(RenderContext& values)
278
278
279
279
size_t GetSize () const override
280
280
{
281
- size_t count = (m_stop - m_start);
282
- return count / m_step;
281
+ size_t count = static_cast < size_t > (m_stop - m_start);
282
+ return static_cast < size_t >( count / m_step) ;
283
283
}
284
284
Value GetValueByIndex (int64_t idx) const
285
285
{
@@ -304,7 +304,7 @@ Value CallExpression::CallLoopCycle(RenderContext& values)
304
304
305
305
const ValuesMap* loop = boost::get<ValuesMap>(&loopValP->second .data ());
306
306
int64_t baseIdx = boost::apply_visitor (visitors::IntegerEvaluator (), (*loop).at (" index0" ).data ());
307
- auto idx = baseIdx % m_params.posParams .size ();
307
+ auto idx = static_cast < size_t >( baseIdx % m_params.posParams .size () );
308
308
return m_params.posParams [idx]->Evaluate (values);
309
309
}
310
310
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ namespace lexertk
119
119
{
120
120
return std::isdigit (c, get_locale ());
121
121
}
122
- static bool is_letter_or_digit (const char c)
122
+ static bool is_letter_or_digit (CharT c)
123
123
{
124
124
return std::isalnum (c, get_locale ());
125
125
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ struct ValuesListAdaptorCreator : public boost::static_visitor<std::function<con
14
14
}
15
15
16
16
size_t GetSize () const override {return m_list->size ();}
17
- Value GetValueByIndex (int64_t idx) const override {return (*m_list)[idx];};
17
+ Value GetValueByIndex (int64_t idx) const override {return (*m_list)[static_cast < size_t >( idx) ];};
18
18
19
19
const ValuesList* m_list;
20
20
};
Original file line number Diff line number Diff line change @@ -5,4 +5,18 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
5
5
6
6
include (build_thirdparty )
7
7
8
- BuildThirdparty (gtest ${CMAKE_CURRENT_SOURCE_DIR} /gtest include /gmock/gmock.h )
8
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC" )
9
+ message (STATUS "######### <<<<<<<<< !!!!!!!!!!!!" )
10
+ if (MSVC_RUNTIME_TYPE STREQUAL "/MD" OR NOT MSVC_RUNTIME_TYPE )
11
+ set (GTEST_EXTRA_OPTIONS "-Dgtest_force_shared_crt=TRUE" )
12
+ else ()
13
+ set (GTEST_EXTRA_OPTIONS "-Dgtest_force_shared_crt=TRUE" )
14
+ endif ()
15
+ else ()
16
+ message (STATUS "######### <<<<<<<<< ????????" )
17
+ endif ()
18
+
19
+ message (STATUS "#### CMAKE_CXX_COMPILER_ID: '${CMAKE_CXX_COMPILER_ID} '" )
20
+ message (STATUS "#### GTEST_EXTRA_OPTIONS: ${GTEST_EXTRA_OPTIONS} " )
21
+
22
+ BuildThirdparty (gtest ${CMAKE_CURRENT_SOURCE_DIR} /gtest include /gmock/gmock.h "${GTEST_EXTRA_OPTIONS} " )
You can’t perform that action at this time.
0 commit comments