Skip to content

Commit 31f7f04

Browse files
Merge branch 'devel' into feature-cartesian-state
2 parents d73f492 + f293e5b commit 31f7f04

10 files changed

+36
-57
lines changed

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,9 @@ if (CISST_cisstOSAbstraction OR CISST_cisstInteractive)
443443
endif (CMAKE_DL_LIBS)
444444
endif (CISST_cisstOSAbstraction OR CISST_cisstInteractive)
445445

446-
# If cisstInteractive in turned on, also force SWIG for Python and shared libraries
447-
if (CISST_cisstInteractive)
448-
set (CISST_HAS_SWIG_PYTHON ON CACHE BOOL "Build the Python wrappers for cisst with Swig." FORCE)
449-
endif (CISST_cisstInteractive)
450-
if (CISST_HAS_SWIG_PYTHON)
446+
if (CISST_HAS_SWIG_PYTHON OR CISST_cisstInteractive)
451447
set (CISST_BUILD_SHARED_LIBS ON CACHE BOOL "Build cisst with shared libraries." FORCE)
452-
endif (CISST_HAS_SWIG_PYTHON)
448+
endif (CISST_HAS_SWIG_PYTHON OR CISST_cisstInteractive)
453449

454450

455451
# List of libraries to be built
@@ -492,8 +488,12 @@ if (CISST_HAS_FLTK)
492488
set (CISST_SETTINGS ${CISST_SETTINGS} cisstFLTK)
493489
endif (CISST_HAS_FLTK)
494490

495-
if (CISST_HAS_SWIG_PYTHON)
491+
if (CISST_HAS_SWIG_PYTHON OR CISST_cisstInteractive)
496492
set (CISST_SETTINGS ${CISST_SETTINGS} cisstPython)
493+
endif (CISST_HAS_SWIG_PYTHON OR CISST_cisstInteractive)
494+
495+
if (CISST_HAS_SWIG_PYTHON)
496+
set (CISST_SETTINGS ${CISST_SETTINGS} cisstSWIG)
497497
endif (CISST_HAS_SWIG_PYTHON)
498498

499499
if (CISST_HAS_OPENGL)

cisst-dependencies/CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ endif (CISST_HAS_FLTK)
224224
# Wrapping with swig for Python
225225
option (CISST_HAS_SWIG_PYTHON "Build the Python wrappers for cisst with Swig." OFF)
226226
mark_as_advanced (CISST_HAS_SWIG_PYTHON)
227+
227228
if (CISST_HAS_SWIG_PYTHON)
228229
# Find Swig
229230
set (CISST_SWIG_REQUIRED_VERSION 1.3.36)
@@ -237,12 +238,16 @@ if (CISST_HAS_SWIG_PYTHON)
237238
include (${SWIG_USE_FILE})
238239
# save SWIG settings
239240
set (CISST_SWIG_PACKAGE "SWIG")
240-
cisst_set_package_settings (cisstPython SWIG PACKAGES CISST_SWIG_PACKAGE)
241-
cisst_set_package_settings (cisstPython SWIG CMAKE_FILES SWIG_USE_FILE)
241+
cisst_set_package_settings (cisstSWIG SWIG PACKAGES CISST_SWIG_PACKAGE)
242+
cisst_set_package_settings (cisstSWIG SWIG CMAKE_FILES SWIG_USE_FILE)
242243
# propagate the fact that SWIG was found
243244
set (CISST_SWIG_FOUND 1 PARENT_SCOPE)
244245
endif (${SWIG_VERSION} VERSION_LESS ${CISST_SWIG_REQUIRED_VERSION})
246+
else (CISST_HAS_SWIG_PYTHON)
247+
cisst_unset_all_package_settings (cisstSWIG SWIG)
248+
endif (CISST_HAS_SWIG_PYTHON)
245249

