From 6f16814d3b9f51907cadfb97282d95ee769cb6fe Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Tue, 14 May 2013 18:41:33 +0200 Subject: [PATCH] Fix check_layout and adhere casing to other tests - Fixes cases such that it is the same as check_convert, check_filetools, check_listrings, - Makes the compilation work on MSVC --- src/Makefile.am | 16 ++++++++-------- src/tests/CMakeLists.txt | 19 ++++++++++--------- .../{check_Layout.cpp => check_layout.cpp} | 0 src/tests/{test_Layout => test_layout} | 0 4 files changed, 18 insertions(+), 17 deletions(-) rename src/tests/{check_Layout.cpp => check_layout.cpp} (100%) rename src/tests/{test_Layout => test_layout} (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 780b7102ff..761c8e4291 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -671,20 +671,20 @@ endif ############################## Tests ################################## EXTRA_DIST += \ - tests/test_Layout + tests/test_layout TESTS = \ - tests/test_Layout + tests/test_layout check_PROGRAMS = \ - check_Layout + check_layout -check_Layout_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LAYOUT_CSS -check_Layout_LDADD = support/liblyxsupport.a $(INTLLIBS) $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT4_CORE_LIBS) $(LIBSHLWAPI) +check_layout_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LAYOUT_CSS +check_layout_LDADD = support/liblyxsupport.a $(INTLLIBS) $(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_SOURCES = \ +check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS) -Wl,--allow-multiple-definition +check_layout_SOURCES = \ insets/InsetLayout.cpp \ Color.cpp \ Counters.cpp \ @@ -697,7 +697,7 @@ check_Layout_SOURCES = \ ModuleList.cpp \ Spacing.cpp \ TextClass.cpp \ - tests/check_Layout.cpp \ + tests/check_layout.cpp \ support/tests/boost.cpp \ support/tests/dummy_functions.cpp diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 3393b1849e..f78913752e 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -4,33 +4,34 @@ # Copyright (c) 2013 Kornel Benko kornel@lyx.org # -set(check_Layout_SOURCES) +set(check_layout_SOURCES) foreach(_f insets/InsetLayout.cpp Color.cpp Counters.cpp Floating.cpp FloatList.cpp FontInfo.cpp Layout.cpp LayoutFile.cpp Lexer.cpp - ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_Layout.cpp + ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_layout.cpp support/tests/boost.cpp support/tests/dummy_functions.cpp) - list(APPEND check_Layout_SOURCES "${TOP_SRC_DIR}/src/${_f}") + list(APPEND check_layout_SOURCES "${TOP_SRC_DIR}/src/${_f}") endforeach() add_definitions(-DNO_LAYOUT_CSS) -add_executable(check_Layout ${check_Layout_SOURCES}) +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(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") +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 ${QT_QTMAIN_LIBRARY}) -add_dependencies(lyx_run_tests check_Layout) +target_link_libraries(check_layout support ${QT_QTMAIN_LIBRARY} ${intl_link}) +add_dependencies(lyx_run_tests check_layout) +set_target_properties(check_layout PROPERTIES FOLDER "tests/src") file(GLOB layout_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" "${TOP_SRC_DIR}/lib/layouts/*.layout") list(SORT layout_files) foreach(bns ${layout_files}) string(REPLACE ".layout" "" bn ${bns}) - add_test(NAME "check_Layout/${bns}" - COMMAND check_Layout "${TOP_SRC_DIR}/lib/layouts/${bn}") + add_test(NAME "check_layout/${bns}" + COMMAND check_layout "${TOP_SRC_DIR}/lib/layouts/${bn}") endforeach() diff --git a/src/tests/check_Layout.cpp b/src/tests/check_layout.cpp similarity index 100% rename from src/tests/check_Layout.cpp rename to src/tests/check_layout.cpp diff --git a/src/tests/test_Layout b/src/tests/test_layout similarity index 100% rename from src/tests/test_Layout rename to src/tests/test_layout -- 2.39.5