Skip to content

Commit

Permalink
Added test to make sure that we always use the <...> include form.
Browse files Browse the repository at this point in the history
  • Loading branch information
Framstag committed Jun 12, 2023
1 parent 0fc6c75 commit 840f9c9
Show file tree
Hide file tree
Showing 41 changed files with 305 additions and 137 deletions.
13 changes: 11 additions & 2 deletions OSMScout2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ set_property(SOURCE qrc_res.cpp PROPERTY SKIP_AUTOMOC ON)

add_executable(OSMScout2 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES})

target_include_directories(OSMScout2 PRIVATE "src")

target_sources(OSMScout2 PRIVATE ${TRANSLATION_TS_FILES} ${TRANSLATION_QM_FILES})

target_link_libraries(OSMScout2
Expand Down Expand Up @@ -100,7 +102,11 @@ if (QT_QML_DEBUG)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG")
endif()

set_target_properties(OSMScout2 PROPERTIES VERSION ${OSMSCOUT_LIBRARY_VERSION} SOVERSION ${OSMSCOUT_LIBRARY_VERSION} FOLDER "Tools")
set_target_properties(OSMScout2
PROPERTIES
VERSION ${OSMSCOUT_LIBRARY_VERSION}
SOVERSION ${OSMSCOUT_LIBRARY_VERSION}
FOLDER "Tools")

if(WIN32)
create_win32_tool_resource(OSMScout2)
Expand All @@ -116,7 +122,10 @@ if(OSMSCOUT_INSTALL_QT_DLL AND TARGET Qt5::windeployqt)
)
endif()

install(TARGETS OSMScout2 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(TARGETS OSMScout2
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

# install QM files to correct location - QStandardPaths::AppDataLocation / "translations"
if(APPLE)
Expand Down
2 changes: 1 addition & 1 deletion OSMScout2/src/AppSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <osmscoutclientqt/InputHandler.h>
#include <osmscoutclientqt/OSMScoutQt.h>

#include "AppSettings.h"
#include <AppSettings.h>

using namespace osmscout;

Expand Down
4 changes: 2 additions & 2 deletions OSMScout2/src/OSMScout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#include <osmscoutclientqt/OSMScoutQt.h>

// Application theming
#include "Theme.h"
#include <Theme.h>

#include "AppSettings.h"
#include <AppSettings.h>

#include <osmscout/util/Logger.h>
#include <osmscout/util/CmdLineParsing.h>
Expand Down
2 changes: 1 addition & 1 deletion OSMScout2/src/Theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "Theme.h"
#include <Theme.h>

#include <QApplication>
#include <QDebug>
Expand Down
8 changes: 7 additions & 1 deletion StyleEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ set(RESOURCE_FILES

add_executable(StyleEditor ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES})

target_include_directories(StyleEditor PRIVATE "src")

target_link_libraries(StyleEditor
OSMScout::OSMScout
OSMScout::Map
Expand All @@ -64,7 +66,11 @@ if (QT_QML_DEBUG)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG")
endif()

set_target_properties(StyleEditor PROPERTIES VERSION ${OSMSCOUT_LIBRARY_VERSION} SOVERSION ${OSMSCOUT_LIBRARY_VERSION} FOLDER "Tools")
set_target_properties(StyleEditor
PROPERTIES
VERSION ${OSMSCOUT_LIBRARY_VERSION}
SOVERSION ${OSMSCOUT_LIBRARY_VERSION}
FOLDER "Tools")

if(WIN32)
create_win32_tool_resource(StyleEditor)
Expand Down
2 changes: 1 addition & 1 deletion StyleEditor/src/FileIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "FileIO.h"
#include <FileIO.h>

#include <osmscoutclientqt/OSMScoutQt.h>

Expand Down
4 changes: 2 additions & 2 deletions StyleEditor/src/FileIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include <QQuickItem>
#include <QVector>

#include "Highlighter.h"
#include "StyleAnalyser.h"
#include <Highlighter.h>
#include <StyleAnalyser.h>

#define TMP_SUFFIX ".tmp"

Expand Down
3 changes: 1 addition & 2 deletions StyleEditor/src/Highlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "Highlighter.h"
#include <Highlighter.h>
#include <QtGui>
#include <QQuickWindow>

Highlighter::Highlighter(QTextDocument *parent)
: QSyntaxHighlighter(parent)
Expand Down
4 changes: 2 additions & 2 deletions StyleEditor/src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "MainWindow.h"
#include <MainWindow.h>

#include <osmscout/util/Logger.h>

#include <QGuiApplication>
#include "SettingsDialog.h"
#include <SettingsDialog.h>

using namespace osmscout;

Expand Down
2 changes: 1 addition & 1 deletion StyleEditor/src/SettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "SettingsDialog.h"
#include <SettingsDialog.h>

/*
#include <QDialogButtonBox>
Expand Down
2 changes: 1 addition & 1 deletion StyleEditor/src/StyleAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "StyleAnalyser.h"
#include <StyleAnalyser.h>

#include <osmscoutclientqt/DBThread.h>
#include <osmscoutclientqt/OSMScoutQt.h>
Expand Down
2 changes: 1 addition & 1 deletion StyleEditor/src/StyleAnalyser.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "Highlighter.h"
#include <Highlighter.h>

#include <osmscout/TypeConfig.h>

Expand Down
4 changes: 2 additions & 2 deletions StyleEditor/src/StyleEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#include <osmscoutclientqt/OSMScoutQt.h>

// Main Window
#include "MainWindow.h"
#include <MainWindow.h>

// Custom QML objects
#include "FileIO.h"
#include <FileIO.h>

using namespace osmscout;

Expand Down
4 changes: 4 additions & 0 deletions Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ endif()
#---- Geometry
osmscout_test_project(NAME Geometry SOURCES src/Geometry.cpp)

#---- HeaderCheck
osmscout_test_project(NAME HeaderCheck SOURCES src/HeaderCheck.cpp)
set_tests_properties(HeaderCheck PROPERTIES ENVIRONMENT "SOURCE_ROOT=${CMAKE_SOURCE_DIR}")

#---- WaterIndex
if(${OSMSCOUT_BUILD_IMPORT} AND TARGET OSMScout::Import)
osmscout_test_project(NAME WaterIndex SOURCES src/WaterIndex.cpp TARGET OSMScout::Import)
Expand Down
Loading

0 comments on commit 840f9c9

Please sign in to comment.