250+
if (CISST_HAS_SWIG_PYTHON OR CISST_cisstInteractive)
246251
# Force to use exceptions
247252
set (CISST_CMN_THROW_DOES_ABORT OFF CACHE BOOL "cmnThrow uses abort() instead of throw" FORCE)
248253
set (CISST_CMN_ASSERT_THROWS_EXCEPTION ON CACHE BOOL "CMN_ASSERT throws an exception instead of abort" FORCE)
@@ -258,7 +263,7 @@ if (CISST_HAS_SWIG_PYTHON)
258263

259264
set (Python_EXECUTABLE ${Python_EXECUTABLE} PARENT_SCOPE)
260265
set (PYTHON_ALL_INCLUDE_DIRS ${Python_INCLUDE_DIRS} ${Python_NumPy_INCLUDE_DIRS})
261-
cisst_set_package_settings (cisstPython Python INCLUDE_DIRECTORIES PYTHON_ALL_INCLUDE_DIRS)
266+
cisst_set_package_settings (cisstPython Python INCLUDE_DIRECTORIES PYTHON_ALL_INCLUDE_DIRS)
262267
set (PYTHON_ALL_LIBRARIES ${Python_LIBRARIES})
263268
cisst_set_package_settings (cisstPython Python LIBRARIES PYTHON_ALL_LIBRARIES)
264269

@@ -275,11 +280,11 @@ if (CISST_HAS_SWIG_PYTHON)
275280
COMPONENT cisstCommon)
276281
endif (NOT ${SWIG_VERSION} VERSION_LESS ${CISST_SWIG_REQUIRED_VERSION})
277282

278-
else (CISST_HAS_SWIG_PYTHON)
283+
else (CISST_HAS_SWIG_PYTHON OR CISST_cisstInteractive)
279284
# propagate the fact that SWIG was not found
280285
set (CISST_SWIG_FOUND 0 PARENT_SCOPE)
281286
cisst_unset_all_package_settings (cisstPython Python)
282-
endif (CISST_HAS_SWIG_PYTHON)
287+
endif (CISST_HAS_SWIG_PYTHON OR CISST_cisstInteractive)
283288

284289

285290
# Support for cisstCommonXML, just to see what is available

