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
2929 endif ()
3030else ()
3131 # MSVC
32- # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14")
3332
3433 if (NOT DEFINED MSVC_RUNTIME_TYPE)
3534 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 )
22
33 set (BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} /${TargetName} /build )
44 set (INST_DIR ${CMAKE_CURRENT_BINARY_DIR} /${TargetName} /install )
@@ -7,7 +7,7 @@ macro (BuildThirdparty TargetName ThirdpartySrcPath ThirdpartyOutFile)
77
88 add_custom_command (
99 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}
1111 WORKING_DIRECTORY ${BUILD_DIR}
1212 COMMENT "Prebuild ${TargetName} library"
1313 )
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ struct ContainerReflector
116116 Value GetValueByIndex (int64_t idx) const override
117117 {
118118 auto p = m_value.begin ();
119- std::advance (p, idx);
119+ std::advance (p, static_cast < size_t >( idx) );
120120 return Reflect (*p);
121121 }
122122 };
Original file line number Diff line number Diff line change @@ -278,8 +278,8 @@ Value CallExpression::CallGlobalRange(RenderContext& values)
278278
279279 size_t GetSize () const override
280280 {
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) ;
283283 }
284284 Value GetValueByIndex (int64_t idx) const
285285 {
@@ -304,7 +304,7 @@ Value CallExpression::CallLoopCycle(RenderContext& values)
304304
305305 const ValuesMap* loop = boost::get<ValuesMap>(&loopValP->second .data ());
306306 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 () );
308308 return m_params.posParams [idx]->Evaluate (values);
309309}
310310
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ namespace lexertk
119119 {
120120 return std::isdigit (c, get_locale ());
121121 }
122- static bool is_letter_or_digit (const char c)
122+ static bool is_letter_or_digit (CharT c)
123123 {
124124 return std::isalnum (c, get_locale ());
125125 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ struct ValuesListAdaptorCreator : public boost::static_visitor<std::function<con
1414 }
1515
1616 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) ];};
1818
1919 const ValuesList* m_list;
2020 };
Original file line number Diff line number Diff line change @@ -5,4 +5,18 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
55
66include (build_thirdparty)
77
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