Skip to content

Commit

Permalink
Update build for cmake 3.30 and c++14
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkoch7 committed Sep 24, 2024
1 parent 46cbaf2 commit 90158ca
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
*.swp
build-64-bit
install-64-bit
build-32-bit
Expand Down
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 3.0.0 )
cmake_minimum_required( VERSION 3.30.0 )
foreach( policy
)
if( POLICY ${policy} )
Expand Down Expand Up @@ -72,7 +72,7 @@ set( BOOST_USE_MULTITHREADED ON )
set( BOOST_USE_STATIC_RUNTIME OFF )
set( BOOST_ROOT "Please specify"
CACHE PATH "Root directory where Boost is installed" )
find_package( Boost 1.53.0 REQUIRED COMPONENTS
find_package( Boost 1.53.0 CONFIG REQUIRED COMPONENTS
date_time filesystem program_options regex system thread )

#CSharp
Expand All @@ -98,16 +98,15 @@ set( POCO_ODBC_API_DEFINE "undef" )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )

#Python
find_package( PythonInterp 3 )
find_package( PythonLibs 3 )
find_package( Python3 COMPONENTS Interpreter Development )

#Ruby
find_package( Ruby 2.2 )

endif()

#Swig
find_package( SWIG )
find_package( SWIG 4.0 )

foreach( config IN LISTS CMAKE_CONFIGURATION_TYPES ITEMS ${CMAKE_BUILD_TYPE} )
string( TOUPPER ${config} config )
Expand Down
3 changes: 2 additions & 1 deletion src/autodata/dynamic/Record.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ using namespace Poco::Data;
using namespace Poco::Data::Keywords;
using namespace Poco::Dynamic;
using namespace Poco::JSON;
namespace PJ = Poco::JSON;

namespace autodata
{
Expand Down Expand Up @@ -201,7 +202,7 @@ void Record::FromJson(
{
try
{
Parser parser;
PJ::Parser parser;
Var result = parser.parse( json );
poco_assert( result.type() == typeid( Object::Ptr ) );
Struct< std::string >::operator =( *result.extract< Object::Ptr >() );
Expand Down
2 changes: 1 addition & 1 deletion src/cpplinq/linq_iterators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ namespace cpplinq {

private:
bool empty() const {
!cur || cur->empty();
return !cur || cur->empty();
}

util::maybe<Cursor> cur;
Expand Down
4 changes: 2 additions & 2 deletions src/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ set( MODULE_FILE module.i )

include_directories( ${CMAKE_SOURCE_DIR}/src )
include_directories( ${SWIG_SRC_DIR} )
if( PYTHONLIBS_FOUND )
include_directories( ${PYTHON_INCLUDE_DIRS} )
if( Python3_FOUND )
include_directories( ${Python3_INCLUDE_DIRS} )
endif()
if( RUBY_FOUND )
include_directories( ${RUBY_ARCHHDR_DIR} )
Expand Down
4 changes: 2 additions & 2 deletions src/swig/Poco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if( CSHARP_FOUND )
include( ModuleInstall )
endif()

if( PYTHONLIBS_FOUND )
if( Python3_FOUND )
set( MODULE_NAME Poco )
set( TARGET_NAME ${MODULE_NAME}_python )
set( SWIG_LANGUAGE PYTHON )
Expand All @@ -33,7 +33,7 @@ if( PYTHONLIBS_FOUND )
swig_add_library( ${TARGET_NAME} LANGUAGE python SOURCES ${MODULE_FILE} )
swig_link_libraries( ${TARGET_NAME}
${POCO_LIBRARIES}
${PYTHON_LIBRARIES} )
${Python3_LIBRARIES} )

include( ModuleInstall )
endif()
Expand Down
4 changes: 2 additions & 2 deletions src/swig/Poco/Data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if( CSHARP_FOUND )
include( ModuleInstall )
endif()

if( PYTHONLIBS_FOUND )
if( Python3_FOUND )
set( MODULE_NAME Poco_Data )
set( TARGET_NAME ${MODULE_NAME}_python )
set( SWIG_LANGUAGE PYTHON )
Expand All @@ -35,7 +35,7 @@ if( PYTHONLIBS_FOUND )
swig_add_library( ${TARGET_NAME} LANGUAGE python SOURCES ${MODULE_FILE} )
swig_link_libraries( ${TARGET_NAME}
${POCO_LIBRARIES}
${PYTHON_LIBRARIES} )
${Python3_LIBRARIES} )

include( ModuleInstall )
endif()
Expand Down
4 changes: 2 additions & 2 deletions src/swig/Poco/Dynamic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if( CSHARP_FOUND )
include( ModuleInstall )
endif()

if( PYTHONLIBS_FOUND )
if( Python3_FOUND )
set( MODULE_NAME Poco_Dynamic )
set( TARGET_NAME ${MODULE_NAME}_python )
set( SWIG_LANGUAGE PYTHON )
Expand All @@ -33,7 +33,7 @@ if( PYTHONLIBS_FOUND )
swig_add_library( ${TARGET_NAME} LANGUAGE python SOURCES ${MODULE_FILE} )
swig_link_libraries( ${TARGET_NAME}
${POCO_LIBRARIES}
${PYTHON_LIBRARIES} )
${Python3_LIBRARIES} )

include( ModuleInstall )
endif()
Expand Down
4 changes: 2 additions & 2 deletions src/swig/autodata/db/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if( CSHARP_FOUND )
include( ModuleInstall )
endif()

if( PYTHONLIBS_FOUND )
if( Python3_FOUND )
set( MODULE_NAME autodata_db )
set( TARGET_NAME ${MODULE_NAME}_python )
set( SWIG_LANGUAGE PYTHON )
Expand All @@ -43,7 +43,7 @@ if( PYTHONLIBS_FOUND )
autodata
${Boost_LIBRARIES}
${POCO_LIBRARIES}
${PYTHON_LIBRARIES} )
${Python3_LIBRARIES} )

