mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
remove some msvc warnings
* src/mathed/InsetMathNest.C : unreachable code * src/aspell_local.h : aspell is a Clibrary, no class keyword available * src/texrow.h : could not generate standard constructor * development/cmake/CMakeLists.txt : - disable same warnings - all size_t/int related warnings are disabled git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16446 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ce0b071c94
commit
45e7e717d4
@ -95,12 +95,6 @@ message("----- PROGRAM_SUFFIX: ${PROGRAM_SUFFIX}")
|
|||||||
message("----- LOCALEDIR : ${LOCALEDIR}")
|
message("----- LOCALEDIR : ${LOCALEDIR}")
|
||||||
message("")
|
message("")
|
||||||
|
|
||||||
|
|
||||||
# create config.h
|
|
||||||
include(ConfigureChecks.cmake)
|
|
||||||
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
|
|
||||||
|
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
# disable checked iterators for msvc release builds to get maximum speed
|
# disable checked iterators for msvc release builds to get maximum speed
|
||||||
@ -111,7 +105,7 @@ add_definitions(-DBOOST_USER_CONFIG="<config.h>")
|
|||||||
|
|
||||||
if(MSVC AND NOT disable-pch)
|
if(MSVC AND NOT disable-pch)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
|
configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/config.C.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_pch.C)
|
configure_file(${CMAKE_SOURCE_DIR}/config.C.cmake ${CMAKE_BINARY_DIR}/config_pch.C)
|
||||||
macro(lyx_add_msvc_pch name_)
|
macro(lyx_add_msvc_pch name_)
|
||||||
SET_SOURCE_FILES_PROPERTIES(${${name_}_sources} PROPERTIES COMPILE_FLAGS "/Yuconfig.h /Fp\$(IntDir)/config.pch")
|
SET_SOURCE_FILES_PROPERTIES(${${name_}_sources} PROPERTIES COMPILE_FLAGS "/Yuconfig.h /Fp\$(IntDir)/config.pch")
|
||||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/config_pch.C PROPERTIES COMPILE_FLAGS "/Ycconfig.h /Fp\$(IntDir)/config.pch")
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/config_pch.C PROPERTIES COMPILE_FLAGS "/Ycconfig.h /Fp\$(IntDir)/config.pch")
|
||||||
@ -121,7 +115,6 @@ if(MSVC AND NOT disable-pch)
|
|||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
|
||||||
|
|
||||||
else(MSVC AND NOT disable-pch)
|
else(MSVC AND NOT disable-pch)
|
||||||
set(disable-pch TRUE CACHE TYPE STRING)
|
set(disable-pch TRUE CACHE TYPE STRING)
|
||||||
macro(lyx_add_msvc_pch)
|
macro(lyx_add_msvc_pch)
|
||||||
@ -130,6 +123,7 @@ endif(MSVC AND NOT disable-pch)
|
|||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
if(WALL)
|
if(WALL)
|
||||||
|
set(WALL 1 CACHE TYPE STRING FORCE)
|
||||||
set(DISABLEWALL 0 CACHE TYPE STRING FORCE)
|
set(DISABLEWALL 0 CACHE TYPE STRING FORCE)
|
||||||
else(WALL)
|
else(WALL)
|
||||||
set(DISABLEWALL 1 CACHE TYPE STRING FORCE)
|
set(DISABLEWALL 1 CACHE TYPE STRING FORCE)
|
||||||
@ -155,7 +149,7 @@ if(MSVC)
|
|||||||
# add here warnings which should produce an error /weXXXX
|
# add here warnings which should produce an error /weXXXX
|
||||||
SET(MSVC_W_ERROR "/we4101 /we4189")
|
SET(MSVC_W_ERROR "/we4101 /we4189")
|
||||||
# add here warnings which should be disabled /wdXXXX
|
# add here warnings which should be disabled /wdXXXX
|
||||||
SET(MSVC_W_DISABLE "/wd4800 /wd4996 /wd4311 /wd4312 /wd4505")
|
SET(MSVC_W_DISABLE "/wd4800 /wd4996 /wd4311 /wd4312 /wd4505 /wd4267 /wd4512 /wd4245 /wd4127")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
||||||
@ -170,7 +164,7 @@ if(MSVC)
|
|||||||
# add here warnings which should produce an error /weXXXX
|
# add here warnings which should produce an error /weXXXX
|
||||||
SET(MSVC_W_ERROR "/we4101 /we4189")
|
SET(MSVC_W_ERROR "/we4101 /we4189")
|
||||||
# add here warnings which should be disabled /wdXXXX
|
# add here warnings which should be disabled /wdXXXX
|
||||||
SET(MSVC_W_DISABLE "/wd4800 /wd4996")
|
SET(MSVC_W_DISABLE "/wd4800 /wd4996 /wd4267")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
|
||||||
@ -185,6 +179,9 @@ if(MSVC)
|
|||||||
|
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
|
# create config.h
|
||||||
|
include(ConfigureChecks.cmake)
|
||||||
|
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
|
||||||
|
|
||||||
#TODO: insource is not the best place
|
#TODO: insource is not the best place
|
||||||
configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in
|
configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
class AspellSpeller;
|
struct AspellSpeller;
|
||||||
class AspellStringEnumeration;
|
struct AspellStringEnumeration;
|
||||||
class AspellCanHaveError;
|
struct AspellCanHaveError;
|
||||||
class AspellConfig;
|
struct AspellConfig;
|
||||||
|
|
||||||
namespace lyx {
|
namespace lyx {
|
||||||
|
|
||||||
|
@ -860,9 +860,11 @@ void InsetMathNest::doDispatch(LCursor & cur, FuncRequest & cmd)
|
|||||||
else
|
else
|
||||||
handleFont(cur, cmd.argument(), "mathbb");
|
handleFont(cur, cmd.argument(), "mathbb");
|
||||||
break;
|
break;
|
||||||
//case LFUN_FONT_FREE_APPLY:
|
/*
|
||||||
|
case LFUN_FONT_FREE_APPLY:
|
||||||
handleFont(cur, cmd.argument(), "textrm");
|
handleFont(cur, cmd.argument(), "textrm");
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
case LFUN_FONT_DEFAULT:
|
case LFUN_FONT_DEFAULT:
|
||||||
handleFont(cur, cmd.argument(), "textnormal");
|
handleFont(cur, cmd.argument(), "textnormal");
|
||||||
break;
|
break;
|
||||||
|
@ -79,6 +79,7 @@ public:
|
|||||||
return rownumber_;
|
return rownumber_;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
RowItem();
|
||||||
int id_;
|
int id_;
|
||||||
int pos_;
|
int pos_;
|
||||||
int rownumber_;
|
int rownumber_;
|
||||||
|
Loading…
Reference in New Issue
Block a user