PSOPT / psopt

PSOPT Optimal Control Software
GNU Lesser General Public License v2.1
193 stars 75 forks source link

Snopt fix #26

Closed schulz0r closed 3 years ago

schulz0r commented 3 years ago

Hello,

On my MacOS, adolc cannot simply be dropped into the link library list, because CMake automatically includes the wrong include directory. By explicitly adding ${ipopt_INCLUDE_DIRS} to the include directories, this problem seems to be resolved.

Since the SNOPT interface is only an object library, the examples cannot be linked against it. Thats why I fully compile PSOPT first, including the SNOPT interface, and then add the interface's examples later in the root CMake file. Now, the examples should run on MacOS.

Here is what I do to generate a Xcode file: cmake -DWITH_SNOPT_INTERFACE=1 -DBUILD_EXAMPLES=1 -DCMAKE_Fortran_COMPILER=gcc -G Xcode ..

AdolC still causes compilation errors because it doesn't conform to the C++ standard somewhere in the code, which Apple Clang does not seem to accept.