include( ModuleInstall )
endif()
Expand Down
4 changes: 2 additions & 2 deletions src/swig/autodata/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if( CSHARP_FOUND )
include( ModuleInstall )
endif()

if( PYTHONLIBS_FOUND )
if( Python3_FOUND )
set( MODULE_NAME autodata_util )
set( TARGET_NAME ${MODULE_NAME}_python )
set( SWIG_LANGUAGE PYTHON )
Expand All @@ -41,7 +41,7 @@ if( PYTHONLIBS_FOUND )
autodata
${Boost_LIBRARIES}
${POCO_LIBRARIES}
${PYTHON_LIBRARIES} )
${Python3_LIBRARIES} )

include( ModuleInstall )
endif()
Expand Down
4 changes: 2 additions & 2 deletions src/swig/std/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if( CSHARP_FOUND )
include( ModuleInstall )
endif()

if( PYTHONLIBS_FOUND )
if( Python3_FOUND )
set( MODULE_NAME std )
set( TARGET_NAME ${MODULE_NAME}_python )
set( SWIG_LANGUAGE PYTHON )
Expand All @@ -29,7 +29,7 @@ if( PYTHONLIBS_FOUND )
${SWIG_SRC_DIR}/common.i )
swig_add_library( ${TARGET_NAME} LANGUAGE python SOURCES ${MODULE_FILE} )
swig_link_libraries( ${TARGET_NAME}
${PYTHON_LIBRARIES} )
${Python3_LIBRARIES} )

include( ModuleInstall )
endif()
Expand Down
1 change: 1 addition & 0 deletions src/swig/std/module.i
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public:
T* operator ->();
T* get();
};
namespace literals{}
}
#else
%include <std_shared_ptr.i>
Expand Down

0 comments on commit 90158ca

Please sign in to comment.