cisstInteractive/code/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cisst_set_directories (cisstPython)
4343
cisst_add_library (LIBRARY cisstInteractive
4444
FOLDER cisstInteractive
4545
DEPENDENCIES ${DEPENDENCIES}
46-
SETTINGS cisstPython
46+
SETTINGS cisstPython
4747
SOURCE_FILES ${SOURCE_FILES}
4848
HEADER_FILES ${HEADER_FILES}
4949
ADDITIONAL_SOURCE_FILES ${ADDITIONAL_SOURCE_FILES}

cisstVector/vctFixedStrideMatrixIterator.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
Author(s): Ofri Sadowsky, Anton Deguet
77
Created on: 2003-09-30
88
9-
(C) Copyright 2003-2013 Johns Hopkins University (JHU), All Rights
10-
Reserved.
9+
(C) Copyright 2003-2025 Johns Hopkins University (JHU), All Rights Reserved.
1110
1211
--- begin cisst license - do not edit ---
1312
@@ -87,8 +86,7 @@ no warranty. The complete license can be found in license.txt and
8786
the same expression.
8887
*/
8988
template <class _elementType, vct::stride_type _columnStride, vct::size_type _numColumns, vct::stride_type _rowStride>
90-
class vctFixedStrideMatrixConstIterator:
91-
public std::iterator<std::random_access_iterator_tag, _elementType>
89+
class vctFixedStrideMatrixConstIterator
9290
{
9391
public:
9492
/* define most types from vctContainerTraits */
@@ -97,12 +95,9 @@ class vctFixedStrideMatrixConstIterator:
9795
/*! The type of the iterator itself. */
9896
typedef vctFixedStrideMatrixConstIterator<_elementType, _columnStride, _numColumns, _rowStride> ThisType;
9997

100-
/*! Base type for this iterator, i.e. std::iterator. */
101-
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;
102-
10398
/*! Type (i.e. category) of iterator,
10499
i.e. std::random_access_iterator_tag. */
105-
typedef typename BaseType::iterator_category iterator_category;
100+
typedef typename std::random_access_iterator_tag iterator_category;
106101

107102
enum {COL_STRIDE = _columnStride, ROW_STRIDE = _rowStride};
108103
enum {NUM_COLUMNS = _numColumns};

cisstVector/vctFixedStrideVectorIterator.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
Author(s): Ofri Sadowsky, Anton Deguet
77
Created on: 2003-09-30
88
9-
(C) Copyright 2003-2013 Johns Hopkins University (JHU), All Rights
10-
Reserved.
9+
(C) Copyright 2003-2025 Johns Hopkins University (JHU), All Rights Reserved.
1110
1211
--- begin cisst license - do not edit ---
1312
@@ -59,8 +58,7 @@ no warranty. The complete license can be found in license.txt and
5958
\sa vctFixedStrideVectorIterator
6059
*/
6160
template <class _elementType, vct::stride_type _stride>
62-
class vctFixedStrideVectorConstIterator:
63-
public std::iterator<std::random_access_iterator_tag, _elementType>
61+
class vctFixedStrideVectorConstIterator
6462
{
6563
public:
6664
/* define most types from vctContainerTraits */
@@ -69,12 +67,9 @@ class vctFixedStrideVectorConstIterator:
6967
/*! This of the iterator itself. */
7068
typedef vctFixedStrideVectorConstIterator<_elementType, _stride> ThisType;
7169

72-
/*! Base type for this iterator, i.e. std::iterator. */
73-
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;
74-
7570
/*! Type (i.e. category) of iterator,
7671
i.e. std::random_access_iterator_tag. */
77-
typedef typename BaseType::iterator_category iterator_category;
72+
typedef typename std::random_access_iterator_tag iterator_category;
7873

7974
/* Stride between the elements of a vector. */
8075
enum {STRIDE = _stride};

cisstVector/vctVarStrideMatrixIterator.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
Author(s): Ofri Sadowsky, Anton Deguet
77
Created on: 2004-07-02
88
9-
(C) Copyright 2004-2013 Johns Hopkins University (JHU), All Rights
10-
Reserved.
9+
(C) Copyright 2004-2025 Johns Hopkins University (JHU), All Rights Reserved.
1110
1211
--- begin cisst license - do not edit ---
1312
@@ -37,8 +36,7 @@ no warranty. The complete license can be found in license.txt and
3736
\sa vctVarStrideMatrixIterator
3837
*/
3938
template<class _elementType>
40-
class vctVarStrideMatrixConstIterator:
41-
public std::iterator<std::random_access_iterator_tag, _elementType>
39+
class vctVarStrideMatrixConstIterator
4240
{
4341
public:
4442
/* define most types from vctContainerTraits */
@@ -47,12 +45,9 @@ class vctVarStrideMatrixConstIterator:
4745
/*! The type of the iterator itself. */
4846
typedef vctVarStrideMatrixConstIterator<_elementType> ThisType;
4947

50-
/*! Base type for this iterator, i.e. std::iterator. */
51-
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;
52-
5348
/*! Type (i.e. category) of iterator,
5449
i.e. std::random_access_iterator_tag. */
55-
typedef typename BaseType::iterator_category iterator_category;
50+
typedef typename std::random_access_iterator_tag iterator_category;
5651

5752
protected:
5853
/*! The data member points to the object being refered by this

cisstVector/vctVarStrideNArrayIterator.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
Author(s): Daniel Li, Ofri Sadowsky, Anton Deguet
77
Created on: 2006-07-11
88
9-
(C) Copyright 2006-2013 Johns Hopkins University (JHU), All Rights
10-
Reserved.
9+
(C) Copyright 2006-2025 Johns Hopkins University (JHU), All Rights Reserved.
1110
1211
--- begin cisst license - do not edit ---
1312
@@ -43,9 +42,7 @@ no warranty. The complete license can be found in license.txt and
4342
\sa vctVarStrideNArrayIterator
4443
*/
4544
template<class _ownerType, bool _forward>
46-
class vctVarStrideNArrayConstIterator:
47-
public std::iterator<std::random_access_iterator_tag,
48-
typename _ownerType::value_type>
45+
class vctVarStrideNArrayConstIterator
4946
{
5047
public:
5148
/* define most types from vctContainerOwnerTraits and vctNArrayTraits */
@@ -64,12 +61,9 @@ class vctVarStrideNArrayConstIterator:
6461
iterator points. */
6562
typedef _ownerType OwnerType;
6663

67-
/*! Base type for this iterator, i.e. std::iterator. */
68-
typedef std::iterator<std::random_access_iterator_tag, value_type> BaseType;
69-
7064
/*! Type (i.e. category) of iterator,
7165
i.e. std::random_access_iterator_tag. */
72-
typedef typename BaseType::iterator_category iterator_category;
66+
typedef typename std::random_access_iterator_tag iterator_category;
7367

7468
protected:
7569
/*! Pointer to the address of the container being referred to

cisstVector/vctVarStrideVectorIterator.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
Author(s): Ofri Sadowsky, Anton Deguet
77
Created on: 2004-07-02
88
9-
(C) Copyright 2004-2013 Johns Hopkins University (JHU), All Rights
10-
Reserved.
9+
(C) Copyright 2004-2025 Johns Hopkins University (JHU), All Rights Reserved.
1110
1211
--- begin cisst license - do not edit ---
1312
@@ -53,8 +52,7 @@ no warranty. The complete license can be found in license.txt and
5352
\sa vctVarStrideVectorIterator
5453
*/
5554
template<class _elementType>
56-
class vctVarStrideVectorConstIterator:
57-
public std::iterator<std::random_access_iterator_tag, _elementType>
55+
class vctVarStrideVectorConstIterator
5856
{
5957
public:
6058
/* define most types from vctContainerTraits */
@@ -63,12 +61,9 @@ class vctVarStrideVectorConstIterator:
6361
/*! The type of the iterator itself. */
6462
typedef vctVarStrideVectorConstIterator<_elementType> ThisType;
6563

66-
/*! Base type for this iterator, i.e. std::iterator. */
67-
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;
68-
6964
/*! Type (i.e. category) of iterator,
7065
i.e. std::random_access_iterator_tag. */
71-
typedef typename BaseType::iterator_category iterator_category;
66+
typedef typename std::random_access_iterator_tag iterator_category;
7267

7368
protected:
7469
/*! The data member points to the object being refered by this

cmake/cisstMacros.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ function (cisst_add_swig_module ...)
543543

544544
if (EXISTS ${SWIG_INTERFACE_FILE})
545545
# load settings for extra cisst libraries (and Python)
546-
set (_LIBRARIES_AND_SETTINGS ${MODULE_LINK_LIBRARIES} cisstPython)
546+
set (_LIBRARIES_AND_SETTINGS ${MODULE_LINK_LIBRARIES} cisstPython cisstSWIG)
547547
cisst_set_directories (${_LIBRARIES_AND_SETTINGS})
548548
# retrieve libraries needed for Python
549549
cisst_extract_settings (cisstPython LIBRARIES cisstPython_LIBRARIES)

cmake/sawConfig.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# (C) Copyright 2011-2021 Johns Hopkins University (JHU), All Rights Reserved.
2+
# (C) Copyright 2011-2025 Johns Hopkins University (JHU), All Rights Reserved.
33
#
44

55
set (@_cacf_component_name@_VERSION_MAJOR "@_cacf_version_major@")
@@ -27,7 +27,7 @@ else ()
2727
NAMES @_cacf_component_name@/@_cacf_component_name@Export.h
2828
HINTS ${THIS_FILE_PATH}/../.. ${THIS_FILE_PATH}/../../..)
2929
# set library path relative to include
30-
set (@_cacf_component_name@_LIBRARY_DIR "${@_cacf_component_name@_INCLUDE_DIR}/../lib")
30+
set (@_cacf_component_name@_LIBRARY_DIR "${@_cacf_component_name@_INCLUDE_DIR}/../lib" "@_cacf_library_dir@")
3131
endif ()
3232

3333
set (@_cacf_component_name@_LIBRARIES "@_cacf_libraries@")

0 commit comments

Comments
 (0)