diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eca8a2..4bad572 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,9 +20,12 @@ endif() # C++11, please 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++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") elseif(COMPILER_SUPPORTS_CXX0X) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") @@ -58,12 +61,11 @@ include_directories(${INCLUDE_DIRS}) # set some platform-specific flags if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - 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++") - add_definitions(-D_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_ -D__WXMAC__) + #set(MACOSX_DEPLOYMENT_TARGET 10.9) + #set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -stdlib=libc++") + add_definitions(-D__WXMAC__) else() - add_definitions(-D_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_) + #add_definitions(-D_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_) endif() ################################################################################ @@ -88,9 +90,8 @@ add_custom_command( ) # base library -add_library(BaseLib STATIC -# src/base/SFTP.cpp - src/settings/Config.cpp) +#add_library(BaseLib STATIC +# src/base/SFTP.cpp) # widget library file(GLOB widget_SRC @@ -119,7 +120,7 @@ else() endif() #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 diff --git a/config/json2c.c b/config/json2c.c index 2785a8f..3ec69f7 100644 --- a/config/json2c.c +++ b/config/json2c.c @@ -50,9 +50,9 @@ int main(int argc, char** argv) { i = 1; while ((c = fgetc(fi)) != EOF) { if (i < 12) - fprintf(fo, c < 16 ? ", 0x%02x" : ", 0x%02x", c); + fprintf(fo, ", 0x%02x", c); else { - fprintf(fo, c < 16 ? ",\n 0x%02x" : ",\n 0x%02x", c); + fprintf(fo, ",\n 0x%02x", c); i = 0; } i++; @@ -63,4 +63,4 @@ int main(int argc, char** argv) { printf("converted %s\n", argv[1]); return 0; -} \ No newline at end of file +} diff --git a/src/TyroApp.cpp b/src/TyroApp.cpp index 7d9df86..f0a5a02 100644 --- a/src/TyroApp.cpp +++ b/src/TyroApp.cpp @@ -17,10 +17,7 @@ TyroMenu *Glob_menu_bar = nullptr; wxStatusBar *Glob_status_bar = nullptr; MainFrame *Glob_main_frame = nullptr; StringConstMap Glob_lexer_map; - -#ifndef TRAVIS PrefPane *Glob_pref_pane = nullptr; -#endif /** * Class with main method diff --git a/src/widgets/MainFrame.cpp b/src/widgets/MainFrame.cpp index 0924104..3329018 100644 --- a/src/widgets/MainFrame.cpp +++ b/src/widgets/MainFrame.cpp @@ -704,7 +704,7 @@ void MainFrame::OnLangSelect(wxCommandEvent &event) { auto *selectedMenu = (wxMenu *) event.GetEventObject(); 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) {