build clanup

This commit is contained in:
Timothy Warren 2019-06-04 16:07:21 -04:00
parent 5d67a4d1e8
commit b927dad749
4 changed files with 15 additions and 17 deletions

View File

@ -20,9 +20,12 @@ endif()
# C++11, please # C++11, please
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11) if(COMPILER_SUPPORTS_CXX17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
elseif(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X) elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
@ -58,12 +61,11 @@ include_directories(${INCLUDE_DIRS})
# set some platform-specific flags # set some platform-specific flags
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX_DEPLOYMENT_TARGET 10.9) #set(MACOSX_DEPLOYMENT_TARGET 10.9)
#set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk") #set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -stdlib=libc++") add_definitions(-D__WXMAC__)
add_definitions(-D_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_ -D__WXMAC__)
else() else()
add_definitions(-D_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_) #add_definitions(-D_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
endif() endif()
################################################################################ ################################################################################
@ -88,9 +90,8 @@ add_custom_command(
) )
# base library # base library
add_library(BaseLib STATIC #add_library(BaseLib STATIC
# src/base/SFTP.cpp # src/base/SFTP.cpp)
src/settings/Config.cpp)
# widget library # widget library
file(GLOB widget_SRC file(GLOB widget_SRC
@ -119,7 +120,7 @@ else()
endif() endif()
#link it all #link it all
target_link_libraries(Tyro JsonLib BaseLib WidgetLib ${wxWidgets_LIBRARIES})# ${Libssh2_LIBRARIES}) target_link_libraries(Tyro JsonLib WidgetLib ${wxWidgets_LIBRARIES})# BaseLib ${Libssh2_LIBRARIES})
################################################################################ ################################################################################
# Tests # Tests

View File

@ -50,9 +50,9 @@ int main(int argc, char** argv) {
i = 1; i = 1;
while ((c = fgetc(fi)) != EOF) { while ((c = fgetc(fi)) != EOF) {
if (i < 12) if (i < 12)
fprintf(fo, c < 16 ? ", 0x%02x" : ", 0x%02x", c); fprintf(fo, ", 0x%02x", c);
else { else {
fprintf(fo, c < 16 ? ",\n 0x%02x" : ",\n 0x%02x", c); fprintf(fo, ",\n 0x%02x", c);
i = 0; i = 0;
} }
i++; i++;

View File

@ -17,10 +17,7 @@ TyroMenu *Glob_menu_bar = nullptr;
wxStatusBar *Glob_status_bar = nullptr; wxStatusBar *Glob_status_bar = nullptr;
MainFrame *Glob_main_frame = nullptr; MainFrame *Glob_main_frame = nullptr;
StringConstMap Glob_lexer_map; StringConstMap Glob_lexer_map;
#ifndef TRAVIS
PrefPane *Glob_pref_pane = nullptr; PrefPane *Glob_pref_pane = nullptr;
#endif
/** /**
* Class with main method * Class with main method

View File

@ -704,7 +704,7 @@ void MainFrame::OnLangSelect(wxCommandEvent &event)
{ {
auto *selectedMenu = (wxMenu *) event.GetEventObject(); auto *selectedMenu = (wxMenu *) event.GetEventObject();
auto *langMenu = Glob_menu_bar->GetMenu(myLANG_MENU); auto *langMenu = Glob_menu_bar->GetMenu(myLANG_MENU);
if (langMenu == NULL) wxLogDebug("Couldn't get lang menu"); if (langMenu == nullptr) wxLogDebug("Couldn't get lang menu");
if (selectedMenu == langMenu) if (selectedMenu == langMenu)
{ {