Check for C11, use pragma once
This commit is contained in:
parent
a7ecaccc88
commit
ab0c586b25
@ -9,6 +9,15 @@ project(Tyro)
|
|||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/include)
|
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
# C11, please
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
CHECK_C_COMPILER_FLAG("-std=c11" COMPILER_SUPPORTS_C11)
|
||||||
|
if (COMPILER_SUPPORTS_C11)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
|
||||||
|
else()
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||||
|
endif()
|
||||||
|
|
||||||
# C++11, please
|
# C++11, please
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
sonar.projectKey=tyro
|
sonar.projectKey=tyro
|
||||||
sonar.projectName=tyro
|
sonar.projectName=Tyro
|
||||||
sonar.projectVersion=1.0.0
|
sonar.projectVersion=1.0.0
|
||||||
sonar.sources=src
|
sonar.sources=src
|
||||||
sonar.language=c++
|
sonar.language=c++
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
* Created on April 6, 2015, 2:22 PM
|
* Created on April 6, 2015, 2:22 PM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SFTP_H
|
#pragma once
|
||||||
#define SFTP_H
|
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
|
||||||
@ -52,6 +51,3 @@ private:
|
|||||||
void ssh_connect();
|
void ssh_connect();
|
||||||
void sftp_connect();
|
void sftp_connect();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SFTP_H */
|
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* A common header for global includes
|
* A common header for global includes
|
||||||
*/
|
*/
|
||||||
#ifndef TYRO_COMMON_H
|
#pragma once
|
||||||
#define TYRO_COMMON_H
|
|
||||||
|
|
||||||
// C++ Standard Lib includes
|
// C++ Standard Lib includes
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -26,6 +25,3 @@ typedef Json::Writer JsonWriter;
|
|||||||
typedef map<string, int> StringConstMap;
|
typedef map<string, int> StringConstMap;
|
||||||
typedef map<string, string> StringMap;
|
typedef map<string, string> StringMap;
|
||||||
typedef vector<string> StringVector;
|
typedef vector<string> StringVector;
|
||||||
|
|
||||||
#endif // TYRO_COMMON_H
|
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Miscellaneous Program-specific definitions
|
* Miscellaneous Program-specific definitions
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
#ifndef DEFINITIONS_H
|
|
||||||
#define DEFINITIONS_H
|
|
||||||
|
|
||||||
// Application config
|
// Application config
|
||||||
const wxString APP_NAME = "Tyro";
|
const wxString APP_NAME = "Tyro";
|
||||||
@ -137,6 +135,3 @@ const wxString TYRO_FILE_SAVE_WILDCARDS =
|
|||||||
"SQL (*.sql)|*.sql|"
|
"SQL (*.sql)|*.sql|"
|
||||||
"Text (*.txt)|*.txt|"
|
"Text (*.txt)|*.txt|"
|
||||||
"Yaml (.yml,*.yaml)| *.yml;*.yaml";
|
"Yaml (.yml,*.yaml)| *.yml;*.yaml";
|
||||||
|
|
||||||
#endif /* DEFINITIONS_H */
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef TYRO_CONFIG_H
|
#pragma once
|
||||||
#define TYRO_CONFIG_H
|
|
||||||
|
|
||||||
#include "src/common.h"
|
#include "src/common.h"
|
||||||
|
|
||||||
@ -13,7 +12,3 @@ private:
|
|||||||
JsonValue default_root;
|
JsonValue default_root;
|
||||||
JsonReader reader;
|
JsonReader reader;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* TYRO_CONFIG_H */
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef TYRO_LANG_CONFIG_H
|
#pragma once
|
||||||
#define TYRO_LANG_CONFIG_H
|
|
||||||
|
|
||||||
#include "src/wx_common.h"
|
#include "src/wx_common.h"
|
||||||
#include "src/settings/Config.h"
|
#include "src/settings/Config.h"
|
||||||
@ -20,5 +19,3 @@ private:
|
|||||||
string lang;
|
string lang;
|
||||||
StringMap reverseMap;
|
StringMap reverseMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Theme manager
|
* Theme manager
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
#ifndef TYRO_THEME_CONFIG_H
|
|
||||||
#define TYRO_THEME_CONFIG_H
|
|
||||||
|
|
||||||
#include "src/wx_common.h"
|
#include "src/wx_common.h"
|
||||||
#include "src/settings/Config.h"
|
#include "src/settings/Config.h"
|
||||||
@ -20,5 +18,3 @@ private:
|
|||||||
JsonValue current_theme;
|
JsonValue current_theme;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* TYRO_THEME_CONFIG_H */
|
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#ifndef TYROEDIT_PANE_H
|
#pragma once
|
||||||
#define TYROEDIT_PANE_H
|
|
||||||
|
|
||||||
#include "src/widgets/widget.h"
|
#include "src/widgets/widget.h"
|
||||||
#include "src/settings/LangConfig.h"
|
#include "src/settings/LangConfig.h"
|
||||||
#include "src/settings/ThemeConfig.h"
|
#include "src/settings/ThemeConfig.h"
|
||||||
@ -36,5 +34,3 @@ protected:
|
|||||||
void SetTheme(string theme_name);
|
void SetTheme(string theme_name);
|
||||||
void _ApplyTheme(JsonValue &lexer_map);
|
void _ApplyTheme(JsonValue &lexer_map);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TYRODOC_FRAME_H
|
|
||||||
|
@ -71,11 +71,6 @@ void FilePane::CreateTree(const wxString &path, wxTreeListItem &root)
|
|||||||
{
|
{
|
||||||
wxFileName fname(filename);
|
wxFileName fname(filename);
|
||||||
|
|
||||||
/*if (fname.IsRelative())
|
|
||||||
{
|
|
||||||
fname.MakeAbsolute();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// For loose files, just add directly to the tree
|
// For loose files, just add directly to the tree
|
||||||
if (fname.GetDirCount() == 1)
|
if (fname.GetDirCount() == 1)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef TYRO_FILE_PANE_H
|
#pragma once
|
||||||
#define TYRO_FILE_PANE_H
|
|
||||||
|
|
||||||
#include "src/widgets/widget.h"
|
#include "src/widgets/widget.h"
|
||||||
|
|
||||||
@ -23,5 +22,3 @@ private:
|
|||||||
void CreateTree(const wxString &path, wxTreeListItem &root);
|
void CreateTree(const wxString &path, wxTreeListItem &root);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* TYRO_FILE_PANE_H */
|
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Main Application Frame
|
* Main Application Frame
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
#ifndef TYROMAIN_H
|
|
||||||
#define TYROMAIN_H
|
|
||||||
|
|
||||||
#include "src/widgets/TyroMenu.h"
|
#include "src/widgets/TyroMenu.h"
|
||||||
#include "src/widgets/EditPane.h"
|
#include "src/widgets/EditPane.h"
|
||||||
@ -55,6 +53,3 @@ class MainFrame: public wxFrame
|
|||||||
void OnQuit(wxCommandEvent &event);
|
void OnQuit(wxCommandEvent &event);
|
||||||
void OnAbout(wxCommandEvent &event);
|
void OnAbout(wxCommandEvent &event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // TYROMAIN_H
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Preference Panes
|
* Preference Panes
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
#ifndef TYRO_PREF_PANE_H
|
|
||||||
#define TYRO_PREF_PANE_H
|
|
||||||
|
|
||||||
#include "src/widgets/widget.h"
|
#include "src/widgets/widget.h"
|
||||||
|
|
||||||
@ -17,5 +15,3 @@ protected:
|
|||||||
wxPreferencesEditor *pref_window = nullptr;
|
wxPreferencesEditor *pref_window = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* TYRO_PREF_PANE_H */
|
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Wrapper around wxAuiNotebook
|
* Wrapper around wxAuiNotebook
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
#ifndef TABCONTAINER_H
|
|
||||||
#define TABCONTAINER_H
|
|
||||||
|
|
||||||
#include "src/widgets/TyroMenu.h"
|
#include "src/widgets/TyroMenu.h"
|
||||||
#include "src/widgets/EditPane.h"
|
#include "src/widgets/EditPane.h"
|
||||||
@ -37,5 +35,3 @@ private:
|
|||||||
void OnTabContextMenu(wxAuiNotebookEvent &event);
|
void OnTabContextMenu(wxAuiNotebookEvent &event);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* TABCONTAINER_H */
|
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Main Menu class
|
* Main Menu class
|
||||||
*/
|
*/
|
||||||
#ifndef TYRO_MENU_H
|
#pragma once
|
||||||
#define TYRO_MENU_H
|
|
||||||
|
|
||||||
#include "src/widgets/widget.h"
|
#include "src/widgets/widget.h"
|
||||||
|
|
||||||
@ -23,6 +22,3 @@ private:
|
|||||||
void SetupLangMenu();
|
void SetupLangMenu();
|
||||||
void EnableEntireMenu(size_t menuId, wxMenu *menu, bool enable);
|
void EnableEntireMenu(size_t menuId, wxMenu *menu, bool enable);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* TYRO_MENU_H */
|
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Common header for widgets
|
* Common header for widgets
|
||||||
*/
|
*/
|
||||||
#ifndef TYRO_WIDGET_H
|
#pragma once
|
||||||
#define TYRO_WIDGET_H
|
|
||||||
|
|
||||||
// Common wxWidgets stuff
|
// Common wxWidgets stuff
|
||||||
#include "src/wx_common.h"
|
#include "src/wx_common.h"
|
||||||
@ -18,6 +17,3 @@
|
|||||||
#include <wx/treelist.h>
|
#include <wx/treelist.h>
|
||||||
#include <wx/preferences.h>
|
#include <wx/preferences.h>
|
||||||
|
|
||||||
|
|
||||||
#endif /* TYRO_WIDGET_H */
|
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Common header for widget classes
|
* Common header for widget classes
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
#ifndef WX_COMMON_H
|
|
||||||
#define WX_COMMON_H
|
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
@ -54,6 +52,3 @@ static inline bool HAS_FONT_BUG()
|
|||||||
|
|
||||||
// Tyro-specific variables
|
// Tyro-specific variables
|
||||||
#include "definitions.h"
|
#include "definitions.h"
|
||||||
|
|
||||||
#endif /* WX_COMMON_H */
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user