robotology / robotology-superbuild

CMake/YCM-based superbuild to simplify the build process of robotology projects.
49 stars 48 forks source link

Document what the ROBOTOLOGY_USES_OCTAVE option is actually installing #138

Open traversaro opened 5 years ago

traversaro commented 5 years ago

Currently this option is building:

In particular, it would be good to specify that it does not install anything unless ROBOTOLOGY_ENABLE_DYNAMICS is selected.

traversaro commented 5 years ago

cc @InesSorrentino

isorrentino commented 5 years ago

@traversaro and I, have discovered several problems in FindOctave.cmake .


1. In Windows it is not able to find the executable octave-config.

find_program( OCTAVE_CONFIG_EXECUTABLE
              NAMES octave-config
            )

By specifying the path that contains the searched executable, the problem is solved.

find_program( OCTAVE_CONFIG_EXECUTABLE
              HINTS "$ENV{SystemDrive}/Octave/Octave-4.4.1/bin"
              NAMES octave-config
            )


2. It is not able to execute octave-config -p with the option PREFIX (Windows and Linux).

This problem is related to the latest version of Octave (4.4.1) .

execute_process ( COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p PREFIX
                    OUTPUT_VARIABLE OCTAVE_ROOT_DIR
                    OUTPUT_STRIP_TRAILING_WHITESPACE )

The problem is that in this commit of the cmake community, the options has been changed. Indeed if you execute the command octave-config -h you can check the new options. To solve this problem for now I substituted the option PREFIX with the option OCTAVE_EXEC_HOME in FindOctave.cmake, but I'll open an issue also on cmake to ask information about this.


3. In Windows since Octave is compiled with MinGW and the MinGW libraries are not compatible with VisualStudio, some libraries of Octave can not be found.

find_library( OCTAVE_OCTINTERP_LIBRARY
              NAMES octinterp liboctinterp
              HINTS ${OCTAVE_LIBRARIES_PATHS}
            )
find_library( OCTAVE_OCTAVE_LIBRARY
              NAMES octave liboctave
              HINTS ${OCTAVE_LIBRARIES_PATHS}
            )
find_library( OCTAVE_CRUFT_LIBRARY
              NAMES cruft libcruft
              HINTS ${OCTAVE_LIBRARIES_PATHS}
            )
traversaro commented 4 years ago

In particular, it would be good to specify that it does not install anything unless ROBOTOLOGY_ENABLE_DYNAMICS is selected.

This is not true after yarp-matlab-bindings have been moved to the Core profile.

traversaro commented 4 years ago
  1. It is not able to execute octave-config -p with the option PREFIX (Windows and Linux).

This was fixed by https://github.com/robotology/ycm/pull/333 .

  1. In Windows since Octave is compiled with MinGW and the MinGW libraries are not compatible with VisualStudio, some libraries of Octave can not be found.

Related issue: https://github.com/robotology/robotology-superbuild/issues/139 .