mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Remove ugly multiple definition hack
Since 00387b2a38
it is possible to construct a dummy Messages object
which does not translate at all. With the old gettext implementation, a
Messages object without a defined language would have used a language from
an environment variable. Therefore, the duplicate definition of _() is no
longer needed. This gettext removal was really a good idea!
This commit is contained in:
parent
b14b86cfd1
commit
12554c93d8
@ -678,7 +678,8 @@ check_PROGRAMS = \
|
||||
check_layout_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LAYOUT_CSS
|
||||
check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT4_CORE_LIBS) $(LIBSHLWAPI)
|
||||
# need to allow multiple definitions of _() (see dummy_functions.cpp)
|
||||
check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS) -Wl,--allow-multiple-definition
|
||||
#check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS) -Wl,--allow-multiple-definition
|
||||
check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS)
|
||||
check_layout_SOURCES = \
|
||||
insets/InsetLayout.cpp \
|
||||
Color.cpp \
|
||||
|
@ -11,8 +11,6 @@ namespace lyx {
|
||||
// Keep the linker happy on Windows
|
||||
void lyx_exit(int) {}
|
||||
|
||||
docstring const _(string const & s) { return from_ascii(s); }
|
||||
|
||||
// Dummy language support
|
||||
Messages const & getGuiMessages()
|
||||
{
|
||||
|
@ -15,14 +15,6 @@ endforeach()
|
||||
add_definitions(-DNO_LAYOUT_CSS)
|
||||
add_executable(check_layout ${check_layout_SOURCES})
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--allow-multiple-definition")
|
||||
elseif(MSVC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
||||
else()
|
||||
message(STATUS "Allow multiple definitions for cxx-compiler ${CMAKE_CXX_COMPILER_ID} not handled")
|
||||
endif()
|
||||
|
||||
target_link_libraries(check_layout support
|
||||
${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
|
||||
${ZLIB_LIBRARY} ${ICONV_LIBRARY})
|
||||
|
Loading…
Reference in New Issue
Block a user