From e35d9e9f41f4ea785226d712c4856cd893319048 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <121827174+conda-forge-webservices[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:30:20 +0000 Subject: [PATCH 1/7] dummy commit for rerendering --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 4250608..c178019 100644 --- a/README.md +++ b/README.md @@ -203,3 +203,6 @@ Feedstock Maintainers * [@pstjohn](https://github.com/pstjohn/) * [@traversaro](https://github.com/traversaro/) + + + From f9992f5b6f4c6fbf6d611fc7b9faedfd7417081d Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:32:50 +0000 Subject: [PATCH 2/7] ENH: updated version to 3.14.17 & Re-rendered with conda-build 24.11.2, conda-smithy 3.45.0, and conda-forge-pinning 2024.12.14.08.05.48 --- README.md | 3 --- recipe/meta.yaml | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c178019..4250608 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,3 @@ Feedstock Maintainers * [@pstjohn](https://github.com/pstjohn/) * [@traversaro](https://github.com/traversaro/) - - - diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5887b97..7d02261 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "Ipopt" %} -{% set version = "3.14.16" %} +{% set version = "3.14.17" %} package: name: {{ name|lower }} @@ -7,12 +7,12 @@ package: source: - url: https://github.com/coin-or/Ipopt/archive/releases/{{ version }}.tar.gz - sha256: cc8c217991240db7eb14189eee0dff88f20a89bac11958b48625fa512fe8d104 + sha256: 17ab8e9a6059ab11172c184e5947e7a7dda9fed0764764779c27e5b8e46f3d75 patches: - pkg-config-do-not-add-requires-private.patch build: - number: 11 + number: 0 run_exports: - {{ pin_subpackage('ipopt', max_pin='x.x.x') }} From 32f430b5c833f84ef22777c74e5e854e83d9e054 Mon Sep 17 00:00:00 2001 From: Silvio Date: Sat, 14 Dec 2024 16:37:08 +0100 Subject: [PATCH 3/7] Drop CMake on Windows and switch to upstream build system --- recipe/bld.bat | 30 +- recipe/build.sh | 27 +- recipe/cmake/CMakeLists.txt | 692 ------------- recipe/cmake/Ipopt/CMakeLists.txt | 957 ------------------ recipe/cmake/Ipopt/include/config.h.in | 236 ----- .../cmake/Ipopt/include/config_coinhsl.h.in | 48 - recipe/cmake/Ipopt/include/config_ipopt.h.in | 27 - recipe/cmake/Ipopt/ipopt_cmake.pc.in | 11 - recipe/cmake/LICENSE_CMAKE_FILES | 166 --- recipe/cmake/README_CMAKE_FILES | 7 - recipe/cmake/cmake/AC_HEADER_STDC.cmake | 47 - recipe/cmake/cmake/CheckCLinkerFlag.cmake | 22 - recipe/cmake/cmake/CheckDIRSymbolExists.cmake | 76 -- recipe/cmake/cmake/CheckPrototypeExists.cmake | 38 - recipe/cmake/cmake/FindAMD.cmake | 64 -- recipe/cmake/cmake/FindCHOLMOD.cmake | 227 ----- recipe/cmake/cmake/FindDL.cmake | 35 - recipe/cmake/cmake/FindMKL.cmake | 117 --- recipe/cmake/cmake/FindParMETIS.cmake | 148 --- recipe/cmake/cmake/FindReadline.cmake | 75 -- recipe/cmake/cmake/FindSSE.cmake | 292 ------ recipe/cmake/cmake/GetAcInitVersion.cmake | 35 - recipe/cmake/cmake/VA_COPY.cmake | 43 - recipe/cmake/cmake/arm-toolchain.cmake | 43 - recipe/cmake/cmake/coin-macros.cmake | 486 --------- recipe/cmake/cmake/compat.c | 17 - recipe/cmake/cmake/compat.cpp | 80 -- recipe/cmake/cmake/compatibility.h | 11 - recipe/cmake/cmake/export_git.cmake | 176 ---- recipe/cmake/cmake/ipopt_macros.cmake | 274 ----- .../cmake/cmake/libstdc++-compatibility.cpp | 232 ----- recipe/cmake/cmake/mingw-toolchain.cmake | 18 - recipe/cmake/cmake/mingw64-toolchain.cmake | 30 - recipe/cmake/cmake/parse_results.py | 91 -- recipe/cmake/cmake/uninstall.cmake | 27 - recipe/meta.yaml | 4 +- recipe/run_test.bat | 12 +- 37 files changed, 37 insertions(+), 4884 deletions(-) delete mode 100644 recipe/cmake/CMakeLists.txt delete mode 100644 recipe/cmake/Ipopt/CMakeLists.txt delete mode 100644 recipe/cmake/Ipopt/include/config.h.in delete mode 100644 recipe/cmake/Ipopt/include/config_coinhsl.h.in delete mode 100644 recipe/cmake/Ipopt/include/config_ipopt.h.in delete mode 100644 recipe/cmake/Ipopt/ipopt_cmake.pc.in delete mode 100644 recipe/cmake/LICENSE_CMAKE_FILES delete mode 100644 recipe/cmake/README_CMAKE_FILES delete mode 100644 recipe/cmake/cmake/AC_HEADER_STDC.cmake delete mode 100644 recipe/cmake/cmake/CheckCLinkerFlag.cmake delete mode 100644 recipe/cmake/cmake/CheckDIRSymbolExists.cmake delete mode 100644 recipe/cmake/cmake/CheckPrototypeExists.cmake delete mode 100644 recipe/cmake/cmake/FindAMD.cmake delete mode 100644 recipe/cmake/cmake/FindCHOLMOD.cmake delete mode 100644 recipe/cmake/cmake/FindDL.cmake delete mode 100644 recipe/cmake/cmake/FindMKL.cmake delete mode 100644 recipe/cmake/cmake/FindParMETIS.cmake delete mode 100644 recipe/cmake/cmake/FindReadline.cmake delete mode 100644 recipe/cmake/cmake/FindSSE.cmake delete mode 100644 recipe/cmake/cmake/GetAcInitVersion.cmake delete mode 100644 recipe/cmake/cmake/VA_COPY.cmake delete mode 100644 recipe/cmake/cmake/arm-toolchain.cmake delete mode 100644 recipe/cmake/cmake/coin-macros.cmake delete mode 100644 recipe/cmake/cmake/compat.c delete mode 100644 recipe/cmake/cmake/compat.cpp delete mode 100644 recipe/cmake/cmake/compatibility.h delete mode 100644 recipe/cmake/cmake/export_git.cmake delete mode 100644 recipe/cmake/cmake/ipopt_macros.cmake delete mode 100644 recipe/cmake/cmake/libstdc++-compatibility.cpp delete mode 100644 recipe/cmake/cmake/mingw-toolchain.cmake delete mode 100644 recipe/cmake/cmake/mingw64-toolchain.cmake delete mode 100644 recipe/cmake/cmake/parse_results.py delete mode 100644 recipe/cmake/cmake/uninstall.cmake diff --git a/recipe/bld.bat b/recipe/bld.bat index daa71e0..ad8dc0d 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,28 +1,2 @@ -setlocal EnableDelayedExpansion - -:: Copy CMake files to the source directory -xcopy /E %RECIPE_DIR%\cmake %SRC_DIR% - -cd %SRC_DIR% -mkdir build -cd build - -:: Configure using the CMakeFiles -cmake -G "NMake Makefiles" ^ - -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^ - -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ - -DCMAKE_BUILD_TYPE:STRING=Release ^ - -DIPOPT_BUILD_EXAMPLES=1 ^ - -DIPOPT_HAS_BLAS=1 ^ - -DIPOPT_HAS_LAPACK=1 ^ - -DIPOPT_HAS_MUMPS=1 ^ - -DIPOPT_HAS_RAND=1 ^ - -DIPOPT_ENABLE_LINEARSOLVERLOADER=1 ^ - -DCOIN_LINK_GFORTRAN=FALSE ^ - -DCOIN_USE_SYSTEM_LAPACK=TRUE ^ - -DCOIN_HAS_MUMPS_INCLUDE_PATH="%LIBRARY_INC%\mumps_seq" ^ - -DCOIN_HAS_MUMPS_LIBRARY_PATH="%LIBRARY_BIN%" ^ - .. -if errorlevel 1 exit 1 -cmake --build . --config Release --target install -if errorlevel 1 exit 1 +call %BUILD_PREFIX%\Library\bin\run_autotools_clang_conda_build.bat +if %ERRORLEVEL% neq 0 exit 1 diff --git a/recipe/build.sh b/recipe/build.sh index 8ea91ef..f70f157 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,6 +1,9 @@ #!/bin/bash # Get an updated config.sub and config.guess -cp $BUILD_PREFIX/share/gnuconfig/config.* . + +if [[ "$target_platform" != "win-64" ]]; then + cp $BUILD_PREFIX/share/gnuconfig/config.* . +fi cd $SRC_DIR @@ -11,6 +14,13 @@ if [ "$(uname)" == "Linux" ]; then export SPRAL_OPTIONS="--with-spral --with-spral-cflags=-I${PREFIX}/include --with-spral-lflags=-lspral" fi +if [[ "$target_platform" == "win-64" ]]; then + # On windows there are no dmumps_seq pkg-config, see https://github.com/conda-forge/mumps-feedstock/issues/129, so we manually specify how to link dmumps + export MUMPS_LFLAGS="-ldmumps" +else + export MUMPS_LFLAGS="$(pkg-config --libs dmumps_seq)" +fi + mkdir build cd build @@ -19,12 +29,15 @@ cd build --disable-java \ --with-mumps \ --with-mumps-cflags="-I${PREFIX}/include/mumps_seq" \ - --with-mumps-lflags="$(pkg-config --libs dmumps_seq)" \ + --with-mumps-lflags="${MUMPS_LFLAGS}" \ --with-asl \ --with-asl-cflags="-I${PREFIX}/include/asl" \ --with-asl-lflags="-lasl" \ --prefix=${PREFIX} || cat config.log +# As documented in https://github.com/conda-forge/autotools_clang_conda-feedstock/blob/cb241060f5d8adcd105f3b2e8454a8ad4d70f08f/recipe/meta.yaml#L58C1-L58C60 +[[ "$target_platform" == "win-64" ]] && patch_libtool + make -j${CPU_COUNT} if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then # Environment variables needed by spral @@ -38,3 +51,13 @@ make install # for backward compatibility install -d ${PREFIX}/include/coin install -m644 ${PREFIX}/include/coin-or/* ${PREFIX}/include/coin + +if [[ "$target_platform" == "win-64" ]]; then + # In conda-forge import library are called .lib, not .dll.lib, + # and also pkg-config expects that. The main ipopt.dll.lib library + # is renamed by the run_autotools_clang_conda_build, but here we also + # install and, that we manually rename here ipoptamplinterface.dll.lib + # sipopt.dll.lib + mv "${PREFIX}/lib/ipoptamplinterface.dll.lib" "${PREFIX}/lib/ipoptamplinterface.lib" + mv "${PREFIX}/lib/sipopt.dll.lib" "${PREFIX}/lib/sipopt.lib" +fi diff --git a/recipe/cmake/CMakeLists.txt b/recipe/cmake/CMakeLists.txt deleted file mode 100644 index d8e1e20..0000000 --- a/recipe/cmake/CMakeLists.txt +++ /dev/null @@ -1,692 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(IpOpt) - -# FUNNY_LAPACK_FINT - -#undef HAVE_MPI_INITIALIZED - Define to 1 if you have the `MPI_Initialized' function. - -option(COIN_ENABLE_READLINE "Enable the use of the readline library" OFF) - -option(IPOPT_HAS_AMPL "Enable Ampl interface" OFF) -option(IPOPT_HAS_PARDISO "Enable Pardiso solver" OFF) -option(IPOPT_HAS_PARDISO_MKL "Enable if you are using Pardiso from MKL" OFF) -option(IPOPT_HAS_PARDISO_OLDINTERFACE "Enable if you are not using at least a 4.0 version of Pardiso" OFF) -option(IPOPT_HAS_PARDISO_PARALLEL "Enable if you are using the parallel version of Pardiso" OFF) -option(IPOPT_HAS_HSL "Enable HSL interface" OFF) -option(IPOPT_HAS_WSMP "Enable WSMP solver" OFF) -option(IPOPT_HAS_MUMPS "Enable Mumps solver" OFF) -option(IPOPT_BUILD_EXAMPLES "Enable the building of examples" OFF) -option(IPOPT_ENABLE_LINEARSOLVERLOADER "Build the dynamic linear solver loader" OFF) -option(IPOPT_ENABLE_PARDISOSOLVERLOADER "Build the dynamic pardiso solver loader" OFF) -option(IPOPT_ENABLE_INEXACT "Build the inexact solver" OFF) - -set(IPOPT_CHECKLEVEL "0" CACHE STRING "The debug sanity check level of IpOpt (0 if no test)") -set(IPOPT_VERBOSITY "0" CACHE STRING "The debug verbosity level of IpOpt (0 if no output)") - -set(COIN_HAS_MUMPS OFF CACHE BOOL "Enable the Mumps linear solver (default solver enabled)" FORCE) -set(COIN_HAS_MUMPS_INCLUDE_PATH "None" CACHE PATH "The MUMPS linear solver include Path") -set(COIN_HAS_MUMPS_LIBRARY_PATH "None" CACHE PATH "The MUMPS linear solver absolute library Path") - -set(COIN_HAS_WSMP OFF CACHE BOOL "Enable the WSMP linear solver" FORCE) -set(COIN_HAS_WSMP_INCLUDE_PATH "None" CACHE PATH "The WSMP linear solver include Path") -set(COIN_HAS_WSMP_LIBRARY_PATH "None" CACHE PATH "The WSMP linear solver absolute library Path") - -# Compilation options -option(ENABLE_SHARED_LIBRARIES "Build libraries as shared libraries" ON) -option(COIN_COMPILE_STATIC "Activate the static linking" OFF) -option(COIN_COMPILE_COVERAGE "Activate the code coverage compilation" OFF) -option(COIN_COMPILE_PROFILE "Activate the code profiling compilation" OFF) -option(COIN_COMPILE_PROFILE_VALGRIND "Activate the code profiling compilation for valgrind" OFF) -option(COIN_COMPILE_LTO "Activate the whole program optimization" OFF) -option(COIN_HAS_MKL "Use Intel MKL library (requires Intel compiler)" OFF) -option(COIN_USE_FAST_CODE "Use intensive optimization flags" OFF) -option(COIN_COMPILE_WARNINGS "Activate a set of warning options" OFF) -option(COIN_COMPILE_CXX11 "Activate C++11 compilation" OFF) -option(COIN_TESTS_DISABLE_TIMEOUT "Disable the timeout of the tests" OFF) -option(COIN_ENABLE_DOXYGEN "Enable the build of doxygen documentation" OFF) -option(COIN_LINK_GFORTRAN "Link examples against gfortran" ON) - -option(USE_PROCESSOR_EXTENSIONS "Use sse / mmx / avx extensions during compilation" OFF) -option(COIN_ENABLE_COMPAT "Enable libc compatibility" OFF) - -# Set paths of source -set(COIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE PATH "The Cbc Path") - -set(COIN_COVERAGE_CTEST_LABEL "SAMPLE" CACHE PATH "The label sent to ctest during coverage") - -mark_as_advanced(ENABLE_SHARED_LIBRARIES - COIN_ENABLE_READLINE - COIN_COMPILE_STATIC - COIN_COMPILE_COVERAGE - COIN_COMPILE_PROFILE - COIN_COMPILE_PROFILE_VALGRIND - COIN_COMPILE_LTO - COIN_HAS_MKL - COIN_USE_FAST_CODE - COIN_COMPILE_WARNINGS - COIN_COMPILE_CXX11 - COIN_HAS_MUMPS - COIN_HAS_MUMPS_INCLUDE_PATH - COIN_HAS_MUMPS_LIBRARY_PATH - COIN_HAS_WSMP - COIN_HAS_WSMP_INCLUDE_PATH - COIN_HAS_WSMP_LIBRARY_PATH - COIN_LINK_GFORTRAN - COIN_DIR - IPOPT_HAS_PARDISO_MKL - IPOPT_HAS_PARDISO_OLDINTERFACE - IPOPT_HAS_PARDISO_PARALLEL - COIN_IPOPT_CHECKLEVEL - COIN_IPOPT_VERBOSITY - USE_PROCESSOR_EXTENSIONS - COIN_COVERAGE_CTEST_LABEL) - -# Set paths for binary and library generation inside the build directory: -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} - ${CMAKE_CURRENT_SOURCE_DIR}/cmake) - -include(coin-macros) -include(GetAcInitVersion) -include(CheckCLinkerFlag) -include(GNUInstallDirs) - -Enable_Testing () - -#------------------------------------------------------------ -# Check options -#------------------------------------------------------------ - -if (IPOPT_ENABLE_INEXACT AND NOT (IPOPT_HAS_PARDISO OR IPOPT_HAS_PARDISO_MKL OR IPOPT_HAS_PARDISO_OLDINTERFACE OR IPOPT_HAS_PARDISO_PARALLEL)) - message(FATAL_ERROR "Error: Inexact solver is only available through MKL. Please activate the MKL") -endif () - -if (NOT IPOPT_ENABLE_INEXACT) - message(WARNING "If you have MKL, you can activate IPOPT_ENABLE_INEXACT") -endif () - -#------------------------------------------------------------ -# Detect 64 bits -#------------------------------------------------------------ - -if (CMAKE_SIZEOF_VOID_P EQUAL 4) - set(HAVE_64_BIT 0) -else () - set(HAVE_64_BIT 1) -endif () - -# Various definitions - -# Name of package -set(PACKAGE "IpOpt") -# Define to the address where bug reports for this package should be sent. -set(PACKAGE_BUGREPORT "bugs@coin-or.org") -# Define to the full name of this package. -set(PACKAGE_NAME "IpOpt") -# Define to the full name and version of this package. -set(PACKAGE_STRING "IpOpt") -# Define to the one symbol short name of this package. -set(PACKAGE_TARNAME "ipopt") - -if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/ipopt_binary" - CACHE PATH "IpOpt install prefix" FORCE) -endif () - -include(CheckCCompilerFlag) -if (COIN_COMPILE_LTO) - if (NOT CMAKE_VERSION VERSION_LESS "3.9") - cmake_policy(SET CMP0069 NEW) - include(CheckIPOSupported) - check_ipo_supported() - endif () -endif () - -if (COIN_ENABLE_COMPAT) - # Disable extra stdc++ symbols (@GLIBCXX_3.4.21) - add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compatibility.h") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compatibility.h") -endif () - -# Desactivate some relocation types for portability -if (UNIX AND COIN_ENABLE_COMPAT) - check_c_compiler_flag("-Wa,-mrelax-relocations=no" HAVE_RELAX_RELOC_FLAG) - if (HAVE_RELAX_RELOC_FLAG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wa,-mrelax-relocations=no") - endif () -endif () - -# Check for readline -set(COIN_HAS_READLINE "OFF") -if (COIN_ENABLE_READLINE) - find_package(Readline) - if (READLINE_FOUND) - set(COIN_HAS_READLINE "ON") - - include_directories(${READLINE_INCLUDE_DIR}) - endif () -endif () - -if (USE_PROCESSOR_EXTENSIONS) - # Check for SSE* and AVX* - find_package(SSE) - if (MMX_FOUND OR - SSE2_FOUND OR SSE3_FOUND OR SSSE3_FOUND OR SSE4_1_FOUND OR SSE4_2_FOUND OR - AVX_FOUND OR AVX2_FOUND) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SSE_COMPILER_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SSE_COMPILER_FLAGS}") - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${SSE_COMPILER_FLAGS}") - endif () -endif () - -# Check for MKL -if (COIN_HAS_MKL) - find_package(MKL) - - if (MKL_FOUND) - message(STATUS "MKL library found") - else () - message(STATUS "MKL library not found") - endif () - - # Copy libiomp5md.dll in the build directory - if (WIN32) - if (HAVE_64_BIT) - set(MKL_DLL_DIR ${MKL_ROOT}/bin/intel64) - else () - set(MKL_DLL_DIR ${MKL_ROOT}/bin/ia32) - endif () - - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/ - COMMAND ${CMAKE_COMMAND} -E copy ${MKL_DLL_DIR}/libiomp5md.dll ${CMAKE_BINARY_DIR}/bin/ - COMMAND ${CMAKE_COMMAND} -E echo "Copying ${MKL_DLL_DIR}/libiomp5md.dll into ${CMAKE_BINARY_DIR}/bin/") - endif () - - set(COIN_MKL_LIBS "${MKL_LIBRARIES}") - if (WIN32) - set(COIN_MKL_LIBS ${COIN_MKL_LIBS} mkl_intel_thread libiomp5md) - else () - set(COIN_MKL_LIBS ${COIN_MKL_LIBS} mkl_gnu_thread gomp dl) - endif () - - include_directories(${MKL_INCLUDE_DIRS}) - - if (HAVE_64_BIT) - link_directories(${MKLROOT_PATH}/mkl/lib/intel64) - else () - link_directories(${MKLROOT_PATH}/mkl/lib/ia32) - endif () - - set(COIN_HAS_LAPACK ON CACHE BOOL "Use Intel MKL library (requires Intel compiler)") -endif () - -# Check some directories - -coin_check_and_add_include_path(COIN_HAS_MUMPS_INCLUDE_PATH) -coin_check_and_add_library_path(COIN_HAS_MUMPS_LIBRARY_PATH) -coin_check_and_add_include_path(COIN_HAS_WSMP_INCLUDE_PATH) -coin_check_and_add_library_path(COIN_HAS_WSMP_LIBRARY_PATH) - -#----------------------------------------------------------------------------- -# Manage compilation options -#----------------------------------------------------------------------------- - -if (UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated") - - if (NOT ENABLE_SHARED_LIBRARIES) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - endif () - if (COIN_COMPILE_WARNINGS) - # Try to locate unitizalized variables - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wshadow -Wuninitialized ") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wshadow -Wmissing-prototypes -Wuninitialized ") - endif () - if (COIN_COMPILE_STATIC) - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") - - check_c_linker_flag("-z muldef" ZFLAGDEFINED) - if (ZFLAGDEFINED) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z muldefs") - endif () - endif () - endif () - if (COIN_COMPILE_COVERAGE) - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0 --coverage") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 --coverage") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 --coverage") - endif () - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage -Xclang -coverage-cfg-checksum -Xclang -coverage-no-function-names-in-data -Xclang -coverage-version='408*'") - endif () - endif () - if (COIN_COMPILE_PROFILE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") - endif () - if (COIN_COMPILE_PROFILE_VALGRIND) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -p") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -p") - else () - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) - check_c_linker_flag("-z muldef" ZFLAGDEFINED) - if (ZFLAGDEFINED) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z muldefs") - endif () - endif () - endif () -endif () - -#----------------------------------------------------------------------------- -# Manage specific VS flags -#----------------------------------------------------------------------------- - -if (MSVC) - # Avoid Warning C4530 by using the flag /EHsc - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc ") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /EHsc ") -endif () - -#----------------------------------------------------------------------------- -# Manage threads include dir under Windows -#----------------------------------------------------------------------------- - -if (WIN32) - if (NOT COIN_THREADS_INC_PATH STREQUAL "None") - include_directories(${COIN_THREADS_INC_PATH}) - endif () - if (NOT COIN_THREADS_LIB_PATH STREQUAL "None") - link_directories(${COIN_THREADS_LIB_PATH}) - endif () -endif () - -# Check for a fortran compiler -include(CMakeDetermineFortranCompiler) -if (NOT CMAKE_Fortran_COMPILER) - message(STATUS "WARNING: fortran compiler not found. Disabling f77/f95 bindings") -endif () - -# Define IPOPT_FORTRAN_INTEGER_TYPE for Ipopt. -set(IPOPT_FORTRAN_INTEGER_TYPE int) - -#----------------------------------------------------------------------------- -# Detect name mangling convention used between Fortran and C -#----------------------------------------------------------------------------- - -if (CMAKE_Fortran_COMPILER) - enable_language(Fortran) - - include(FortranCInterface) - - FortranCInterface_HEADER(${CMAKE_BINARY_DIR}/F77Mangle.h - MACRO_NAMESPACE "F77_" - SYMBOL_NAMESPACE "F77_") - - file(STRINGS ${CMAKE_BINARY_DIR}/F77Mangle.h CONTENTS REGEX "F77_GLOBAL\\(.*,.*\\) +(.*)") - string(REGEX MATCH "F77_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) - set(F77_FUNC "F77_FUNC(name,NAME) ${CMAKE_MATCH_1}") - set(IPOPT_LAPACK_FUNC "IPOPT_LAPACK_FUNC(name,NAME) ${CMAKE_MATCH_1}") - - file(STRINGS ${CMAKE_BINARY_DIR}/F77Mangle.h CONTENTS REGEX "F77_GLOBAL_\\(.*,.*\\) +(.*)") - string(REGEX MATCH "F77_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) - set(F77_FUNC_ "F77_FUNC_(name,NAME) ${CMAKE_MATCH_1}") - set(IPOPT_LAPACK_FUNC_ "IPOPT_LAPACK_FUNC_(name,NAME) ${CMAKE_MATCH_1}") -else () - set(F77_FUNC "F77_FUNC(name,NAME) name##_") - set(F77_FUNC_ "F77_FUNC_(name,NAME) name##__") - set(IPOPT_LAPACK_FUNC "IPOPT_LAPACK_FUNC(name,NAME) name##_") - set(IPOPT_LAPACK_FUNC_ "IPOPT_LAPACK_FUNC_(name,NAME) name##__") -endif () - -set(F77_DUMMY_MAIN "" CACHE STRING "Define to dummy 'main' function (if any) required to link to the Fortran libraries.") -set(FC_DUMMY_MAIN "" CACHE STRING "Define to dummy 'main' function (if any) required to link to the Fortran libraries.") -option(FC_DUMMY_MAIN_EQ_F77 "Define if F77 and FC dummy 'main' functions are identical." OFF) - -if (FC_DUMMY_MAIN_EQ_F77) - set(FC_DUMMY_MAIN "${F77_DUMMY_MAIN}") -endif () - -mark_as_advanced(F77_FUNC - F77_FUNC_ - F77_DUMMY_MAIN - FC_DUMMY_MAIN - FC_DUMMY_MAIN_EQ_F77) - -# Manage coverage via lcov automatically - -if (COIN_COMPILE_COVERAGE AND NOT ((CMAKE_BUILD_TYPE STREQUAL "DEBUG") OR (CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO"))) - message(STATUS "Warning: to enable coverage, you must compile in DEBUG ou RELWITHDEBINFO mode") -endif () - -if (COIN_COMPILE_COVERAGE) - if (WIN32) - message(FATAL_ERROR "Error: code coverage analysis is only available under Linux for now.") - endif () - - find_program(GCOV_PATH gcov) - find_program(LCOV_PATH lcov) - find_program(GENHTML_PATH genhtml) - - if (NOT GCOV_PATH) - message(FATAL_ERROR "gcov not found! Please install lcov and gcov. Aborting...") - endif () - - if (NOT LCOV_PATH) - message(FATAL_ERROR "lcov not found! Please install lcov and gcov. Aborting...") - endif () - - if (NOT GENHTML_PATH) - message(FATAL_ERROR "genhtml not found! Please install lcov and gcov. Aborting...") - endif () - - # /!\ FAILURE IF AT LEAST ONE TEST FAILS - # Capturing lcov counters and generating report - add_custom_target(coverage - COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --zerocounters - COMMAND ${LCOV_PATH} --capture --initial --directory ${CMAKE_BINARY_DIR} --output-file ${CMAKE_BINARY_DIR}/coverage.info - COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_CTEST_COMMAND} -LE "(LONG|FAIL)" -L "${COIN_COVERAGE_CTEST_LABEL}" || true - COMMAND ${LCOV_PATH} --capture --directory ${CMAKE_BINARY_DIR} --output-file ${CMAKE_BINARY_DIR}/coverage.info - COMMAND ${LCOV_PATH} --remove ${CMAKE_BINARY_DIR}/coverage.info "*/usr/include/*" '${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/*' --output-file ${CMAKE_BINARY_DIR}/coverage.info.cleaned - COMMAND ${GENHTML_PATH} -o ${CMAKE_BINARY_DIR}/coverage ${CMAKE_BINARY_DIR}/coverage.info.cleaned - COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/coverage.info ${CMAKE_BINARY_DIR}/coverage.info.cleaned - VERBATIM - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Resetting code coverage counters to zero. -Processing code coverage counters and generating report. -You can zip the directory ${CMAKE_BINARY_DIR}/coverage and upload the content to a web server.") -endif () - -# -# Add uninstall-target -# - -add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake") - -# Directories where to find the source code - -set(Ipopt_DIR ${COIN_DIR}) - -# End of coverage - -include(CheckIncludeFileCXX) -include(CheckIncludeFile) -include(VA_COPY) - -check_include_file("assert.h" HAVE_ASSERT_H) -check_include_file("bzlib.h" HAVE_BZLIB_H) -check_include_file("ctype.h" HAVE_CTYPE_H) -check_include_file("dlfcn.h" HAVE_DLFCN_H) -check_include_file("endian.h" HAVE_ENDIAN_H) -check_include_file("float.h" HAVE_FLOAT_H) -check_include_file("ieeefp.h" HAVE_IEEEFP_H) -check_include_file("inttypes.h" HAVE_INTTYPES_H) -check_include_file("math.h" HAVE_MATH_H) -check_include_file("memory.h" HAVE_MEMORY_H) -if (COIN_ENABLE_READLINE) - check_include_file("readline/readline.h" HAVE_READLINE_READLINE_H) -endif () -check_include_file("stdint.h" HAVE_STDINT_H) -check_include_file("stdlib.h" HAVE_STDLIB_H) -check_include_file("stdio.h" HAVE_STDIO_H) -check_include_file("stdarg.h" HAVE_STDARG_H) -check_include_file("stddef.h" HAVE_STDDEF_H) -check_include_file("strings.h" HAVE_STRINGS_H) -check_include_file("string.h" HAVE_STRING_H) -check_include_file("sys/stat.h" HAVE_SYS_STAT_H) -check_include_file("sys/types.h" HAVE_SYS_TYPES_H) -check_include_file("time.h" HAVE_TIME_H) -check_include_file("unistd.h" HAVE_UNISTD_H) -check_include_file("windows.h" HAVE_WINDOWS_H) -check_include_file("zlib.h" HAVE_ZLIB_H) -check_include_file_cxx("cctype" HAVE_CCTYPE) -check_include_file_cxx("cmath" HAVE_CMATH) -check_include_file_cxx("cieeefp" HAVE_CIEEEFP) -check_include_file_cxx("cfloat" HAVE_CFLOAT) -check_include_file_cxx("cinttypes" HAVE_CINTTYPES) -check_include_file_cxx("cassert" HAVE_CASSERT) -check_include_file_cxx("cstdio" HAVE_CSTDIO) -check_include_file_cxx("cstdlib" HAVE_CSTDLIB) -check_include_file_cxx("cstdarg" HAVE_CSTDARG) -check_include_file_cxx("cstddef" HAVE_CSTDDEF) -check_include_file_cxx("cstring" HAVE_CSTRING) -check_include_file_cxx("ctime" HAVE_CTIME) - -string(SUBSTRING ${CMAKE_SHARED_LIBRARY_SUFFIX} 1 -1 SHAREDLIBEXT) - -include(CheckCXXCompilerFlag) - -if (COIN_COMPILE_CXX11 AND NOT WIN32) - # VS2013 activate C++11 by default - check_cxx_compiler_flag(-std=c++11 HAVE_STD_CPP11_FLAG) - if (HAVE_STD_CPP11_FLAG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - else () - check_cxx_compiler_flag(-std=c++0x HAVE_STD_CPP0X_FLAG) - if (HAVE_STD_CPP0X_FLAG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") - endif () - endif () -endif () - -check_cxx_compiler_flag(-Qunused-arguments HAVE_QUNUSED_ARGUMENTS) -if (HAVE_QUNUSED_ARGUMENTS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments") -endif () - -if (UNIX) - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) - check_cxx_compiler_flag(-Wno-unused-local-typedefs GCC_HAS_TYPEDEFS) - if (GCC_HAS_TYPEDEFS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs") - endif () - endif () - - if (NOT APPLE) - check_cxx_compiler_flag(-Wno-narrowing GCC_HAS_NARROWING) - if (GCC_HAS_NARROWING) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-narrowing") - endif () - endif () -endif () - -include(CheckTypeSize) - -check_type_size("int *" SIZEOF_INT_P) - -include(CheckSymbolExists) -include(CheckCXXSymbolExists) -include(CheckFunctionExists) - -set(CMAKE_REQUIRED_LIBRARIES m) -set(COIN_C_FINITE std::isfinite) - -check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) -check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) -check_symbol_exists(drand48 stdlib.h IPOPT_HAS_DRAND48) -# To avoid problems in Windows checks, always assume that rand exists -set(IPOPT_HAS_RAND 1 CACHE INTERNAL "Assume that rand is defined") -check_function_exists(snprintf HAVE_SNPRINTF) -check_cxx_symbol_exists(std::rand cstdlib HAVE_STD__RAND) -check_function_exists(va_copy HAVE_VA_COPY) -check_function_exists(vsnprintf HAVE_VSNPRINTF) -check_function_exists(_snprintf HAVE__SNPRINTF) -check_function_exists(_vsnprintf HAVE__VSNPRINTF) - -if (WIN32) - # snprintf not correctly detected under Visual Studio. - # Hack: we just activate snprintf under Windows. - # TO BE FIXED - set(HAVE_STDIO_H 1) - set(HAVE_SNPRINTF 1) - set(HAVE__SNPRINTF 1) - set(HAVE_VSNPRINTF 1) - set(HAVE__VSNPRINTF 1) - set(HAVE_VA_COPY 1) -endif () - -if (COIN_USE_FAST_CODE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer ") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer ") - - if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno -fp-trap=none ") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-math-errno -fp-trap=none ") - endif () - - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -fno-math-errno -fno-trapping-math ") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math -fno-math-errno -fno-trapping-math ") - endif () - -endif () - -include(AC_HEADER_STDC) - -add_definitions(-DHAVE_CONFIG_H) - -if (("${MSVC_VERSION}" STREQUAL "1900") OR ("${MSVC_VERSION}" STREQUAL "1910")) - add_definitions(/DHAVE_SNPRINTF /DHAVE_STRUCT_TIMESPEC) -endif () - -#----------------------------------------------- -# Doxygen documentation -#----------------------------------------------- - -set(coin_doxy_logname ) # output warning to stderr -set(coin_doxy_excludes "*/.git*") -set(coin_doxy_tagfiles ) -set(coin_doxy_tagname ) - -find_package(Doxygen) - -if (DOXYGEN AND COIN_ENABLE_DOXYGEN) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxydoc/doxygen.conf.in ${CMAKE_BINARY_DIR}/doxydoc/doxygen.conf) - - add_custom_target(docs - ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doxydoc/doxygen.conf) -endif () - -include_directories(${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/include - ${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/include/ampl) -link_directories(${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/lib - ${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/lib64) - -# -# HSL Management -# - -if (COIN_ENABLE_DOWNLOAD_METIS) # METIS found - add_definitions(-DCOINHSL_HAS_METIS) -endif () - -if (IPOPT_ENABLE_LINEARSOLVERLOADER OR IPOPT_ENABLE_PARDISOSOLVERLOADER) - add_definitions(-DIPOPT_HAS_LINEARSOLVERLOADER) - - find_package(DL) -endif () - -if (IPOPT_HAS_MUMPS) - set(COINHSL_HAS_MUMPS ON) -endif () - -if (IPOPT_HAS_WSMP) - add_definitions(-DIPOPT_HAS_WSMP) - - set(COINHSL_HAS_WSMP ON) -endif () - -add_subdirectory(Ipopt) - -# -# Packaging -# - -set(CPACK_PACKAGE_NAME "${PACKAGE_NAME}") -set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${IPOPT_VERSION}-${CMAKE_SYSTEM_NAME}") - -message(STATUS "Package filename: ${CPACK_PACKAGE_FILE_NAME}") - -set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PACKAGE_NAME}") -set(CPACK_PACKAGE_VERSION "${IPOPT_VERSION}") - -set(CPACK_PACKAGE_RELOCATABLE TRUE) - -if (WIN32) - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}") - set(CPACK_MONOLITHIC_INSTALL ON) - set(CPACK_NSIS_CONTACT "${PACKAGE_BUGREPORT}") - set(CPACK_NSIS_MODIFY_PATH ON) - set(CPACK_NSIS_PACKAGE_NAME "IpOpt ${IPOPT_VERSION}") -elseif (APPLE) - set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) - set(CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") - set(CPACK_PACKAGING_INSTALL_PREFIX "/") -else (WIN32) - set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) - set(CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") - set(CPACK_PACKAGING_INSTALL_PREFIX "/") - - set(CPACK_DEBIAN_PACKAGE_SECTION "Libraries") - set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${PACKAGE_BUGREPORT}") - - set(CPACK_RPM_COMPONENT_INSTALL ON) - set(CPACK_RPM_PACKAGE_RELOCATABLE ON) - set(CPACK_RPM_PACKAGE_LICENSE "Copyrighted") - set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries") - set(CPACK_RPM_PACKAGE_URL "${PACKAGE_URL}") - set(CPACK_RPM_PACKAGE_SUMMARY "IpOpt is a non linear constrained solver library from CoinOR.") - set(CPACK_RPM_PACKAGE_DESCRIPTION - "The CoinUtils suite includes: - - * The IpOpt non linear constrained solver. -" - ) -endif () - -include(CPack) -include(CTest) - -########################### -# # -# Sum-up of configuration # -# # -########################### - -# available colors: {u,b,bg, } black, red, green, yellow, blue, purple, cyan, white, reset - -color_message("${color_green}") -color_message("************************") -color_message("* *") -color_message("* Configuration sum-up *") -color_message("* *") -color_message("************************") -color_message("${color_reset} ") - -color_message("${color_cyan}Installation directory:${color_reset} ${CMAKE_INSTALL_PREFIX}") -color_message("${color_cyan}Build type:${color_reset} ${CMAKE_BUILD_TYPE}") - -get_directory_property(ALL_INCLUDES INCLUDE_DIRECTORIES) -get_directory_property(ALL_LINKS LINK_DIRECTORIES) -get_directory_property(ALL_DEFS COMPILE_DEFINITIONS) - -message(STATUS "${color_cyan}Include directories:${color_reset} ${ALL_INCLUDES}") -message(STATUS "${color_cyan}Link directories:${color_reset} ${ALL_LINKS}") -message(STATUS "${color_cyan}Compilation definitions:${color_reset} ${ALL_DEFS}") - -# -# Install part -# - -install(FILES LICENSE README.md AUTHORS - DESTINATION share/coin/doc/Ipopt/) diff --git a/recipe/cmake/Ipopt/CMakeLists.txt b/recipe/cmake/Ipopt/CMakeLists.txt deleted file mode 100644 index 8f361b0..0000000 --- a/recipe/cmake/Ipopt/CMakeLists.txt +++ /dev/null @@ -1,957 +0,0 @@ -# TODO: -# add ScalableProblems_java - -get_ac_init_version(${Ipopt_DIR}/configure.ac IPOPT) - -set(IPOPT_VERSION_MAJOR "${IPOPT_MAJOR_VERSION}" CACHE STRING "The IpOpt major version number") -set(IPOPT_VERSION_MINOR "${IPOPT_MINOR_VERSION}" CACHE STRING "The IpOpt minor version number") -set(IPOPT_VERSION_RELEASE "${IPOPT_PATCH_VERSION}" CACHE STRING "The IpOpt patch version number") -set(IPOPT_VERSION "${IPOPT_VERSION_STRING}" CACHE STRING "The IpOpt version") - -set(IPOPT_WC_REVISION "0") -if (EXISTS "${Ipopt_DIR}/.svn") - find_package(Subversion) - if (Subversion_FOUND) - Subversion_WC_INFO(${Ipopt_DIR} IPOPT) - endif () -endif () - -if (EXISTS "${Ipopt_DIR}/.git") - find_package(Git) - if (Git_FOUND) - include(export_git) - GIT_WC_INFO(${Ipopt_DIR} IPOPT) - set(IPOPT_WC_REVISION "${IPOPT_WC_SVNEQUIV}") # alphanumeric rev not yet managed - endif () -endif () - -message(STATUS "Current IPOPT revision is ${IPOPT_WC_REVISION}") -set(IPOPT_SVN_REV "${IPOPT_WC_REVISION}" CACHE STRING "The IPOPT subversion revision" FORCE) - -mark_as_advanced(IPOPT_VERSION_MAJOR - IPOPT_VERSION_MINOR - IPOPT_VERSION_RELEASE - IPOPT_VERSION - IPOPT_SVN_REV) - -add_definitions(-DIPOPTLIB_BUILD) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.in ${CMAKE_BINARY_DIR}/Ipopt/include/config.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config_ipopt.h.in ${CMAKE_BINARY_DIR}/Ipopt/include/config_ipopt.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config_ipopt.h.in ${CMAKE_BINARY_DIR}/Ipopt/include/install/IpoptConfig.h) - -# -# pkg-config file generation -# - -set(prefix "${CMAKE_INSTALL_PREFIX}") -set(exec_prefix "\${prefix}") -set(libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") -set(includedir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") -set(IPOPTLIB_LFLAGS_NOPC "-lm -ldl") -set(IPOPTLIB_PCFILES "") -if (COIN_HAS_LAPACK OR COIN_USE_SYSTEM_LAPACK) - set(IPOPTLIB_PCFILES "${IPOPTLIB_PCFILES} -llapack") -endif () -if (COIN_HAS_BLAS OR COIN_USE_BLAS) - set(IPOPTLIB_PCFILES "${IPOPTLIB_PCFILES} -lblas") -endif () -if (COIN_ENABLE_DOWNLOAD_CLAPACK) - set(IPOPTLIB_PCFILES "${IPOPTLIB_PCFILES} -lf2c") -endif () -set(PACKAGE_VERSION "${IPOPT_VERSION}") -set(IPOPT_OUTPUT_NAME "ipopt-3") - -configure_file(${CMAKE_CURRENT_LIST_DIR}/ipopt_cmake.pc.in ${CMAKE_BINARY_DIR}/Ipopt/ipopt.pc @ONLY) - -set(libdir "${Ipopt_DIR}") -set(abs_source_dir "${CMAKE_BINARY_DIR}/bin") - -install(FILES ${CMAKE_BINARY_DIR}/Ipopt/ipopt.pc - DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/) - -# -# Build -# - -set (IPOPT_SRC_ALGORITHM_LIST ${Ipopt_DIR}/src/Algorithm/IpAdaptiveMuUpdate.cpp - ${Ipopt_DIR}/src/Algorithm/IpAlgBuilder.cpp - ${Ipopt_DIR}/src/Algorithm/IpAlgorithmRegOp.cpp - ${Ipopt_DIR}/src/Algorithm/IpAugRestoSystemSolver.cpp - ${Ipopt_DIR}/src/Algorithm/IpBacktrackingLineSearch.cpp - ${Ipopt_DIR}/src/Algorithm/IpDefaultIterateInitializer.cpp - ${Ipopt_DIR}/src/Algorithm/IpEquilibrationScaling.cpp - ${Ipopt_DIR}/src/Algorithm/IpExactHessianUpdater.cpp - ${Ipopt_DIR}/src/Algorithm/IpFilterLSAcceptor.cpp - ${Ipopt_DIR}/src/Algorithm/IpFilter.cpp - ${Ipopt_DIR}/src/Algorithm/IpGenAugSystemSolver.cpp - ${Ipopt_DIR}/src/Algorithm/IpGradientScaling.cpp - ${Ipopt_DIR}/src/Algorithm/IpIpoptAlg.cpp - ${Ipopt_DIR}/src/Algorithm/IpIpoptCalculatedQuantities.cpp - ${Ipopt_DIR}/src/Algorithm/IpIpoptData.cpp - ${Ipopt_DIR}/src/Algorithm/IpIteratesVector.cpp - ${Ipopt_DIR}/src/Algorithm/IpLeastSquareMults.cpp - ${Ipopt_DIR}/src/Algorithm/IpLimMemQuasiNewtonUpdater.cpp - ${Ipopt_DIR}/src/Algorithm/IpLoqoMuOracle.cpp - ${Ipopt_DIR}/src/Algorithm/IpLowRankAugSystemSolver.cpp - ${Ipopt_DIR}/src/Algorithm/IpLowRankSSAugSystemSolver.cpp - ${Ipopt_DIR}/src/Algorithm/IpMonotoneMuUpdate.cpp - ${Ipopt_DIR}/src/Algorithm/IpNLPBoundsRemover.cpp - ${Ipopt_DIR}/src/Algorithm/IpNLPScaling.cpp - ${Ipopt_DIR}/src/Algorithm/IpOptErrorConvCheck.cpp - ${Ipopt_DIR}/src/Algorithm/IpOrigIpoptNLP.cpp - ${Ipopt_DIR}/src/Algorithm/IpOrigIterationOutput.cpp - ${Ipopt_DIR}/src/Algorithm/IpPDFullSpaceSolver.cpp - ${Ipopt_DIR}/src/Algorithm/IpPDPerturbationHandler.cpp - ${Ipopt_DIR}/src/Algorithm/IpPDSearchDirCalc.cpp - ${Ipopt_DIR}/src/Algorithm/IpPenaltyLSAcceptor.cpp - ${Ipopt_DIR}/src/Algorithm/IpProbingMuOracle.cpp - ${Ipopt_DIR}/src/Algorithm/IpQualityFunctionMuOracle.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoConvCheck.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoFilterConvCheck.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoIpoptNLP.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoIterateInitializer.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoIterationOutput.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoMinC_1Nrm.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoPenaltyConvCheck.cpp - ${Ipopt_DIR}/src/Algorithm/IpRestoRestoPhase.cpp - ${Ipopt_DIR}/src/Algorithm/IpStdAugSystemSolver.cpp - ${Ipopt_DIR}/src/Algorithm/IpTimingStatistics.cpp - ${Ipopt_DIR}/src/Algorithm/IpUserScaling.cpp - ${Ipopt_DIR}/src/Algorithm/IpWarmStartIterateInitializer.cpp) - -set (IPOPT_SRC_ALGORITHM_INEXACT_LIST ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactAlgBuilder.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactCq.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactData.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactDoglegNormal.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactLSAcceptor.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactNewtonNormal.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactNormalTerminationTester.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactRegOp.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactSearchDirCalc.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactTSymScalingMethod.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpIterativeSolverTerminationTester.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactPDSolver.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpInexactPDTerminationTester.cpp - ${Ipopt_DIR}/src/Algorithm/Inexact/IpIterativePardisoSolverInterface.cpp) - -set (IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpLinearSolvers.c - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpLinearSolversRegOp.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpSlackBasedTSymScalingMethod.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpTripletToCSRConverter.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpTSymDependencyDetector.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpTSymLinearSolver.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMa27TSolverInterface.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMa57TSolverInterface.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMa86SolverInterface.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMa97SolverInterface.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMc19TSymScalingMethod.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMa28TDependencyDetector.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMa77SolverInterface.cpp) - -if (IPOPT_ENABLE_LINEARSOLVERLOADER OR COIN_ENABLE_COMPILE_HSL OR COIN_USE_COINHSL) - enable_language(Fortran) -endif () - -if (IPOPT_ENABLE_LINEARSOLVERLOADER AND (NOT "${CMAKE_Fortran_COMPILER}" STREQUAL "")) - set (IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST ${IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST} - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpPardisoSolverInterface.cpp) -else () - if (IPOPT_HAS_PARDISO) - set (IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST ${IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST} - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpPardisoSolverInterface.cpp) - endif () - if (COINHSL_HAS_MA28 AND (NOT "${CMAKE_Fortran_COMPILER}" STREQUAL "")) - set (IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST ${IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST} - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMa28Partition.F) - endif () -endif () - -if (IPOPT_HAS_WSMP) - set (IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST ${IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST} - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpWsmpSolverInterface.cpp - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpIterativeWsmpSolverInterface.cpp) -endif () - -if (IPOPT_HAS_MUMPS) - set (IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST ${IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST} - ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp) -endif () - -set (IPOPT_SRC_APPS_CUTERINTERFACE_LIST ) -set (IPOPT_SRC_APPS_AMPLSOLVER_LIST ) - -set (IPOPT_SRC_CONTRIB_CGPENALTY_LIST ${Ipopt_DIR}/src/contrib/CGPenalty/IpCGPenaltyCq.cpp - ${Ipopt_DIR}/src/contrib/CGPenalty/IpCGPenaltyData.cpp - ${Ipopt_DIR}/src/contrib/CGPenalty/IpCGPenaltyLSAcceptor.cpp - ${Ipopt_DIR}/src/contrib/CGPenalty/IpCGPenaltyRegOp.cpp - ${Ipopt_DIR}/src/contrib/CGPenalty/IpCGPerturbationHandler.cpp - ${Ipopt_DIR}/src/contrib/CGPenalty/IpCGSearchDirCalc.cpp - ${Ipopt_DIR}/src/contrib/CGPenalty/IpPiecewisePenalty.cpp) - -set (IPOPT_SRC_COMMON_LIST ${Ipopt_DIR}/src/Common/IpLibraryLoader.cpp - ${Ipopt_DIR}/src/Common/IpJournalist.cpp - ${Ipopt_DIR}/src/Common/IpObserver.cpp - ${Ipopt_DIR}/src/Common/IpOptionsList.cpp - ${Ipopt_DIR}/src/Common/IpRegOptions.cpp - ${Ipopt_DIR}/src/Common/IpTaggedObject.cpp - ${Ipopt_DIR}/src/Common/IpUtils.cpp) - -set (IPOPT_SRC_INTERFACES_LIST ${Ipopt_DIR}/src/Interfaces/IpInterfacesRegOp.cpp - ${Ipopt_DIR}/src/Interfaces/IpIpoptApplication.cpp - ${Ipopt_DIR}/src/Interfaces/IpSolveStatistics.cpp - ${Ipopt_DIR}/src/Interfaces/IpStdCInterface.cpp - ${Ipopt_DIR}/src/Interfaces/IpStdFInterface.c - ${Ipopt_DIR}/src/Interfaces/IpStdInterfaceTNLP.cpp - ${Ipopt_DIR}/src/Interfaces/IpTNLP.cpp - ${Ipopt_DIR}/src/Interfaces/IpTNLPAdapter.cpp - ${Ipopt_DIR}/src/Interfaces/IpTNLPReducer.cpp) - -set (IPOPT_SRC_LINALG_LIST ${Ipopt_DIR}/src/LinAlg/IpBlas.cpp - ${Ipopt_DIR}/src/LinAlg/IpCompoundMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpCompoundSymMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpCompoundVector.cpp - ${Ipopt_DIR}/src/LinAlg/IpDenseGenMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpDenseSymMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpDenseVector.cpp - ${Ipopt_DIR}/src/LinAlg/IpDiagMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpExpandedMultiVectorMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpExpansionMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpIdentityMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpLapack.cpp - ${Ipopt_DIR}/src/LinAlg/IpLowRankUpdateSymMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpMultiVectorMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpScaledMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpSumMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpSumSymMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpSymScaledMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpTransposeMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpVector.cpp - ${Ipopt_DIR}/src/LinAlg/IpZeroMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/IpZeroSymMatrix.cpp) - -set (IPOPT_SRC_LINALG_TMATRICES ${Ipopt_DIR}/src/LinAlg/TMatrices/IpGenTMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/TMatrices/IpSymTMatrix.cpp - ${Ipopt_DIR}/src/LinAlg/TMatrices/IpTripletHelper.cpp) - -set (IPOPT_SRC_LIST ${IPOPT_SRC_ALGORITHM_LIST} - ${IPOPT_SRC_ALGORITHM_LINEARSOLVERS_LIST} - ${IPOPT_SRC_APPS_CUTERINTERFACE_LIST} - ${IPOPT_SRC_APPS_AMPLSOLVER_LIST} - ${IPOPT_SRC_CONTRIB_CGPENALTY_LIST} - ${IPOPT_SRC_COMMON_LIST} - ${IPOPT_SRC_INTERFACES_LIST} - ${IPOPT_SRC_LINALG_LIST} - ${IPOPT_SRC_LINALG_TMATRICES}) - -if (IPOPT_ENABLE_INEXACT) - set(IPOPT_SRC_LIST ${IPOPT_SRC_LIST} - ${IPOPT_SRC_ALGORITHM_INEXACT_LIST}) -endif () - -macro(set_include_directories TARGET) - target_include_directories(${TARGET} BEFORE PRIVATE ${CMAKE_BINARY_DIR}/Ipopt/include) -endmacro () - -include_directories(${Ipopt_DIR}/src/Algorithm) -include_directories(${Ipopt_DIR}/src/Algorithm/LinearSolvers) -include_directories(${Ipopt_DIR}/src/Algorithm/Inexact) -include_directories(${Ipopt_DIR}/src/contrib/CGPenalty) -include_directories(${Ipopt_DIR}/src/contrib/LinearSolverLoader) -include_directories(${Ipopt_DIR}/src/Interfaces) -include_directories(${Ipopt_DIR}/src/Common) -include_directories(${Ipopt_DIR}/src/LinAlg) -include_directories(${Ipopt_DIR}/src/Apps/AmplSolver) -include_directories(${Ipopt_DIR}/src/LinAlg/TMatrices) - -if (WIN32) - add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) -endif () - -if (IPOPT_HAS_PARDISO) - add_definition(-DHAVE_PARDISO=1) - if (IPOPT_HAS_PARDISO_MKL) - add_definition(-DHAVE_PARDISO_MKL=1) - endif () - if (IPOPT_HAS_PARDISO_OLDINTERFACE) - add_definition(-DHAVE_PARDISO_OLDINTERFACE=1) - endif () - if (IPOPT_HAS_PARDISO_PARALLEL) - add_definition(-DHAVE_PARDISO_PARALLEL=1) - endif () -endif () - -if (IPOPT_HAS_AMPL) - set(IPOPT_SRC_LIST ${IPOPT_SRC_LIST} - ${Ipopt_DIR}/src/Apps/AmplSolver/AmplTNLP.cpp) -endif () - -if (ENABLE_SHARED_LIBRARIES) - add_library(libipopt SHARED ${IPOPT_SRC_LIST}) -else () - add_library(libipopt STATIC ${IPOPT_SRC_LIST}) -endif () -set_target_properties(libipopt PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) -set_target_properties(libipopt PROPERTIES OUTPUT_NAME ${IPOPT_OUTPUT_NAME}) - -if (COIN_COMPILE_LTO) - set_target_properties(libipopt PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) -endif () -if (NOT WIN32) - set_target_properties(libipopt PROPERTIES PREFIX "") -endif () -set_include_directories(libipopt) - -if (IPOPT_HAS_MUMPS) - target_link_libraries(libipopt dmumps mumps_common) -endif () - -if (COIN_HAS_LAPACK OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(libipopt lapack blas) -endif () - -if (IPOPT_HAS_AMPL) - set (IPOPT_AMPL_SRC_LIST ${Ipopt_DIR}/src/Apps/AmplSolver/ampl_ipopt.cpp) - - add_definitions(-DIPOPTAMPL_BUILD) - - add_executable(ipopt ${IPOPT_AMPL_SRC_LIST}) - - target_link_libraries(ipopt libipopt) - if (COIN_HAS_MUMPS) - target_link_libraries(ipopt dmumps mumps_common seq pthread) - endif () - if (COIN_ENABLE_COMPILE_HSL) - if (IPOPT_ENABLE_LINEARSOLVERLOADER) - target_link_libraries(ipopt hsl) - else () - target_link_libraries(ipopt hsl-static) - endif () - if (COIN_HAS_HSL_OTHER) - target_link_libraries(ipopt hsl-other) - endif () - endif () - if (MKL_FOUND) - target_link_libraries(ipopt ${COIN_MKL_LIBS}) - else () - if (COIN_HAS_LAPACK OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(ipopt lapack blas) - endif () - if (COIN_ENABLE_DOWNLOAD_CLAPACK) - target_link_libraries(ipopt f2c) - endif () - endif () - if (COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_ENABLE_DOWNLOAD_MUMPS OR COIN_ENABLE_COMPILE_HSL OR COIN_HAS_MUMPS OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(ipopt gfortran) - endif () - if ((IPOPT_ENABLE_LINEARSOLVERLOADER OR COIN_ENABLE_DOWNLOAD_ASL OR ENABLE_SHARED_LIBRARIES) AND UNIX) - target_link_libraries(ipopt dl) - endif () - if (COIN_ENABLE_DOWNLOAD_ASL) - target_link_libraries(ipopt amplsolver) - endif () - if (COIN_ENABLE_DOWNLOAD_METIS) - target_link_libraries(ipopt metis) - endif () - if (IPOPT_HAS_WSMP) - target_link_libraries(ipopt wsmp) - endif () - if (IPOPT_HAS_PARDISO) - target_link_libraries(ipopt wsmp) - if (WIN32) - if (CMAKE_SIZEOF_VOID_P EQUAL 4) - target_link_libraries(ipopt mkl_intel_c.lib mkl_sequential.lib mkl_core.lib) - else () - target_link_libraries(ipopt mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib) - endif () - else () - set(MKL_TMP_LIB "-Wl,--start-group -lmkl_core") - if (CMAKE_SIZEOF_VOID_P EQUAL 4) - set(MKL_TMP_LIB "${MKL_TMP_LIB} -lmkl_intel") - else () - set(MKL_TMP_LIB "${MKL_TMP_LIB} -lmkl_intel_lp64") - endif () - if (IPOPT_HAS_PARDISO_PARALLEL) - set(MKL_TMP_LIB "${MKL_TMP_LIB} -lmkl_intel_thread") - else () - set(MKL_TMP_LIB "${MKL_TMP_LIB} -lmkl_sequential") - endif () - set(MKL_TMP_LIB "${MKL_TMP_LIB} -Wl,--end-group") - - target_link_libraries(ipopt ${MKL_TMP_LIB}) - endif () - endif () - - set_include_directories(ipopt) - - install(TARGETS ipopt - DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}) - - include(${CMAKE_SOURCE_DIR}/ThirdParty/IpoptTests.cmake) -endif () - -if (IPOPT_BUILD_EXAMPLES) - set(ScalableProblems_SRCS ${Ipopt_DIR}/examples/ScalableProblems/LuksanVlcek1.cpp - ${Ipopt_DIR}/examples/ScalableProblems/LuksanVlcek2.cpp - ${Ipopt_DIR}/examples/ScalableProblems/LuksanVlcek3.cpp - ${Ipopt_DIR}/examples/ScalableProblems/LuksanVlcek4.cpp - ${Ipopt_DIR}/examples/ScalableProblems/LuksanVlcek5.cpp - ${Ipopt_DIR}/examples/ScalableProblems/LuksanVlcek6.cpp - ${Ipopt_DIR}/examples/ScalableProblems/LuksanVlcek7.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannBndryCntrlDiri3Dsin.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannBndryCntrlDiri3D_27.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannBndryCntrlDiri3D.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannDistCntrlDiri.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannBndryCntrlDiri.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannDistCntrlNeumA.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannDistCntrlNeumB.cpp - ${Ipopt_DIR}/examples/ScalableProblems/MittelmannBndryCntrlNeum.cpp - ${Ipopt_DIR}/examples/ScalableProblems/RegisteredTNLP.cpp - ${Ipopt_DIR}/examples/ScalableProblems/solve_problem.cpp) - - add_executable(solve_problem ${ScalableProblems_SRCS}) - target_link_libraries(solve_problem libipopt) - if (COIN_COMPILE_LTO) - set_target_properties(solve_problem PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) - endif () - if (COIN_HAS_MUMPS) - target_link_libraries(solve_problem dmumps mumps_common seq pthread) - endif () - if (COIN_ENABLE_COMPILE_HSL) - if (IPOPT_ENABLE_LINEARSOLVERLOADER) - target_link_libraries(solve_problem hsl) - else () - target_link_libraries(solve_problem hsl-static) - endif () - if (COIN_HAS_HSL_OTHER) - target_link_libraries(solve_problem hsl-other) - endif () - endif () - if (MKL_FOUND) - target_link_libraries(solve_problem ${COIN_MKL_LIBS}) - else () - if (COIN_HAS_LAPACK OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(solve_problem lapack blas) - endif () - if (COIN_ENABLE_DOWNLOAD_CLAPACK) - target_link_libraries(solve_problem f2c) - endif () - endif () - if (COIN_LINK_GFORTRAN AND (COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_MUMPS OR COIN_HAS_MUMPS OR COIN_USE_SYSTEM_LAPACK)) - target_link_libraries(solve_problem gfortran) - endif () - if ((IPOPT_ENABLE_LINEARSOLVERLOADER OR COIN_ENABLE_DOWNLOAD_ASL OR ENABLE_SHARED_LIBRARIES) AND UNIX) - target_link_libraries(solve_problem dl) - endif () - if (COIN_ENABLE_DOWNLOAD_METIS) - target_link_libraries(solve_problem metis) - endif () - include_directories(${Ipopt_DIR}/examples/ScalableProblems) - set_include_directories(solve_problem) - - add_test(NAME ipopt_example_luksan_LukVlE1 - COMMAND $ LukVlE1 10) - set_tests_properties(ipopt_example_luksan_LukVlE1 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlE1 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlE2 - COMMAND $ LukVlE2 14) - set_tests_properties(ipopt_example_luksan_LukVlE2 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlE2 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlE3 - COMMAND $ LukVlE3 10) - set_tests_properties(ipopt_example_luksan_LukVlE3 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlE3 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlE4 - COMMAND $ LukVlE4 10) - set_tests_properties(ipopt_example_luksan_LukVlE4 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlE4 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlE5 - COMMAND $ LukVlE5 10) - set_tests_properties(ipopt_example_luksan_LukVlE5 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlE5 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlE6 - COMMAND $ LukVlE6 10) - set_tests_properties(ipopt_example_luksan_LukVlE6 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlE6 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlE7 - COMMAND $ LukVlE7 4) - set_tests_properties(ipopt_example_luksan_LukVlE7 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlE7 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlI1 - COMMAND $ LukVlI1 10) - set_tests_properties(ipopt_example_luksan_LukVlI1 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlI1 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlI2 - COMMAND $ LukVlI2 14) - set_tests_properties(ipopt_example_luksan_LukVlI2 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlI2 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlI3 - COMMAND $ LukVlI3 10) - set_tests_properties(ipopt_example_luksan_LukVlI3 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlI3 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlI4 - COMMAND $ LukVlI4 10) - set_tests_properties(ipopt_example_luksan_LukVlI4 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlI4 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlI5 - COMMAND $ LukVlI5 10) - set_tests_properties(ipopt_example_luksan_LukVlI5 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlI5 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlI6 - COMMAND $ LukVlI6 10) - set_tests_properties(ipopt_example_luksan_LukVlI6 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlI6 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_LukVlI7 - COMMAND $ LukVlI7 4) - set_tests_properties(ipopt_example_luksan_LukVlI7 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_LukVlI7 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl1 - COMMAND $ MBndryCntrl1 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl1 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl1 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl2 - COMMAND $ MBndryCntrl2 14) - set_tests_properties(ipopt_example_luksan_MBndryCntrl2 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl2 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl3 - COMMAND $ MBndryCntrl3 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl3 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl3 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl4 - COMMAND $ MBndryCntrl4 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl4 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl4 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl5 - COMMAND $ MBndryCntrl5 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl5 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl5 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl6 - COMMAND $ MBndryCntrl6 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl6 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl6 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl7 - COMMAND $ MBndryCntrl7 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl7 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl7 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl8 - COMMAND $ MBndryCntrl8 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl8 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl8 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl_3D - COMMAND $ MBndryCntrl_3D 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3D PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3D PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl_3D_27 - COMMAND $ MBndryCntrl_3D_27 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3D_27 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3D_27 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl_3D_27BT - COMMAND $ MBndryCntrl_3D_27BT 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3D_27BT PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3D_27BT PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MBndryCntrl_3Dsin - COMMAND $ MBndryCntrl_3Dsin 10) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3Dsin PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MBndryCntrl_3Dsin PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl1 - COMMAND $ MDistCntrl1 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl1 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl1 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl2 - COMMAND $ MDistCntrl2 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl2 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl2 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl3 - COMMAND $ MDistCntrl3 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl3 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl3 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl3a - COMMAND $ MDistCntrl3a 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl3a PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl3a PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl4 - COMMAND $ MDistCntrl4 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl4 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl4 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl4a - COMMAND $ MDistCntrl4a 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl4a PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl4a PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl5 - COMMAND $ MDistCntrl5 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl5 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl5 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl5a - COMMAND $ MDistCntrl5a 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl5a PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl5a PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl6 - COMMAND $ MDistCntrl6 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl6 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl6 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MDistCntrl6a - COMMAND $ MDistCntrl6a 10) - set_tests_properties(ipopt_example_luksan_MDistCntrl6a PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MDistCntrl6a PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MPara5_1 - COMMAND $ MPara5_1 10) - set_tests_properties(ipopt_example_luksan_MPara5_1 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MPara5_1 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MPara5_2_1 - COMMAND $ MPara5_2_1 10) - set_tests_properties(ipopt_example_luksan_MPara5_2_1 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MPara5_2_1 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MPara5_2_2 - COMMAND $ MPara5_2_2 10) - set_tests_properties(ipopt_example_luksan_MPara5_2_2 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MPara5_2_2 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - add_test(NAME ipopt_example_luksan_MPara5_2_3 - COMMAND $ MPara5_2_3 10) - set_tests_properties(ipopt_example_luksan_MPara5_2_3 PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_luksan_MPara5_2_3 PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - set(Cpp_example_SRCS ${Ipopt_DIR}/examples/Cpp_example/cpp_example.cpp - ${Ipopt_DIR}/examples/Cpp_example/MyNLP.cpp) - - add_executable(cpp_example ${Cpp_example_SRCS}) - target_link_libraries(cpp_example libipopt) - if (COIN_COMPILE_LTO) - set_target_properties(cpp_example PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) - endif () - if (COIN_HAS_MUMPS) - target_link_libraries(cpp_example dmumps mumps_common seq pthread) - endif () - if (COIN_ENABLE_COMPILE_HSL) - if (IPOPT_ENABLE_LINEARSOLVERLOADER) - target_link_libraries(cpp_example hsl) - else () - target_link_libraries(cpp_example hsl-static) - endif () - if (COIN_HAS_HSL_OTHER) - target_link_libraries(cpp_example hsl-other) - endif () - endif () - if (MKL_FOUND) - target_link_libraries(cpp_example ${COIN_MKL_LIBS}) - else () - if (COIN_HAS_LAPACK OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(cpp_example lapack blas) - endif () - if (COIN_ENABLE_DOWNLOAD_CLAPACK) - target_link_libraries(cpp_example f2c) - endif () - endif () - if (COIN_LINK_GFORTRAN AND (COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_MUMPS OR COIN_HAS_MUMPS OR COIN_USE_SYSTEM_LAPACK)) - target_link_libraries(cpp_example gfortran) - endif () - if ((IPOPT_ENABLE_LINEARSOLVERLOADER OR COIN_ENABLE_DOWNLOAD_ASL OR ENABLE_SHARED_LIBRARIES) AND UNIX) - target_link_libraries(cpp_example dl) - endif () - if (COIN_ENABLE_DOWNLOAD_METIS) - target_link_libraries(cpp_example metis) - endif () - if (UNIX) - target_link_libraries(cpp_example m) - endif () - set_include_directories(cpp_example) - - add_test(NAME ipopt_example_cpp_example - COMMAND $) - set_tests_properties(ipopt_example_cpp_example PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_cpp_example PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - - set(hs071_c_SRCS ${Ipopt_DIR}/examples/hs071_c/hs071_c.c) - - add_executable(hs071_c ${hs071_c_SRCS}) - target_link_libraries(hs071_c libipopt) - if (COIN_COMPILE_LTO) - set_target_properties(hs071_c PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) - endif () - if (COIN_HAS_MUMPS) - target_link_libraries(hs071_c dmumps mumps_common seq pthread) - endif () - if (COIN_ENABLE_COMPILE_HSL) - if (IPOPT_ENABLE_LINEARSOLVERLOADER) - target_link_libraries(hs071_c hsl) - else () - target_link_libraries(hs071_c hsl-static) - endif () - if (COIN_HAS_HSL_OTHER) - target_link_libraries(hs071_c hsl-other) - endif () - endif () - if (MKL_FOUND) - target_link_libraries(hs071_c ${COIN_MKL_LIBS}) - else () - if (COIN_HAS_LAPACK OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(hs071_c lapack blas) - endif () - if (COIN_ENABLE_DOWNLOAD_CLAPACK) - target_link_libraries(hs071_c f2c) - endif () - endif () - if (COIN_LINK_GFORTRAN AND (COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_MUMPS OR COIN_HAS_MUMPS OR COIN_USE_SYSTEM_LAPACK)) - target_link_libraries(hs071_c gfortran) - endif () - if ((IPOPT_ENABLE_LINEARSOLVERLOADER OR COIN_ENABLE_DOWNLOAD_ASL OR ENABLE_SHARED_LIBRARIES) AND UNIX) - target_link_libraries(hs071_c dl) - endif () - if (COIN_ENABLE_DOWNLOAD_METIS) - target_link_libraries(hs071_c metis) - endif () - if (UNIX) - target_link_libraries(hs071_c m) - endif () - set_include_directories(hs071_c) - - add_test(NAME ipopt_example_hs071_c - COMMAND $) - set_tests_properties(ipopt_example_hs071_c PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_hs071_c PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - - set(hs071_cpp_SRCS ${Ipopt_DIR}/examples/hs071_cpp/hs071_main.cpp - ${Ipopt_DIR}/examples/hs071_cpp/hs071_nlp.cpp) - - add_executable(hs071_cpp ${hs071_cpp_SRCS}) - target_link_libraries(hs071_cpp libipopt) - if (COIN_COMPILE_LTO) - set_target_properties(hs071_cpp PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) - endif () - if (COIN_HAS_MUMPS) - target_link_libraries(hs071_cpp dmumps mumps_common seq gfortran pthread) - endif () - if (COIN_ENABLE_COMPILE_HSL) - if (IPOPT_ENABLE_LINEARSOLVERLOADER) - target_link_libraries(hs071_cpp hsl) - else () - target_link_libraries(hs071_cpp hsl-static) - endif () - if (COIN_HAS_HSL_OTHER) - target_link_libraries(hs071_cpp hsl-other) - endif () - endif () - if (MKL_FOUND) - target_link_libraries(hs071_cpp ${COIN_MKL_LIBS}) - else () - if (COIN_HAS_LAPACK OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(hs071_cpp lapack blas) - endif () - if (COIN_ENABLE_DOWNLOAD_CLAPACK) - target_link_libraries(hs071_cpp f2c) - endif () - endif () - if (COIN_LINK_GFORTRAN AND (COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_MUMPS OR COIN_HAS_MUMPS OR COIN_USE_SYSTEM_LAPACK)) - target_link_libraries(hs071_cpp gfortran) - endif () - if ((IPOPT_ENABLE_LINEARSOLVERLOADER OR COIN_ENABLE_DOWNLOAD_ASL OR ENABLE_SHARED_LIBRARIES) AND UNIX) - target_link_libraries(hs071_cpp dl) - endif () - if (COIN_ENABLE_DOWNLOAD_METIS) - target_link_libraries(hs071_cpp metis) - endif () - if (UNIX) - target_link_libraries(hs071_cpp m) - endif () - set_include_directories(hs071_cpp) - - add_test(NAME ipopt_example_hs071_cpp - COMMAND $) - set_tests_properties(ipopt_example_hs071_cpp PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_hs071_cpp PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - - - if (NOT "${CMAKE_Fortran_COMPILER}" STREQUAL "") - if (HAVE_64_BIT) - set(BIT32FCOMMENT "C") - set(BIT64FCOMMENT "") - else () - set(BIT32FCOMMENT "") - set(BIT64FCOMMENT "C") - endif () - - configure_file(${Ipopt_DIR}/examples/hs071_f/hs071_f.f.in ${CMAKE_BINARY_DIR}/hs071_f.f) - set(hs071_f_SRCS ${CMAKE_BINARY_DIR}/hs071_f.f) - - add_executable(hs071_f ${hs071_f_SRCS}) - target_link_libraries(hs071_f libipopt) - if (COIN_COMPILE_LTO) - set_target_properties(hs071_f PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) - endif () - if (COIN_HAS_MUMPS) - target_link_libraries(hs071_f dmumps mumps_common seq pthread) - endif () - if (COIN_ENABLE_COMPILE_HSL) - if (IPOPT_ENABLE_LINEARSOLVERLOADER) - target_link_libraries(hs071_f hsl) - else () - target_link_libraries(hs071_f hsl-static) - endif () - if (COIN_HAS_HSL_OTHER) - target_link_libraries(hs071_f hsl-other) - endif () - endif () - if (MKL_FOUND) - target_link_libraries(hs071_f ${COIN_MKL_LIBS}) - else () - if (COIN_HAS_LAPACK OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_USE_SYSTEM_LAPACK) - target_link_libraries(hs071_f lapack blas) - endif () - if (COIN_ENABLE_DOWNLOAD_CLAPACK) - target_link_libraries(hs071_f f2c) - endif () - endif () - if (COIN_LINK_GFORTRAN AND (COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_LAPACK OR COIN_ENABLE_COMPILE_HSL OR COIN_ENABLE_DOWNLOAD_MUMPS OR COIN_HAS_MUMPS OR COIN_USE_SYSTEM_LAPACK)) - target_link_libraries(hs071_f gfortran) - endif () - if ((IPOPT_ENABLE_LINEARSOLVERLOADER OR COIN_ENABLE_DOWNLOAD_ASL OR ENABLE_SHARED_LIBRARIES) AND UNIX) - target_link_libraries(hs071_f dl) - endif () - if (COIN_ENABLE_DOWNLOAD_METIS) - target_link_libraries(hs071_f metis) - endif () - if (UNIX) - target_link_libraries(hs071_f m) - endif () - set_include_directories(hs071_f) - add_test(NAME ipopt_example_hs071_f - COMMAND $) - set_tests_properties(ipopt_example_hs071_f PROPERTIES TIMEOUT 30) - set_tests_properties(ipopt_example_hs071_f PROPERTIES PASS_REGULAR_EXPRESSION "EXIT: Optimal Solution Found.") - endif () -endif () - -# -# Install part -# - -set(LINALG_HDRS ${Ipopt_DIR}/src/LinAlg/IpMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpSymMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpExpansionMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpVector.hpp - ${Ipopt_DIR}/src/LinAlg/IpDenseVector.hpp - ${Ipopt_DIR}/src/LinAlg/IpCompoundVector.hpp - ${Ipopt_DIR}/src/LinAlg/IpCompoundMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpCompoundSymMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpSumSymMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpDiagMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpIdentityMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpScaledMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpSymScaledMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpZeroSymMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/IpBlas.hpp - ${Ipopt_DIR}/src/LinAlg/IpLapack.hpp) - -set(TMATRICES_HDRS ${Ipopt_DIR}/src/LinAlg/TMatrices/IpGenTMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/TMatrices/IpSymTMatrix.hpp - ${Ipopt_DIR}/src/LinAlg/TMatrices/IpTripletHelper.hpp) - -set(INTERFACES_HDRS ${Ipopt_DIR}/src/Interfaces/IpAlgTypes.hpp - ${Ipopt_DIR}/src/Interfaces/IpIpoptApplication.hpp - ${Ipopt_DIR}/src/Interfaces/IpNLP.hpp - ${Ipopt_DIR}/src/Interfaces/IpReturnCodes.h - ${Ipopt_DIR}/src/Interfaces/IpReturnCodes.hpp - ${Ipopt_DIR}/src/Interfaces/IpReturnCodes_inc.h - ${Ipopt_DIR}/src/Interfaces/IpReturnCodes.inc - ${Ipopt_DIR}/src/Interfaces/IpSolveStatistics.hpp - ${Ipopt_DIR}/src/Interfaces/IpStdCInterface.h - ${Ipopt_DIR}/src/Interfaces/IpTNLP.hpp - ${Ipopt_DIR}/src/Interfaces/IpTNLPAdapter.hpp - ${Ipopt_DIR}/src/Interfaces/IpTNLPReducer.hpp) - -set(COMMON_HDRS ${Ipopt_DIR}/src/Common/IpCachedResults.hpp - ${Ipopt_DIR}/src/Common/IpDebug.hpp - ${Ipopt_DIR}/src/Common/IpException.hpp - ${Ipopt_DIR}/src/Common/IpJournalist.hpp - ${Ipopt_DIR}/src/Common/IpLibraryLoader.hpp - ${Ipopt_DIR}/src/Common/IpObserver.hpp - ${Ipopt_DIR}/src/Common/IpOptionsList.hpp - ${Ipopt_DIR}/src/Common/IpReferenced.hpp - ${Ipopt_DIR}/src/Common/IpRegOptions.hpp - ${Ipopt_DIR}/src/Common/IpSmartPtr.hpp - ${Ipopt_DIR}/src/Common/IpTaggedObject.hpp - ${Ipopt_DIR}/src/Common/IpTimedTask.hpp - ${Ipopt_DIR}/src/Common/IpTypes.h - ${Ipopt_DIR}/src/Common/IpTypes.hpp - ${Ipopt_DIR}/src/Common/IpUtils.hpp) - -set(ALGORITHMS_HDRS ${Ipopt_DIR}/src/Algorithm/IpIpoptCalculatedQuantities.hpp - ${Ipopt_DIR}/src/Algorithm/IpIpoptData.hpp - ${Ipopt_DIR}/src/Algorithm/IpIteratesVector.hpp - ${Ipopt_DIR}/src/Algorithm/IpTimingStatistics.hpp - ${Ipopt_DIR}/src/Algorithm/IpIpoptNLP.hpp - ${Ipopt_DIR}/src/Algorithm/IpOrigIpoptNLP.hpp - ${Ipopt_DIR}/src/Algorithm/IpNLPScaling.hpp - ${Ipopt_DIR}/src/Algorithm/IpAlgBuilder.hpp - ${Ipopt_DIR}/src/Algorithm/IpIpoptAlg.hpp - ${Ipopt_DIR}/src/Algorithm/IpAlgStrategy.hpp - ${Ipopt_DIR}/src/Algorithm/IpSearchDirCalculator.hpp - ${Ipopt_DIR}/src/Algorithm/IpLineSearch.hpp - ${Ipopt_DIR}/src/Algorithm/IpMuUpdate.hpp - ${Ipopt_DIR}/src/Algorithm/IpConvCheck.hpp - ${Ipopt_DIR}/src/Algorithm/IpIterateInitializer.hpp - ${Ipopt_DIR}/src/Algorithm/IpIterationOutput.hpp - ${Ipopt_DIR}/src/Algorithm/IpHessianUpdater.hpp - ${Ipopt_DIR}/src/Algorithm/IpEqMultCalculator.hpp - ${Ipopt_DIR}/src/Algorithm/IpAugSystemSolver.hpp - ${Ipopt_DIR}/src/Algorithm/IpPDSystemSolver.hpp) - -set(LINEARSOLVERS_HDRS ${Ipopt_DIR}/src/Algorithm/LinearSolvers/IpSymLinearSolver.hpp) - -set(ALL_HDRS ${LINALG_HDRS} - ${TMATRICES_HDRS} - ${INTERFACES_HDRS} - ${COMMON_HDRS} - ${ALGORITHMS_HDRS} - ${LINEARSOLVERS_HDRS} - ${CMAKE_BINARY_DIR}/Ipopt/include/install/IpoptConfig.h) - -install(FILES ${ALL_HDRS} - DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/coin-or) - -install(TARGETS libipopt - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - diff --git a/recipe/cmake/Ipopt/include/config.h.in b/recipe/cmake/Ipopt/include/config.h.in deleted file mode 100644 index c42215d..0000000 --- a/recipe/cmake/Ipopt/include/config.h.in +++ /dev/null @@ -1,236 +0,0 @@ -/* src/Common/config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if the inexact linear solver option is included */ -#cmakedefine BUILD_INEXACT - -/* Define to be the name of C-function for Inf check */ -#define IPOPT_C_FINITE @COIN_C_FINITE@ - -/* Define to 1 if the ASL package is available */ -#cmakedefine IPOPT_HAS_ASL - -/* If defined, the BLAS Library is available. */ -#cmakedefine IPOPT_HAS_BLAS - -/* Define to 1 if the HSL package is available */ -#cmakedefine IPOPT_HAS_HSL - -/* If defined, the LAPACK Library is available. */ -#cmakedefine IPOPT_HAS_LAPACK - -/* Define to 1 if the Mumps package is available */ -#cmakedefine IPOPT_HAS_MUMPS - -/* Define to the debug sanity check level (0 is no test) */ -#define IPOPT_CHECKLEVEL @IPOPT_CHECKLEVEL@ - -/* Define to the debug verbosity level (0 is no output) */ -#define IPOPT_VERBOSITY @IPOPT_VERBOSITY@ - -/* Define to dummy `main' function (if any) required to link to the Fortran - libraries. */ -#cmakedefine F77_DUMMY_MAIN @F77_DUMMY_MAIN@ - -/* Define to a macro mangling the given C identifier (in lower and upper - case), which must not contain underscores, for linking with Fortran. */ -#define @F77_FUNC@ - -/* Define to a macro mangling the given C identifier (in lower and upper - case), which must not contain underscores, for linking with Fortran. */ -#define @IPOPT_LAPACK_FUNC@ - -/* As F77_FUNC, but for C identifiers containing underscores. */ -#define @F77_FUNC_@ - -/* Define if F77 and FC dummy `main' functions are identical. */ -#cmakedefine FC_DUMMY_MAIN_EQ_F77 @FC_DUMMY_MAIN_EQ_F77@ - -/* Define to the C type corresponding to Fortran INTEGER */ -#define IPOPT_FORTRAN_INTEGER_TYPE @IPOPT_FORTRAN_INTEGER_TYPE@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ASSERT_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CASSERT - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CCTYPE - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CFLOAT - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CIEEEFP - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CMATH - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CSTDARG - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CSTDDEF - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CSTDIO - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CSTDLIB - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CSTRING - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CTIME - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CTYPE_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H - -/* Define to 1 if function drand48 is available */ -#cmakedefine IPOPT_HAS_DRAND48 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_FLOAT_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IEEEFP_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H - -/* Define to 1 if the linear solver loader should be compiled to allow dynamic - loading of shared libraries with linear solvers */ -#cmakedefine IPOPT_HAS_LINEARSOLVERLOADER - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MATH_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H - -/* Define to 1 if you have the `MPI_Initialized' function. */ -#cmakedefine HAVE_MPI_INITIALIZED - -/* Define to 1 if Pardiso is available */ -#cmakedefine IPOPT_HAS_PARDISO - -/* Define to 1 if you are using Pardiso from MKL */ -#cmakedefine IPOPT_HAS_MKL - -/* Define to 1 if you are using the parallel version of Pardiso */ -#cmakedefine IPOPT_HAS_PARALLEL - -/* Define to 1 if function rand is available */ -#cmakedefine IPOPT_HAS_RAND - -/* Define to 1 if you have the `snprintf' function. */ -#cmakedefine HAVE_SNPRINTF - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDDEF_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDIO_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H - -/* Define to 1 if function std::rand is available */ -#cmakedefine HAVE_STD__RAND - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TIME_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H - -/* Define to 1 if va_copy is available */ -#cmakedefine IPOPT_HAS_VA_COPY - -/* Define to 1 if you have the `vsnprintf' function. */ -#cmakedefine HAVE_VSNPRINTF - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_WINDOWS_H - -/* Define to 1 if WSMP is available */ -#cmakedefine IPOPT_HAS_WSMP - -/* Define to 1 if you have the `_snprintf' function. */ -#cmakedefine HAVE__SNPRINTF - -/* Define to 1 if you have the `_vsnprintf' function. */ -#cmakedefine HAVE__VSNPRINTF - -/* Library Visibility Attribute */ -#define IPOPTAMPLINTERFACELIB_EXPORT - -/* Library Visibility Attribute */ -#define IPOPTLIB_EXPORT - -/* SVN revision number of project */ -#define IPOPT_SVN_REV @IPOPT_SVN_REV@ - -/* Version number of project */ -#define IPOPT_VERSION "@IPOPT_VERSION@" - -/* Major Version number of project */ -#define IPOPT_VERSION_MAJOR @IPOPT_VERSION_MAJOR@ - -/* Minor Version number of project */ -#define IPOPT_VERSION_MINOR @IPOPT_VERSION_MINOR@ - -/* Release Version number of project */ -#define IPOPT_VERSION_RELEASE @IPOPT_VERSION_RELEASE@ - -/* Name of package */ -#define PACKAGE "@PACKAGE@" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "@PACKAGE_NAME@" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "@PACKAGE_STRING@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "@PACKAGE_TARNAME@" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "@PACKAGE_VERSION@" - -/* Set to extension for shared libraries in quotes. */ -#define SHAREDLIBEXT "@SHAREDLIBEXT@" - -/* The size of a `int *', as computed by sizeof. */ -#define SIZEOF_INT_P @SIZEOF_INT_P@ - -/* Define to 1 if you have the ANSI C header files. */ -#cmakedefine STDC_HEADERS @STDC_HEADERS@ - -/* Version number of package */ -#define VERSION "@VERSION@" diff --git a/recipe/cmake/Ipopt/include/config_coinhsl.h.in b/recipe/cmake/Ipopt/include/config_coinhsl.h.in deleted file mode 100644 index f31f5d3..0000000 --- a/recipe/cmake/Ipopt/include/config_coinhsl.h.in +++ /dev/null @@ -1,48 +0,0 @@ -/* config_coinhsl.h.in. */ - -#ifndef __CONFIG_COINHSL_H__ -#define __CONFIG_COINHSL_H__ - -/* Define to 1 if MA27 is available. */ -#cmakedefine COINHSL_HAS_MA27 - -/* Define to 1 if MA28 is available. */ -#cmakedefine COINHSL_HAS_MA28 - -/* Define to 1 if MA57 is available. */ -#cmakedefine COINHSL_HAS_MA57 - -/* Define to 1 if MA77 is available. */ -#cmakedefine COINHSL_HAS_MA77 - -/* Define to 1 if MA86 is available. */ -#cmakedefine COINHSL_HAS_MA86 - -/* Define to 1 if MA97 is available. */ -#cmakedefine COINHSL_HAS_MA97 - -/* Define to 1 if MC19 is available. */ -#cmakedefine COINHSL_HAS_MC19 - -/* Define to 1 if MC68 is available. */ -#cmakedefine COINHSL_HAS_MC68 - -/* Define to 1 if METIS is available */ -#cmakedefine COINHSL_HAS_METIS - -/* Define to 1 if HSL library is from 2013 */ -#cmakedefine COINHSL_HSL2013 - -/* Version number of project */ -#define COINHSL_VERSION "@COINHSL_VERSION@" - -/* Major Version number of project */ -#define COINHSL_VERSION_MAJOR @COINHSL_VERSION_MAJOR@ - -/* Minor Version number of project */ -#define COINHSL_VERSION_MINOR @COINHSL_VERSION_MINOR@ - -/* Release Version number of project */ -#define COINHSL_VERSION_RELEASE @COINHSL_VERSION_RELEASE@ - -#endif diff --git a/recipe/cmake/Ipopt/include/config_ipopt.h.in b/recipe/cmake/Ipopt/include/config_ipopt.h.in deleted file mode 100644 index 6b54fb5..0000000 --- a/recipe/cmake/Ipopt/include/config_ipopt.h.in +++ /dev/null @@ -1,27 +0,0 @@ -/* src/Common/config_ipopt.h.in. */ - -#ifndef __CONFIG_IPOPT_H__ -#define __CONFIG_IPOPT_H__ - -/* Version number of project */ -#define IPOPT_VERSION "@IPOPT_VERSION@" - -/* Major Version number of project */ -#define IPOPT_VERSION_MAJOR @IPOPT_VERSION_MAJOR@ - -/* Minor Version number of project */ -#define IPOPT_VERSION_MINOR @IPOPT_VERSION_MINOR@ - -/* Release Version number of project */ -#define IPOPT_VERSION_RELEASE @IPOPT_VERSION_RELEASE@ - -/* Define to the C type corresponding to Fortran INTEGER */ -#define IPOPT_FORTRAN_INTEGER_TYPE @IPOPT_FORTRAN_INTEGER_TYPE@ - -/* Library Visibility Attribute */ -#define IPOPTAMPLINTERFACELIB_EXPORT - -/* Library Visibility Attribute */ -#define IPOPTLIB_EXPORT - -#endif diff --git a/recipe/cmake/Ipopt/ipopt_cmake.pc.in b/recipe/cmake/Ipopt/ipopt_cmake.pc.in deleted file mode 100644 index 89a4425..0000000 --- a/recipe/cmake/Ipopt/ipopt_cmake.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/coin-or - -Name: @PACKAGE_NAME@ -Description: Interior Point Optimizer -URL: @PACKAGE_URL@ -Version: @PACKAGE_VERSION@ -Cflags: -I${includedir} -Libs: -L${libdir} -l@IPOPT_OUTPUT_NAME@ diff --git a/recipe/cmake/LICENSE_CMAKE_FILES b/recipe/cmake/LICENSE_CMAKE_FILES deleted file mode 100644 index 341c30b..0000000 --- a/recipe/cmake/LICENSE_CMAKE_FILES +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/recipe/cmake/README_CMAKE_FILES b/recipe/cmake/README_CMAKE_FILES deleted file mode 100644 index 8730dc6..0000000 --- a/recipe/cmake/README_CMAKE_FILES +++ /dev/null @@ -1,7 +0,0 @@ -This directory contains CMake files to build Ipopt on Windows that were originally -based on the one available in https://github.com/ycollet/coinor-cmake, and have been -modified for compatibility with IPOPT 3.13 . - -The files contained in this directory are distributed under the LGPL-3.0-only license. - -See https://github.com/conda-forge/ipopt-feedstock/issues/51 for more details. \ No newline at end of file diff --git a/recipe/cmake/cmake/AC_HEADER_STDC.cmake b/recipe/cmake/cmake/AC_HEADER_STDC.cmake deleted file mode 100644 index 106e1de..0000000 --- a/recipe/cmake/cmake/AC_HEADER_STDC.cmake +++ /dev/null @@ -1,47 +0,0 @@ -message(STATUS "Checking whether system has ANSI C header files") - -include(CheckPrototypeExists) -include(CheckIncludeFiles) - -check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" StandardHeadersExist) - -if (StandardHeadersExist) - check_prototype_exists(memchr string.h memchrExists) - if (memchrExists) - check_prototype_exists(free stdlib.h freeExists) - if (freeExists) - message(STATUS "ANSI C header files - found") - set(STDC_HEADERS 1 CACHE INTERNAL "System has ANSI C header files") - set(HAVE_STRINGS_H 1) - set(HAVE_STRING_H 1) - set(HAVE_FLOAT_H 1) - set(HAVE_STDLIB_H 1) - set(HAVE_STDDEF_H 1) - set(HAVE_STDINT_H 1) - set(HAVE_INTTYPES_H 1) - set(HAVE_DLFCN_H 1) - endif () - endif () -endif () - -if (NOT STDC_HEADERS) - message(STATUS "ANSI C header files - not found") - set(STDC_HEADERS 0 CACHE INTERNAL "System has ANSI C header files") -endif () - -if (UNIX) - set(CMAKE_REQUIRED_LIBRARIES "m") -endif () - -check_include_files(unistd.h HAVE_UNISTD_H) - -include(CheckDIRSymbolExists) -check_dirsymbol_exists("sys/stat.h;sys/types.h;dirent.h" HAVE_DIRENT_H) -if (HAVE_DIRENT_H) - set(HAVE_SYS_STAT_H 1) - set(HAVE_SYS_TYPES_H 1) -endif () - -if (NOT WIN32) - set(HAVE_LIBM 1) -endif () diff --git a/recipe/cmake/cmake/CheckCLinkerFlag.cmake b/recipe/cmake/cmake/CheckCLinkerFlag.cmake deleted file mode 100644 index ea5cc92..0000000 --- a/recipe/cmake/cmake/CheckCLinkerFlag.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# - Check whether the C linker supports a given flag. -# CHECK_C_LINKER_FLAG(FLAG VARIABLE) -# -# FLAG - the compiler flag -# VARIABLE - variable to store the result -# -# This actually calls the check_c_source_compiles macro. -# See help for CheckCSourceCompiles for a listing of variables -# that can modify the build. - -# Copyright (c) 2010, Joerg Mayer (see AUTHORS file) -# -# Redistribution and use is allowed according to the terms of the BSD license. - -include(CheckCSourceRuns) - -macro(CHECK_C_LINKER_FLAG _FLAG _RESULT) - set(CMAKE_REQUIRED_FLAGS "${_FLAG}") - message(status "check linker flag - test linker flags: ${CMAKE_REQUIRED_FLAGS}") - check_c_source_runs("int main() { return 0;}" ${_RESULT}) - set(CMAKE_REQUIRED_FLAGS "") -endmacro(CHECK_C_LINKER_FLAG) diff --git a/recipe/cmake/cmake/CheckDIRSymbolExists.cmake b/recipe/cmake/cmake/CheckDIRSymbolExists.cmake deleted file mode 100644 index 022c71a..0000000 --- a/recipe/cmake/cmake/CheckDIRSymbolExists.cmake +++ /dev/null @@ -1,76 +0,0 @@ -# - Check if the DIR symbol exists like in AC_HEADER_DIRENT. -# CHECK_DIRSYMBOL_EXISTS(FILES VARIABLE) -# -# FILES - include files to check -# VARIABLE - variable to return result -# -# This module is a small but important variation on CheckSymbolExists.cmake. -# The symbol always searched for is DIR, and the test programme follows -# the AC_HEADER_DIRENT test programme rather than the CheckSymbolExists.cmake -# test programme which always fails since DIR tends to be typedef'd -# rather than #define'd. -# -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link - -macro(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE) - if (NOT DEFINED ${VARIABLE}) - set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") - set(MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS}) - - if (CMAKE_REQUIRED_LIBRARIES) - set(CHECK_DIRSYMBOL_EXISTS_LIBS "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - else () - set(CHECK_DIRSYMBOL_EXISTS_LIBS) - endif () - - if(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_DIRSYMBOL_EXISTS_INCLUDES "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") - else () - set(CMAKE_DIRSYMBOL_EXISTS_INCLUDES) - endif () - - foreach(FILE ${FILES}) - set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n") - endforeach () - - set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main()\n{if ((DIR *) 0) return 0;}\n") - - configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c" @ONLY) - - message(STATUS "Looking for DIR in ${FILES}") - - try_compile(${VARIABLE} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c - COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS - -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS} - "${CHECK_DIRSYMBOL_EXISTS_LIBS}" - "${CMAKE_DIRSYMBOL_EXISTS_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) - - if (${VARIABLE}) - message(STATUS "Looking for DIR in ${FILES} - found") - set(${VARIABLE} 1 CACHE INTERNAL "Have symbol DIR") - file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log - "Determining if the DIR symbol is defined as in AC_HEADER_DIRENT " - "passed with the following output:\n" - "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n" - "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") - else () - message(STATUS "Looking for DIR in ${FILES} - not found.") - set(${VARIABLE} "" CACHE INTERNAL "Have symbol DIR") - file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log - "Determining if the DIR symbol is defined as in AC_HEADER_DIRENT " - "failed with the following output:\n" - "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n" - "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") - endif () - endif () -endmacro () diff --git a/recipe/cmake/cmake/CheckPrototypeExists.cmake b/recipe/cmake/cmake/CheckPrototypeExists.cmake deleted file mode 100644 index 41b8810..0000000 --- a/recipe/cmake/cmake/CheckPrototypeExists.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# AWI, downloaded from KDE repository since has not yet been transferred -# to cmake repository as of 2006-07-31. -# http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/CheckPrototypeExists.cmake?rev=505849&view=markup -# -# - Check if the prototype for a function exists. -# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE) -# -# FUNCTION - the name of the function you are looking for -# HEADER - the header(s) where the prototype should be declared -# VARIABLE - variable to store the result -# - -include(CheckCSourceCompiles) - -macro(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) - set(_INCLUDE_FILES) - foreach(it ${_HEADER}) - set(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") - endforeach() - - set(_CHECK_PROTO_EXISTS_SOURCE_CODE " -${_INCLUDE_FILES} -void cmakeRequireSymbol(int dummy,...){(void)dummy;} -int main() -{ -#ifndef ${_SYMBOL} -#ifndef _MSC_VER - cmakeRequireSymbol(0,&${_SYMBOL}); -#else - char i = sizeof(&${_SYMBOL}); -#endif -#endif - return 0; -} -") - - check_c_source_compiles("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT}) -endmacro() diff --git a/recipe/cmake/cmake/FindAMD.cmake b/recipe/cmake/cmake/FindAMD.cmake deleted file mode 100644 index bccebc4..0000000 --- a/recipe/cmake/cmake/FindAMD.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# - Try to find AMD -# Once done this will define -# -# AMD_FOUND - system has AMD -# AMD_INCLUDE_DIRS - include directories for AMD -# AMD_LIBRARIES - libraries for AMD - -#============================================================================= -# Copyright (C) 2010 Anders Logg -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -message(STATUS "Checking for package 'AMD'") - -# Check for header file -find_path(AMD_INCLUDE_DIRS amd.h - HINTS ${AMD_DIR}/include $ENV{AMD_DIR}/include - PATH_SUFFIXES suitesparse ufsparse - DOC "Directory where the AMD header is located") - -mark_as_advanced(AMD_INCLUDE_DIRS) - -# Check for AMD library -find_library(AMD_LIBRARIES amd - HINTS ${AMD_DIR}/lib $ENV{AMD_DIR}/lib - ${AMD_DIR}/lib64 $ENV{AMD_DIR}/lib64 - NO_DEFAULT_PATH - DOC "The AMD library") - -find_library(AMD_LIBRARIES amd - DOC "The AMD library") - -mark_as_advanced(AMD_LIBRARY) - -# Standard package handling -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(AMD - "AMD could not be found. Be sure to set AMD_DIR." - AMD_LIBRARIES AMD_INCLUDE_DIRS) diff --git a/recipe/cmake/cmake/FindCHOLMOD.cmake b/recipe/cmake/cmake/FindCHOLMOD.cmake deleted file mode 100644 index 6899b52..0000000 --- a/recipe/cmake/cmake/FindCHOLMOD.cmake +++ /dev/null @@ -1,227 +0,0 @@ -# - Try to find CHOLMOD -# Once done this will define -# -# CHOLMOD_FOUND - system has CHOLMOD -# CHOLMOD_INCLUDE_DIRS - include directories for CHOLMOD -# CHOLMOD_LIBRARIES - libraries for CHOLMOD - -#============================================================================= -# Copyright (C) 2010-2011 Garth N. Wells, Anders Logg and Johannes Ring -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -message(STATUS "Checking for package 'CHOLMOD'") - -# Find packages that CHOLMOD depends on -set(CMAKE_LIBRARY_PATH ${BLAS_DIR}/lib $ENV{BLAS_DIR}/lib ${CMAKE_LIBRARY_PATH}) -set(CMAKE_LIBRARY_PATH ${LAPACK_DIR}/lib $ENV{LAPACK_DIR}/lib ${CMAKE_LIBRARY_PATH}) - -find_package(AMD QUIET) -find_package(BLAS QUIET) -find_package(LAPACK QUIET) -find_package(ParMETIS 4.0.2 QUIET) - -# FIXME: Should we have separate FindXX modules for CAMD, COLAMD, and CCOLAMD? -# FIXME: find_package(CAMD) -# FIXME: find_package(COLAMD) -# FIXME: find_package(CCOLAMD) - -# FIXME: It may be necessary to link to LAPACK and BLAS (or the vecLib -# FIXME: framework on Darwin). - -# Check for header file -find_path(CHOLMOD_INCLUDE_DIRS cholmod.h - HINTS ${CHOLMOD_DIR}/include $ENV{CHOLMOD_DIR}/include - PATH_SUFFIXES suitesparse ufsparse - DOC "Directory where the CHOLMOD header is located") - -# Check for CHOLMOD library -find_library(CHOLMOD_LIBRARY cholmod - HINTS ${CHOLMOD_DIR}/lib $ENV{CHOLMOD_DIR}/lib - ${CHOLMOD_DIR}/lib64 $ENV{CHOLMOD_DIR}/lib64 - NO_DEFAULT_PATH - DOC "The CHOLMOD library") - -find_library(CHOLMOD_LIBRARY cholmod - DOC "The CHOLMOD library") - -# Check for CAMD library -find_library(CAMD_LIBRARY camd - HINTS ${CHOLMOD_DIR}/lib ${CAMD_DIR}/lib $ENV{CHOLMOD_DIR}/lib $ENV{CAMD_DIR}/lib - ${CHOLMOD_DIR}/lib64 ${CAMD_DIR}/lib64 $ENV{CHOLMOD_DIR}/lib64 $ENV{CAMD_DIR}/lib64 - NO_DEFAULT_PATH - DOC "The CAMD library") - -find_library(CAMD_LIBRARY camd - DOC "The CAMD library") - -# Check for COLAMD library -find_library(COLAMD_LIBRARY colamd - HINTS ${CHOLMOD_DIR}/lib ${COLAMD_DIR}/lib $ENV{CHOLMOD_DIR}/lib $ENV{COLAMD_DIR}/lib - ${CHOLMOD_DIR}/lib64 ${COLAMD_DIR}/lib64 $ENV{CHOLMOD_DIR}/lib64 $ENV{COLAMD_DIR}/lib64 - NO_DEFAULT_PATH - DOC "The COLAMD library") - -find_library(COLAMD_LIBRARY colamd - DOC "The COLAMD library") - -# Check for CCOLAMD library -find_library(CCOLAMD_LIBRARY ccolamd - HINTS ${CHOLMOD_DIR}/lib ${CCOLAMD_DIR}/lib $ENV{CHOLMOD_DIR}/lib $ENV{CCOLAMD_DIR}/lib - ${CHOLMOD_DIR}/lib64 ${CCOLAMD_DIR}/lib64 $ENV{CHOLMOD_DIR}/lib64 $ENV{CCOLAMD_DIR}/lib64 - NO_DEFAULT_PATH - DOC "The CCOLAMD library") - -find_library(CCOLAMD_LIBRARY ccolamd - DOC "The CCOLAMD library") - -# Check for SUITESPARSECONFIG library -find_library(SUITESPARSE_LIBRARY suitesparseconfig - HINTS ${CHOLMOD_DIR}/lib ${CCOLAMD_DIR}/lib $ENV{CHOLMOD_DIR}/lib $ENV{CCOLAMD_DIR}/lib - NO_DEFAULT_PATH - DOC "The SUITESPARSECONFIG library") - -find_library(SUITESPARSE_LIBRARY suitesparseconfig - DOC "The SUITESPARSECONFIG library") - -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT APPLE) - # Check for rt library - find_library(RT_LIBRARY rt - DOC "The RT library") -endif() - -# Collect libraries (order is important) -if (AMD_FOUND) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARY} ${AMD_LIBRARIES}) -endif() -if (CAMD_LIBRARY) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CAMD_LIBRARY}) -endif() -if (COLAMD_LIBRARY) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${COLAMD_LIBRARY}) -endif() -if (CCOLAMD_LIBRARY) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CCOLAMD_LIBRARY}) -endif() -if (SUITESPARSE_LIBRARY) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${SUITESPARSE_LIBRARY}) -endif() -if (RT_LIBRARY) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${RT_LIBRARY}) -endif() - -if (PARMETIS_FOUND) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${PARMETIS_LIBRARIES}) -endif() -if (LAPACK_FOUND) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${LAPACK_LIBRARIES}) -endif() -if (BLAS_FOUND) - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${BLAS_LIBRARIES}) -endif() - -find_program(GFORTRAN_EXECUTABLE gfortran) -if (GFORTRAN_EXECUTABLE) - execute_process(COMMAND ${GFORTRAN_EXECUTABLE} -print-file-name=libgfortran.so - OUTPUT_VARIABLE GFORTRAN_LIBRARY - OUTPUT_STRIP_TRAILING_WHITESPACE) - if (EXISTS "${GFORTRAN_LIBRARY}") - set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${GFORTRAN_LIBRARY}) - endif() -endif() - -mark_as_advanced( - CHOLMOD_INCLUDE_DIRS - CHOLMOD_LIBRARY - CHOLMOD_LIBRARIES - CAMD_LIBRARY - COLAMD_LIBRARY - CCOLAMD_LIBRARY - ) - -# Try to run a test program that uses CHOLMOD -if (CHOLMOD_SKIP_BUILD_TESTS) - set(CHOLMOD_TEST_RUNS TRUE) -elseif (CHOLMOD_INCLUDE_DIRS AND CHOLMOD_LIBRARIES AND AMD_FOUND) - set(CMAKE_REQUIRED_INCLUDES ${CHOLMOD_INCLUDE_DIRS} ${AMD_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES ${CHOLMOD_LIBRARIES}) - - # Build and run test program - include(CheckCXXSourceRuns) - check_cxx_source_runs(" -#include -#include - -int main() -{ - cholmod_dense *D; - cholmod_sparse *S; - cholmod_dense *x, *b, *r; - cholmod_factor *L; - double one[2] = {1,0}, m1[2] = {-1,0}; - double *dx; - cholmod_common c; - int n = 5; - double K[5][5] = {{1.0, 0.0, 0.0, 0.0, 0.0}, - {0.0, 2.0,-1.0, 0.0, 0.0}, - {0.0,-1.0, 2.0,-1.0, 0.0}, - {0.0, 0.0,-1.0, 2.0, 0.0}, - {0.0, 0.0, 0.0, 0.0, 1.0}}; - cholmod_start (&c); - D = cholmod_allocate_dense(n, n, n, CHOLMOD_REAL, &c); - dx = (double*)D->x; - for (int i=0; i < n; i++) - for (int j=0; j < n; j++) - dx[i+j*n] = K[i][j]; - S = cholmod_dense_to_sparse(D, 1, &c); - S->stype = 1; - cholmod_reallocate_sparse(cholmod_nnz(S, &c), S, &c); - b = cholmod_ones(S->nrow, 1, S->xtype, &c); - L = cholmod_analyze(S, &c); - cholmod_factorize(S, L, &c); - x = cholmod_solve(CHOLMOD_A, L, b, &c); - r = cholmod_copy_dense(b, &c); - cholmod_sdmult(S, 0, m1, one, x, r, &c); - cholmod_free_factor(&L, &c); - cholmod_free_dense(&D, &c); - cholmod_free_sparse(&S, &c); - cholmod_free_dense(&r, &c); - cholmod_free_dense(&x, &c); - cholmod_free_dense(&b, &c); - cholmod_finish(&c); - return 0; -} -" CHOLMOD_TEST_RUNS) - -endif() - -# Standard package handling -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CHOLMOD "CHOLMOD could not be found. Be sure to set CHOLMOD_DIR." - CHOLMOD_LIBRARIES - CHOLMOD_INCLUDE_DIRS - CHOLMOD_TEST_RUNS) diff --git a/recipe/cmake/cmake/FindDL.cmake b/recipe/cmake/cmake/FindDL.cmake deleted file mode 100644 index 59a83c2..0000000 --- a/recipe/cmake/cmake/FindDL.cmake +++ /dev/null @@ -1,35 +0,0 @@ -############################################################################### -# CMake macro to find libdl library. -# -# On success, the macro sets the following variables: -# DL_FOUND = if the library found -# DL_LIBRARY = full path to the library -# DL_INCLUDE_DIR = where to find the library headers -# -# Author: Mateusz Loskot -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# -############################################################################### -if(DL_INCLUDE_DIR) - set(DL_FIND_QUIETLY TRUE) -endif() - -find_path(DL_INCLUDE_DIR dlfcn.h) -find_library(DL_LIBRARY NAMES dl) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(DL DEFAULT_MSG DL_LIBRARY DL_INCLUDE_DIR) - -if(NOT DL_FOUND) - # if dlopen can be found without linking in dl then, - # dlopen is part of libc, so don't need to link extra libs. - check_function_exists(dlopen DL_FOUND) - set(DL_LIBRARY "") -endif() - -set(DL_LIBRARIES ${DL_LIBRARY}) - -mark_as_advanced(DL_LIBRARY DL_INCLUDE_DIR) - diff --git a/recipe/cmake/cmake/FindMKL.cmake b/recipe/cmake/cmake/FindMKL.cmake deleted file mode 100644 index 92564ff..0000000 --- a/recipe/cmake/cmake/FindMKL.cmake +++ /dev/null @@ -1,117 +0,0 @@ -# - Find the MKL libraries -# Modified from Armadillo's ARMA_FindMKL.cmake -# This module defines -# MKL_INCLUDE_DIR, the directory for the MKL headers -# MKL_LIB_DIR, the directory for the MKL library files -# MKL_COMPILER_LIB_DIR, the directory for the MKL compiler library files -# MKL_LIBRARIES, the libraries needed to use Intel's implementation of BLAS & LAPACK. -# MKL_FOUND, If false, do not try to use MKL; if true, the macro definition USE_MKL is added. - -# Set the include path -# TODO: what if MKL is not installed in /opt/intel/mkl? -# try to find at /opt/intel/mkl -# in windows, try to find MKL at C:/Program Files (x86)/Intel/Composer XE/mkl - -if (WIN32) - if (NOT DEFINED ENV{MKLROOT_PATH}) - set(MKLROOT_PATH "C:/Program Files (x86)/Intel/Composer XE" CACHE PATH "Where the MKL are stored") - endif () -else () - set(MKLROOT_PATH "/opt/intel" CACHE PATH "Where the MKL are stored") -endif () - -if (EXISTS ${MKLROOT_PATH}/mkl OR EXISTS ${MKLROOT_PATH}) - set(MKL_FOUND TRUE) - if (EXISTS ${MKLROOT_PATH}/mkl) - message("MKL is found at ${MKLROOT_PATH}/mkl") - else () - message("MKL is found at ${MKLROOT_PATH}") - endif () - - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - set(USE_MKL_64BIT ON) - if (ARMADILLO_FOUND) - if (ARMADILLO_BLAS_LONG_LONG) - set(USE_MKL_64BIT_LIB ON) - add_definitions(-DMKL_ILP64) - message("MKL is linked against ILP64 interface ... ") - endif () - endif () - else () - set(USE_MKL_64BIT OFF) - endif () -else () - set(MKL_FOUND FALSE) - message("MKL is NOT found ... ") -endif () - -if (MKL_FOUND) - if (EXISTS ${MKLROOT_PATH}/mkl) - set(MKL_INCLUDE_DIR "${MKLROOT_PATH}/mkl/include") - else () - set(MKL_INCLUDE_DIR "${MKLROOT_PATH}/include") - endif () - add_definitions(-DUSE_MKL) - if (USE_MKL_64BIT) - if (EXISTS ${MKLROOT_PATH}/mkl) - set(MKL_LIB_DIR "${MKLROOT_PATH}/mkl/lib/intel64") - else () - set(MKL_LIB_DIR "${MKLROOT_PATH}/lib/intel64") - endif () - set(MKL_COMPILER_LIB_DIR "${MKLROOT_PATH}/compiler/lib/intel64") - set(MKL_COMPILER_LIB_DIR ${MKL_COMPILER_LIB_DIR} "${MKLROOT_PATH}/lib/intel64") - if (USE_MKL_64BIT_LIB) - if (WIN32) - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_ilp64) - else () - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_ilp64) - endif () - else () - if (WIN32) - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_lp64) - else () - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_lp64) - endif () - endif () - else () - if (EXISTS ${MKLROOT_PATH}/mkl) - set(MKL_LIB_DIR "${MKLROOT_PATH}/mkl/lib/ia32") - else () - set(MKL_LIB_DIR "${MKLROOT_PATH}/lib/ia32") - endif () - set(MKL_COMPILER_LIB_DIR "${MKLROOT_PATH}/compiler/lib/ia32") - set(MKL_COMPILER_LIB_DIR ${MKL_COMPILER_LIB_DIR} "${MKLROOT_PATH}/lib/ia32") - if (WIN32) - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_c) - else ( ) - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel) - endif ( ) - endif () - - if (WIN32) - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_thread) - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_core) - set(MKL_LIBRARIES ${MKL_LIBRARIES} libiomp5md) - else () - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_gnu_thread) - set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_core) - endif () -endif () - -if (MKL_FOUND) - if (NOT MKL_FIND_QUIETLY) - message(STATUS "Found MKL libraries: ${MKL_LIBRARIES}") - message(STATUS "MKL_INCLUDE_DIR: ${MKL_INCLUDE_DIR}") - message(STATUS "MKL_LIB_DIR: ${MKL_LIB_DIR}") - message(STATUS "MKL_COMPILER_LIB_DIR: ${MKL_COMPILER_LIB_DIR}") - endif () - - include_directories(${MKL_INCLUDE_DIR}) - link_directories(${MKL_LIB_DIR} ${MKLROOT_PATH}/lib ${MKLROOT_PATH} ${MKL_COMPILER_LIB_DIR}) -else () - if (MKL_FIND_REQUIRED) - message(FATAL_ERROR "Could not find MKL libraries") - endif () -endif () - -# MARK_AS_ADVANCED(MKL_LIBRARY) diff --git a/recipe/cmake/cmake/FindParMETIS.cmake b/recipe/cmake/cmake/FindParMETIS.cmake deleted file mode 100644 index 241aa66..0000000 --- a/recipe/cmake/cmake/FindParMETIS.cmake +++ /dev/null @@ -1,148 +0,0 @@ -# - Try to find ParMETIS -# Once done this will define -# -# PARMETIS_FOUND - system has ParMETIS -# PARMETIS_INCLUDE_DIRS - include directories for ParMETIS -# PARMETIS_LIBRARIES - libraries for ParMETIS -# PARMETIS_VERSION - version for ParMETIS - -#============================================================================= -# Copyright (C) 2010 Garth N. Wells, Anders Logg and Johannes Ring -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -if (MPI_CXX_FOUND) - find_path(PARMETIS_INCLUDE_DIRS parmetis.h - HINTS ${PARMETIS_DIR}/include $ENV{PARMETIS_DIR}/include ${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include - DOC "Directory where the ParMETIS header files are located") - - find_library(PARMETIS_LIBRARY parmetis - HINTS ${PARMETIS_DIR}/lib $ENV{PARMETIS_DIR}/lib ${PETSC_DIR}/lib ${PETSC_DIR}/${PETSC_ARCH}/lib - ${PARMETIS_DIR}/lib64 $ENV{PARMETIS_DIR}/lib64 ${PETSC_DIR}/lib64 ${PETSC_DIR}/${PETSC_ARCH}/lib64 - NO_DEFAULT_PATH - DOC "Directory where the ParMETIS library is located") - - find_library(PARMETIS_LIBRARY parmetis - DOC "Directory where the ParMETIS library is located") - - find_library(METIS_LIBRARY metis - HINTS ${PARMETIS_DIR}/lib $ENV{PARMETIS_DIR}/lib ${PETSC_DIR}/lib ${PETSC_DIR}/${PETSC_ARCH}/lib - NO_DEFAULT_PATH - DOC "Directory where the METIS library is located") - - find_library(METIS_LIBRARY metis - DOC "Directory where the METIS library is located") - - set(PARMETIS_LIBRARIES ${PARMETIS_LIBRARY}) - if (METIS_LIBRARY) - set(PARMETIS_LIBRARIES ${PARMETIS_LIBRARIES} ${METIS_LIBRARY}) - endif() - - # Try compiling and running test program - if (DOLFIN_SKIP_BUILD_TESTS) - set(PARMETIS_TEST_RUNS TRUE) - set(PARMETIS_VERSION "UNKNOWN") - set(PARMETIS_VERSION_OK TRUE) - elseif (PARMETIS_INCLUDE_DIRS AND PARMETIS_LIBRARY) - # Set flags for building test program - set(CMAKE_REQUIRED_INCLUDES ${PARMETIS_INCLUDE_DIRS} ${MPI_CXX_INCLUDE_PATH}) - set(CMAKE_REQUIRED_LIBRARIES ${PARMETIS_LIBRARIES} ${MPI_CXX_LIBRARIES}) - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} ${MPI_CXX_COMPILE_FLAGS}) - - # Check ParMETIS version - set(PARMETIS_CONFIG_TEST_VERSION_CPP "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/parmetis_config_test_version.cpp") - - file(WRITE ${PARMETIS_CONFIG_TEST_VERSION_CPP} " -#define MPICH_IGNORE_CXX_SEEK 1 -#include -#include \"parmetis.h\" - -int main() { -#ifdef PARMETIS_SUBMINOR_VERSION - std::cout << PARMETIS_MAJOR_VERSION << \".\" - << PARMETIS_MINOR_VERSION << \".\" - << PARMETIS_SUBMINOR_VERSION; -#else - std::cout << PARMETIS_MAJOR_VERSION << \".\" - << PARMETIS_MINOR_VERSION; -#endif - return 0; -} -") - - try_run(PARMETIS_CONFIG_TEST_VERSION_EXITCODE - PARMETIS_CONFIG_TEST_VERSION_COMPILED - ${CMAKE_CURRENT_BINARY_DIR} - ${PARMETIS_CONFIG_TEST_VERSION_CPP} - CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}" - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}" - COMPILE_OUTPUT_VARIABLE PARMETIS_CONFIG_TEST_VERSION_COMPILE_OUTPUT - RUN_OUTPUT_VARIABLE PARMETIS_CONFIG_TEST_VERSION_OUTPUT) - - if (PARMETIS_CONFIG_TEST_VERSION_EXITCODE EQUAL 0) - set(PARMETIS_VERSION ${PARMETIS_CONFIG_TEST_VERSION_OUTPUT} CACHE TYPE STRING) - mark_as_advanced(PARMETIS_VERSION) - endif() - - if (ParMETIS_FIND_VERSION) - # Check if version found is >= required version - if (NOT "${PARMETIS_VERSION}" VERSION_LESS "${ParMETIS_FIND_VERSION}") - set(PARMETIS_VERSION_OK TRUE) - endif() - else() - # No specific version requested - set(PARMETIS_VERSION_OK TRUE) - endif() - mark_as_advanced(PARMETIS_VERSION_OK) - - # Build and run test program - include(CheckCXXSourceRuns) - - check_cxx_source_runs(" -#define MPICH_IGNORE_CXX_SEEK 1 -#include -#include - -int main() -{ - // FIXME: Find a simple but sensible test for ParMETIS - - return 0; -} -" PARMETIS_TEST_RUNS) - - endif() -endif() - -# Standard package handling -find_package_handle_standard_args(ParMETIS - "ParMETIS could not be found/configured." - PARMETIS_LIBRARIES - PARMETIS_TEST_RUNS - PARMETIS_INCLUDE_DIRS - PARMETIS_VERSION - PARMETIS_VERSION_OK) diff --git a/recipe/cmake/cmake/FindReadline.cmake b/recipe/cmake/cmake/FindReadline.cmake deleted file mode 100644 index 5d6e345..0000000 --- a/recipe/cmake/cmake/FindReadline.cmake +++ /dev/null @@ -1,75 +0,0 @@ -# - Find the readline library -# This module defines -# READLINE_INCLUDE_DIR, path to readline/readline.h, etc. -# READLINE_LIBRARIES, the libraries required to use READLINE. -# READLINE_FOUND, If false, do not try to use READLINE. -# also defined, but not for general use are -# READLINE_readline_LIBRARY, where to find the READLINE library. -# READLINE_ncurses_LIBRARY, where to find the ncurses library [might not be defined] - -# Apple readline does not support readline hooks -# So we look for another one by default -if (APPLE) - find_path(READLINE_INCLUDE_DIR NAMES readline/readline.h - PATHS /sw/include - /opt/local/include - /opt/include - /usr/local/include - /usr/include/ - NO_DEFAULT_PATH) -endif () - -find_path(READLINE_INCLUDE_DIR NAMES readline/readline.h) - -# Apple readline does not support readline hooks -# So we look for another one by default -if (APPLE) - find_library(READLINE_readline_LIBRARY NAMES readline - PATHS /sw/lib - /opt/local/lib - /opt/lib - /usr/local/lib - /usr/lib - NO_DEFAULT_PATH) -endif () - -find_library(READLINE_readline_LIBRARY NAMES readline) - -# Sometimes readline really needs ncurses -if (APPLE) - find_library(READLINE_ncurses_LIBRARY NAMES ncurses - PATHS /sw/lib - /opt/local/lib - /opt/lib - /usr/local/lib - /usr/lib - NO_DEFAULT_PATH) -endif () - -find_library(READLINE_ncurses_LIBRARY NAMES ncurses) - -mark_as_advanced(READLINE_INCLUDE_DIR - READLINE_readline_LIBRARY - READLINE_ncurses_LIBRARY) - -set(READLINE_FOUND "NO") - -if (READLINE_INCLUDE_DIR) - if (READLINE_readline_LIBRARY) - set(READLINE_FOUND "YES") - set(READLINE_LIBRARIES ${READLINE_readline_LIBRARY}) - - # some readline libraries depend on ncurses - if (READLINE_ncurses_LIBRARY) - set(READLINE_LIBRARIES ${READLINE_LIBRARIES} ${READLINE_ncurses_LIBRARY}) - endif () - endif () -endif () - -if (READLINE_FOUND) - message(STATUS "Found readline library") -else () - if (READLINE_FIND_REQUIRED) - message(FATAL_ERROR "Could not find readline -- please give some paths to CMake") - endif () -endif () diff --git a/recipe/cmake/cmake/FindSSE.cmake b/recipe/cmake/cmake/FindSSE.cmake deleted file mode 100644 index e4c28c0..0000000 --- a/recipe/cmake/cmake/FindSSE.cmake +++ /dev/null @@ -1,292 +0,0 @@ -# Check if SSE/AVX instructions are available on the machine where -# the project is compiled. - -# -mmmx -# -# -msse -# -msse2 -# -msse3 -# -mssse3 -# -msse4 -# -msse4.1 -# -msse4.2 -# -msse4a -# -mfpmath=sse -# -# -mavx -# -mavx2 -# -mavx512f -# -mavx512pf -# -mavx512er -# -mavx512cd -# -mavx512vl -# -mavx512bw -# -mavx512dq -# -mavx512ifma -# -mavx512vbmi -# -# -m3dnow - -if (CMAKE_SYSTEM_NAME MATCHES "Linux") - execute_process(COMMAND cat /proc/cpuinfo OUTPUT_VARIABLE CPUINFO) - - string(REGEX REPLACE "^.*(mmx).*$" "\\1" MMX_THERE ${CPUINFO}) - string(COMPARE EQUAL "mmx" "${MMX_THERE}" MMX_TRUE) - if (MMX_TRUE) - set(MMX_FOUND true CACHE BOOL "MMX available on host") - else () - set(MMX_FOUND false CACHE BOOL "MMX available on host") - endif () - - string(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE) - if (SSE2_TRUE) - set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") - else () - set(SSE2_FOUND false CACHE BOOL "SSE2 available on host") - endif () - - # /proc/cpuinfo apparently omits sse3 :( - string(REGEX REPLACE "^.*[^s](sse3).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse3" "${SSE_THERE}" SSE3_TRUE) - if (NOT SSE3_TRUE) - string(REGEX REPLACE "^.*(T2300).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "T2300" "${SSE_THERE}" SSE3_TRUE) - endif () - - string(REGEX REPLACE "^.*(ssse3).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "ssse3" "${SSE_THERE}" SSSE3_TRUE) - if (SSE3_TRUE OR SSSE3_TRUE) - set(SSE3_FOUND true CACHE BOOL "SSE3 available on host") - else () - set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") - endif () - - if (SSSE3_TRUE) - set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host") - else () - set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") - endif () - - string(REGEX REPLACE "^.*(sse4_1).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse4_1" "${SSE_THERE}" SSE41_TRUE) - if (SSE41_TRUE) - set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host") - else () - set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") - endif () - - string(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse4_2" "${SSE_THERE}" SSE42_TRUE) - if (SSE42_TRUE) - set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available on host") - else () - set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") - endif () - - string(REGEX REPLACE "^.*(avx).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "avx" "${SSE_THERE}" AVX_TRUE) - if (AVX_TRUE) - set(AVX_FOUND true CACHE BOOL "AVX available on host") - else () - set(AVX_FOUND false CACHE BOOL "AVX available on host") - endif () - - string(REGEX REPLACE "^.*(avx2).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "avx2" "${SSE_THERE}" AVX2_TRUE) - if (AVX2_TRUE) - set(AVX2_FOUND true CACHE BOOL "AVX2 available on host") - else () - set(AVX2_FOUND false CACHE BOOL "AVX2 available on host") - endif () -elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") - execute_process(COMMAND /usr/sbin/sysctl -n machdep.cpu.features OUTPUT_VARIABLE CPUINFO) - - string(REGEX REPLACE "^.*(mmx).*$" "\\1" MMX_THERE ${CPUINFO}) - string(COMPARE EQUAL "mmx" "${MMX_THERE}" MMX_TRUE) - if (MMX_TRUE) - set(MMX_FOUND true CACHE BOOL "MMX available on host") - else () - set(MMX_FOUND false CACHE BOOL "MMX available on host") - endif () - - string(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE) - if (SSE2_TRUE) - set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") - else () - set(SSE2_FOUND false CACHE BOOL "SSE2 available on host") - endif () - - string(REGEX REPLACE "^.*[^S](SSE3).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE3" "${SSE_THERE}" SSE3_TRUE) - if (SSE3_TRUE) - set(SSE3_FOUND true CACHE BOOL "SSE3 available on host") - else () - set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") - endif () - - string(REGEX REPLACE "^.*(SSSE3).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSSE3" "${SSE_THERE}" SSSE3_TRUE) - if (SSSE3_TRUE) - set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host") - else () - set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") - endif () - - string(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE4.1" "${SSE_THERE}" SSE41_TRUE) - if (SSE41_TRUE) - set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host") - else () - set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") - endif () - - string(REGEX REPLACE "^.*(SSE4.2).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "SSE4.2" "${SSE_THERE}" SSE42_TRUE) - if (SSE42_TRUE) - set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available on host") - else () - set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") - endif () - - string(REGEX REPLACE "^.*(AVX).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "AVX" "${SSE_THERE}" AVX_TRUE) - if (AVX_TRUE) - set(AVX_FOUND true CACHE BOOL "AVX available on host") - else () - set(AVX_FOUND false CACHE BOOL "AVX available on host") - endif () - - string(REGEX REPLACE "^.*(AVX2).*$" "\\1" SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "AVX2" "${SSE_THERE}" AVX2_TRUE) - if (AVX2_TRUE) - set(AVX2_FOUND true CACHE BOOL "AVX2 available on host") - else () - set(AVX2_FOUND false CACHE BOOL "AVX2 available on host") - endif () -elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") - # TODO - set(MMX_FOUND false CACHE BOOL "MMX available on host") - set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") - set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") - set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") - set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") - set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") - set(AVX_FOUND false CACHE BOOL "AVX available on host") - set(AVX2_FOUND false CACHE BOOL "AVX2 available on host") -else () - set(MMX_FOUND true CACHE BOOL "MMX available on host") - set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") - set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") - set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") - set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") - set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") - set(AVX_FOUND false CACHE BOOL "AVX available on host") - set(AVX2_FOUND false CACHE BOOL "AVX2 available on host") -endif () - -if (NOT MMX_FOUND) - message(STATUS "Could not find hardware support for MMX on this machine.") -endif () - -if (NOT SSE2_FOUND) - message(STATUS "Could not find hardware support for SSE2 on this machine.") -endif () - -if (NOT SSE3_FOUND) - message(STATUS "Could not find hardware support for SSE3 on this machine.") -endif () - -if (NOT SSSE3_FOUND) - message(STATUS "Could not find hardware support for SSSE3 on this machine.") -endif () - -if (NOT SSE4_1_FOUND) - message(STATUS "Could not find hardware support for SSE4.1 on this machine.") -endif () - -if (NOT SSE4_2_FOUND) - message(STATUS "Could not find hardware support for SSE4.2 on this machine.") -endif () - -if (NOT AVX_FOUND) - message(STATUS "Could not find hardware support for AVX on this machine.") -endif () - -if (NOT AVX2_FOUND) - message(STATUS "Could not find hardware support for AVX2 on this machine.") -endif () - -set(SSE_COMPILER_FLAGS ) - -if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") OR (CMAKE_SYSTEM_NAME MATCHES "Linux")) - if (MMX_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -mmmx") - endif () - - if (SSE2_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -mfpmath=sse -msse -msse2") - endif () - - if (SSE3_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -msse3") - endif () - - if (SSSE3_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -mssse3") - endif () - - if (SSE4_1_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -msse4 -msse4.1") - endif () - - if (SSE4_2_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -msse4.2") - endif () - - if (AVX_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -mavx") - endif () - - if (AVX2_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} -mavx2") - endif () -endif () - -if (CMAKE_SYSTEM_NAME MATCHES "Windows") - if (MMX_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QMMX") - endif () - - if (SSE2_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QSSE /QSSE2") - endif () - - if (SSE3_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QSSE3") - endif () - - if (SSSE3_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QSSSE3") - endif () - - if (SSE4_1_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QSSE4 /QSSE4.1") - endif () - - if (SSE4_2_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QSSE4.2") - endif () - - if (AVX_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QAVX") - endif () - - if (AVX2_FOUND) - set(SSE_COMPILER_FLAGS "${SSE_COMPILER_FLAGS} /QAVX2") - endif () -endif () - -mark_as_advanced(MMX_FOUND SSE2_FOUND SSE3_FOUND SSSE3_FOUND SSE4_1_FOUND SSE4_2_FOUND AVX_FOUND AVX2_FOUND SSE_COMPILER_FLAGS) - diff --git a/recipe/cmake/cmake/GetAcInitVersion.cmake b/recipe/cmake/cmake/GetAcInitVersion.cmake deleted file mode 100644 index 28d0591..0000000 --- a/recipe/cmake/cmake/GetAcInitVersion.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# Read the package version number specified as the second argument -# to the AC_INIT macro in a GNU Autoconf configure.in file. -# -# Input parameter: -# FileName: path to configure.ac file -# -# Define the following variables: -# VERSION_STRING: The second argument to AC_INIT -# MAJOR_VERSION: For a version string of the form m.n.p..., m -# MINOR_VERSION: For a version string of the form m.n.p..., n -# PATCH_VERSION: For a version string of the form m.n.p..., p - -macro(get_ac_init_version FileName Prefix) - file(READ ${FileName} configure_IN) - # AC_INIT([Cbc],[2.9.8],[cbc@lists.coin-or.org]) - #string(REGEX REPLACE "(AC_INIT\\(\\[Cbc\\],\\[)(.*)(\\],\\[cbc@lists.coin-or.org\\]\\).*)" "\\2" configure_REGEX ${configure_IN}) - string(REGEX REPLACE "(AC_INIT.*)" "\\1" configure_REGEX ${configure_IN}) - - string(REGEX REPLACE "^.*AC_INIT *\\([^,]+, *\\[([^, )]+)\\].*$" "\\1" ${Prefix}_VERSION_STRING "${configure_REGEX}") - if (${Prefix}_VERSION_STRING STREQUAL "trunk") - set(${Prefix}_MAJOR_VERSION "9") - set(${Prefix}_MINOR_VERSION "9") - set(${Prefix}_PATCH_VERSION "9999") - else () - message(STATUS "${Prefix}_VERSION_STRING = ${${Prefix}_VERSION_STRING}") - - string(REGEX REPLACE "^([0-9]+)(\\..*)?$" "\\1" ${Prefix}_MAJOR_VERSION "${${Prefix}_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.([0-9]+)(\\..*)?$" "\\1" ${Prefix}_MINOR_VERSION "${${Prefix}_VERSION_STRING}") - if (${Prefix}_VERSION_STRING MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+.*$") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ${Prefix}_PATCH_VERSION "${${Prefix}_VERSION_STRING}") - else () - set(${Prefix}_PATCH_VERSION "0") - endif () - endif () -endmacro () diff --git a/recipe/cmake/cmake/VA_COPY.cmake b/recipe/cmake/cmake/VA_COPY.cmake deleted file mode 100644 index ab18cc8..0000000 --- a/recipe/cmake/cmake/VA_COPY.cmake +++ /dev/null @@ -1,43 +0,0 @@ -macro(VA_COPY) - write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" - "#include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - va_copy (args2, args1); - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - }") - - try_compile(IPOPT_HAS_VA_COPY ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c) - - if (IPOPT_HAS_VA_COPY) - set(VA_COPY va_copy CACHE STRING "va_copy function") - else () - write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" - "#include - void f (int i, ...) { - va_list args1, args2; - va_start (args1, i); - __va_copy (args2, args1); - if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) - exit (1); - va_end (args1); va_end (args2); - } - int main() { - f (0, 42); - return 0; - }") - - try_compile(IPOPT_HAS_VA_COPY ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c) - - if (HAVE___VA_COPY) - set(_VA_COPY __va_copy CACHE STRING "va_copy function") - endif () - endif() -endmacro() diff --git a/recipe/cmake/cmake/arm-toolchain.cmake b/recipe/cmake/cmake/arm-toolchain.cmake deleted file mode 100644 index d72febf..0000000 --- a/recipe/cmake/cmake/arm-toolchain.cmake +++ /dev/null @@ -1,43 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Generic) -#set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR arm) -set(CMAKE_CROSSCOMPILING 1) - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER arm-none-eabi-gcc) -set(CMAKE_CXX_COMPILER arm-none-eabi-g++) - -set(CMAKE_AR "arm-none-eabi-ar" CACHE PATH "" FORCE) -set(CMAKE_RANLIB "arm-none-eabi-ranlib" CACHE PATH "" FORCE) -set(CMAKE_LINKER "arm-none-eabi-ld" CACHE PATH "" FORCE) -set(CMAKE_SIZE "arm-none-eabi-size") -set(CMAKE_OBJCOPY "arm-none-eabi-objcopy") - -# $ dnf install arm-none-eabi-gcc-cs-c++.x86_64 arm-none-eabi-gcc-cs.x86_64 -# $ dnf install arm-none-eabi-newlib - -set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") -set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") - -#set(CMAKE_C_COMPILER_WORKS 1) -#set(CMAKE_CXX_COMPILER_WORKS 1) -set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) - -# error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp + -mthumb or -mfloat-abi=hard" -set(CMAKE_CXX_FLAGS "-mfloat-abi=hard --specs=nosys.specs") -set(CMAKE_C_FLAGS "-mfloat-abi=hard --specs=nosys.specs") - -set(CMAKE_CXX_EXTENSIONS OFF) - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH /usr/arm-non-eabi/ /home/user/arm-install ) -set(CMAKE_STAGING_PREFIX /home/user/stage) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) diff --git a/recipe/cmake/cmake/coin-macros.cmake b/recipe/cmake/cmake/coin-macros.cmake deleted file mode 100644 index 3a09a73..0000000 --- a/recipe/cmake/cmake/coin-macros.cmake +++ /dev/null @@ -1,486 +0,0 @@ -# coin_check_and_add_include_path: check if ${dir}/include is a path and exists -# dir must be a variable containing "None" or a path -macro(coin_check_and_add_include_path dir) - if (NOT ${dir} STREQUAL "None") - if (NOT EXISTS "${${dir}}") - message(FATAL_ERROR "Error: ${dir} = ${${dir}} which is not an existing directory") - else () - include_directories(${${dir}}) - endif () - endif () -endmacro () - -# coin_check_and_add_library_path: check if ${dir}/lib is a path and exists -# dir must be a variable containing "None" or a path -macro(coin_check_and_add_library_path dir) - if (NOT ${dir} STREQUAL "None") - if (NOT EXISTS "${${dir}}") - message(FATAL_ERROR "Error: ${dir} = ${${dir}} which is not an existing directory") - else () - link_directories(${${dir}}) - endif () - endif () -endmacro () - -# coin_check_and_add_include_library_path: check if ${dir}/lib and ${dir}/include are pathes and exists -# dir must be a variable containing "None" or a path -macro(coin_check_and_add_include_library_path dir) - if (NOT ${dir} STREQUAL "None") - if (NOT EXISTS "${${dir}}/include") - message(FATAL_ERROR "Error: ${dir} = ${${dir}}/include which is not an existing directory") - else () - include_directories(${${dir}}/include) - endif () - - if (NOT EXISTS "${${dir}}/lib") - message(FATAL_ERROR "Error: ${dir} = ${${dir}}/lib which is not an existing directory") - else () - link_directories(${${dir}}/lib) - endif () - endif () -endmacro() - -# -# macros to manage files and version -# - -macro(add_source_files ListFiles FilesToInclude Version VersionToCheck) - if (("${${Version}}" VERSION_GREATER "${VersionToCheck}") OR ("${${Version}}" VERSION_EQUAL "${VersionToCheck}")) - set(${ListFiles} ${${ListFiles}} - ${${FilesToInclude}}) - endif () -endmacro() - -macro(remove_source_files ListFiles FilesToExclude Version VersionToCheck) - if (("${${Version}}" VERSION_EQUAL "${VersionToCheck}") OR ("${${Version}}" VERSION_GREATER "${VersionToCheck}")) - foreach(Item IN LIST ${FilesToExclude}) - list(REMOVE_ITEM ${ListFiles} ${Item}) - endforeach() - endif () -endmacro() - -# -# macros for tests -# - -find_package(PythonInterp REQUIRED) - -set(COIN_TEST_LOG_DIR "${CMAKE_BINARY_DIR}/tests" CACHE PATH "The log and output directory for tests") - -mark_as_advanced(COIN_TEST_LOG_DIR) - -if (NOT EXISTS ${CMAKE_BINARY_DIR}/CoinTests) - make_directory(${CMAKE_BINARY_DIR}/CoinTests) -endif () - -if (NOT EXISTS ${COIN_TEST_LOG_DIR}) - make_directory(${COIN_TEST_LOG_DIR}) -endif () - -# add_coin_test: generate a cmake wrapper around cbc / clp executable and then add the test -# SolverName: the name of the solver. Will be appended to the out and log filename (must have the same name as the built target) -# Name: the name of the test -# FileData: the name of the mps / lp data file - -macro(add_coin_test Name SolverName FileData) - if (WIN32) - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat "cmd.exe /C \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SolverName} ${FileData} %COIN_EXE_OPTIONS% -solution ${COIN_TEST_LOG_DIR}/${Name}.out -solve > ${COIN_TEST_LOG_DIR}/${Name}.log 2>&1 \"") - - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat) - else () - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh "sh -c \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SolverName} ${FileData} $COIN_EXE_OPTIONS -solution ${COIN_TEST_LOG_DIR}/${Name}.out -solve > ${COIN_TEST_LOG_DIR}/${Name}.log 2>&1 \"") - - execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - endif () - - if (WIN32) - # Escape each ';' in the %PATH% environment variable - string(REGEX REPLACE "\\\\" "/" WINPATH "$ENV{PATH}") - string(REGEX REPLACE "\;" "\\\\;" WINPATH "${WINPATH}") - - set(ENV_COIN_TESTS "PATH=${WINPATH}\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/lib\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/bin") - set_tests_properties(${Name} PROPERTIES ENVIRONMENT "PATH=${ENV_COIN_TESTS}") - endif () -endmacro() - -# add_coin_test_list: generate a cmake wrapper around cbc / clp executable and then add the test -# SolverName: the name of the solver. Will be appended to the out and log filename (must have the same name as the built target) -# Prefix: a prefix which will be added to the test name -# Suffix: a suffix which will be added to the test name -# FileList: the list of test file -# Label: a default label to tag tests -# Timeout: a dafault timeout for tests -macro(add_coin_test_list SolverName Prefix Suffix FileList Label Timeout) - foreach(File ${${FileList}}) - get_filename_component(_NAME ${File} NAME) - string(REGEX REPLACE "[\\.]" "_" _NAME "${_NAME}") - - add_coin_test(${Prefix}_${_NAME}_${Suffix} ${SolverName} ${File}) - - if (NOT COIN_TESTS_DISABLE_TIMEOUT) - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT ${Timeout}) - else () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT 1000000) - endif () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES LABELS "${Label}") - endforeach () -endmacro() - -# add_coin_sym_test: generate a cmake wrapper around symphony executable and then add the test -# SolverName: the name of the solver. Will be appended to the out and log filename (must have the same name as the built target) -# Name: the name of the test -# FileData: the name of the mps / lp data file - -macro(add_coin_sym_test Name SolverName FileData) - if (WIN32) - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat "cmd.exe /C \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/symphony.exe -F ${FileData} %COIN_EXE_OPTIONS% > ${COIN_TEST_LOG_DIR}/${Name}.log 2>&1 \"") - - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat) - else () - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh "sh -c \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/symphony -F ${FileData} $COIN_EXE_OPTIONS > ${COIN_TEST_LOG_DIR}/${Name}.log 2>&1 \"") - - execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - endif () - - if (WIN32) - # Escape each ';' in the %PATH% environment variable - string(REGEX REPLACE "\\\\" "/" WINPATH "$ENV{PATH}") - string(REGEX REPLACE "\;" "\\\\;" WINPATH "${WINPATH}") - - set(ENV_COIN_TESTS "PATH=${WINPATH}\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/lib\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/bin") - set_tests_properties(${Name} PROPERTIES ENVIRONMENT "PATH=${ENV_COIN_TESTS}") - endif () -endmacro() - -# add_coin_sym_test_list: generate a cmake wrapper around symphony executable and then add the test -# SolverName: the name of the solver. Will be appended to the out and log filename (must have the same name as the built target) -# Prefix: a prefix which will be added to the test name -# Suffix: a suffix which will be added to the test name -# FileList: the list of test file -# Label: a default label to tag tests -# Timeout: a dafault timeout for tests -macro(add_coin_sym_test_list SolverName Prefix Suffix FileList Label Timeout) - foreach(File ${${FileList}}) - get_filename_component(_NAME ${File} NAME) - string(REGEX REPLACE "[\\.]" "_" _NAME "${_NAME}") - - add_coin_sym_test(${Prefix}_${_NAME}_${Suffix} ${SolverName} ${File}) - - if (NOT COIN_TESTS_DISABLE_TIMEOUT) - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT ${Timeout}) - else () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT 1000000) - endif () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES LABELS "${Label}") - endforeach () -endmacro() - -# add_coin_vol_test: generate a cmake wrapper for Vol and then add the test -# SolverName: the name of the solver. Will be appended to the out and log filename (must have the same name as the built target) -# Name: the name of the test -# FileData: the name of the mps / lp data file - -macro(add_coin_vol_test Name SolverName FileData) - if (WIN32) - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat "cmd.exe /C \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vollp.exe -F ${FileData} > ${COIN_TEST_LOG_DIR}/${Name}.log 2>&1 \"") - - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat) - else () - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh "sh -c \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/vollp -F ${FileData} > ${COIN_TEST_LOG_DIR}/${Name}.log 2>&1 \"") - - execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - endif () - - if (WIN32) - # Escape each ';' in the %PATH% environment variable - string(REGEX REPLACE "\\\\" "/" WINPATH "$ENV{PATH}") - string(REGEX REPLACE "\;" "\\\\;" WINPATH "${WINPATH}") - - set(ENV_COIN_TESTS "PATH=${WINPATH}\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/lib\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/bin") - set_tests_properties(${Name} PROPERTIES ENVIRONMENT "PATH=${ENV_COIN_TESTS}") - endif () -endmacro() - -# add_coin_vol_test_list: generate a cmake wrapper around osi_vol executable and then add the test -# Prefix: a prefix which will be added to the test name -# Suffix: a suffix which will be added to the test name -# FileList: the list of test file -# Label: a default label to tag tests -# Timeout: a dafault timeout for tests -macro(add_coin_vol_test_list Prefix Suffix FileList Label Timeout) - foreach(File ${${FileList}}) - get_filename_component(_NAME ${File} NAME) - string(REGEX REPLACE "[\\.]" "_" _NAME "${_NAME}") - - add_coin_test(${Prefix}_${_NAME}_${Suffix} osi_vol ${File}) - - if (NOT COIN_TESTS_DISABLE_TIMEOUT) - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT ${Timeout}) - else () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT 1000000) - endif () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES LABELS "${Label}") - endforeach () -endmacro() - -# add_coin_dylp_test: generate a cmake wrapper around osi_dylp executable and then add the test -# SolverName: the name of the solver. Will be appended to the out and log filename (must have the same name as the built target) -# Name: the name of the test -# FileData: the name of the mps / lp data file - -macro(add_coin_dylp_test Name SolverName FileData) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/tmp) - make_directory(${CMAKE_BINARY_DIR}/tmp) - endif () - - get_filename_component(FileData_EXT ${FileData} EXT) - get_filename_component(FileData_NAME ${FileData} NAME) - - if ((FileData_EXT STREQUAL ".mps.gz") OR (FileData_EXT STREQUAL ".lp.gz") OR (FileData_EXT STREQUAL ".gz")) - string(REGEX REPLACE ".gz" "" FileData_NAME_NOGZ ${FileData_NAME}) - - if (WIN32) - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat - "cmd.exe /C \"${CMAKE_COMMAND} -E copy ${FileData} ${CMAKE_BINARY_DIR}/tmp " - " && gunzip.exe -f ${CMAKE_BINARY_DIR}/tmp/${FileData_NAME} " - " && ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osi_dylp.exe -L ${COIN_TEST_LOG_DIR}/${Name}.log -e ${CMAKE_CURRENT_SOURCE_DIR}/DyLP/src/Dylp/dy_errmsgs.txt ${CMAKE_BINARY_DIR}/tmp/${FileData_NAME_NOGZ})\"") - - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat) - else () - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh - "sh -c \"${CMAKE_COMMAND} -E copy ${FileData} ${CMAKE_BINARY_DIR}/tmp " - " && gunzip -f ${CMAKE_BINARY_DIR}/tmp/${FileData_NAME} " - " && ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osi_dylp -L ${COIN_TEST_LOG_DIR}/${Name}.log -e ${CMAKE_CURRENT_SOURCE_DIR}/DyLP/src/Dylp/dy_errmsgs.txt ${CMAKE_BINARY_DIR}/tmp/${FileData_NAME_NOGZ})\"") - - execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - endif () - else () - if (WIN32) - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat - "cmd /C \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osi_dylp.exe -L ${COIN_TEST_LOG_DIR}/${Name}.log -e ${CMAKE_CURRENT_SOURCE_DIR}/DyLP/src/Dylp/dy_errmsgs.txt ${FileData})\"") - - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.bat) - else () - file(WRITE ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh - "sh -c \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osi_dylp -L ${COIN_TEST_LOG_DIR}/${Name}.log -e ${CMAKE_CURRENT_SOURCE_DIR}/DyLP/src/Dylp/dy_errmsgs.txt ${FileData})\"") - - execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/CoinTests/${Name}_${SolverName}.sh) - endif () - endif () - - if (WIN32) - # Escape each ';' in the %PATH% environment variable - string(REGEX REPLACE "\\\\" "/" WINPATH "$ENV{PATH}") - string(REGEX REPLACE "\;" "\\\\;" WINPATH "${WINPATH}") - - set(ENV_COIN_TESTS "PATH=${WINPATH}\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/lib\\;${CMAKE_BINARY_DIR}/Dependencies/${CMAKE_CFG_INTDIR}/bin") - set_tests_properties(${Name} PROPERTIES ENVIRONMENT "PATH=${ENV_COIN_TESTS}") - endif () -endmacro() - -# add_coin_dylp_test_list: generate a cmake wrapper around osi_dylp executable and then add the test -# Prefix: a prefix which will be added to the test name -# Suffix: a suffix which will be added to the test name -# FileList: the list of test file -# Label: a default label to tag tests -# Timeout: a dafault timeout for tests -macro(add_coin_dylp_test_list Prefix Suffix FileList Label Timeout) - foreach(File ${${FileList}}) - get_filename_component(_NAME ${File} NAME) - string(REGEX REPLACE "[\\.]" "_" _NAME "${_NAME}") - - add_coin_test(${Prefix}_${_NAME}_${Suffix} osi_dylp ${File}) - - if (NOT COIN_TESTS_DISABLE_TIMEOUT) - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT ${Timeout}) - else () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT 1000000) - endif () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES LABELS "${Label}") - endforeach () -endmacro() - -# create_log_analysis: build a log analysis test for one solver. The string FAILED is returned is case of failure and PASSED in case of success -# - Name: a value corresponding to the name of the test -# - AdditionalName: a value corresponding to the suffix name of the test -# - TestRegex: the regex to be extracted with where the result must be found -# - TestRefVal: the reference result -# - TestRelLevel: the test threshold -macro(create_log_analysis Name AdditionalName TestRegex TestRefVal TestRelLevel) - add_test(NAME ${Name}_${AdditionalName} - WORKING_DIRECTORY ${BinTestPath} - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/parse_results.py ${COIN_TEST_LOG_DIR}/${Name}.log ${TestRegex} ${TestRefVal} ${TestRelLevel}) - - set_tests_properties(${Name}_${AdditionalName} PROPERTIES DEPENDS "${TestName}_${TestSolverName}") - set_tests_properties(${Name}_${AdditionalName} PROPERTIES ENVIRONMENT "${TEST_ENV_VAR}") - set_tests_properties(${Name}_${AdditionalName} PROPERTIES PASS_REGULAR_EXPRESSION "PASSED") - set_tests_properties(${Name}_${AdditionalName} PROPERTIES LABELS "ANALYSIS") -endmacro() - -# From hydrogen CMakeLists.txt file -string( ASCII 27 _escape) - -set(color_black "${_escape}[0;30m") # Black - Regular -set(color_red "${_escape}[0;31m") # Red -set(color_green "${_escape}[0;32m") # Green -set(color_yellow "${_escape}[0;33m") # Yellow -set(color_blue "${_escape}[0;34m") # Blue -set(color_purple "${_escape}[0;35m") # Purple -set(color_cyan "${_escape}[0;36m") # Cyan -set(color_white "${_escape}[0;37m") # White -set(color_bblack "${_escape}[1;30m") # Black - Bold -set(color_bred "${_escape}[1;31m") # Red -set(color_bgreen "${_escape}[1;32m") # Green -set(color_byellow "${_escape}[1;33m") # Yellow -set(color_bblue "${_escape}[1;34m") # Blue -set(color_bpurple "${_escape}[1;35m") # Purple -set(color_bcyan "${_escape}[1;36m") # Cyan -set(color_bwhite "${_escape}[1;37m") # White -set(color_ublack "${_escape}[4;30m") # Black - Underline -set(color_ured "${_escape}[4;31m") # Red -set(color_ugreen "${_escape}[4;32m") # Green -set(color_uyellow "${_escape}[4;33m") # Yellow -set(color_ublue "${_escape}[4;34m") # Blue -set(color_upurple "${_escape}[4;35m") # Purple -set(color_ucyan "${_escape}[4;36m") # Cyan -set(color_uwhite "${_escape}[4;37m") # White -set(color_bgblack "${_escape}[40m") # Black - Background -set(color_bgred "${_escape}[41m") # Red -set(color_bggreen "${_escape}[42m") # Green -set(color_bgyellow "${_escape}[43m") # Yellow -set(color_bgblue "${_escape}[44m") # Blue -set(color_bgpurple "${_escape}[45m") # Purple -set(color_bgcyan "${_escape}[46m") # Cyan -set(color_bgwhite "${_escape}[47m") # White -set(color_reset "${_escape}[0m") # Text Reset - -# Example of use: -# COLOR_MESSAGE("${color_cyan}Installation Summary${color_reset}") - -function(COLOR_MESSAGE TEXT) - if (CMAKE_COLOR_MAKEFILE AND NOT WIN32) - message(${TEXT}) - else () - string(REGEX REPLACE "${_escape}[\\[0123456789;]*m" "" __TEXT ${TEXT}) - message("${__TEXT} ") - endif () -endfunction () - -# add_regex: allow to concat several regex into one for using it with cmake -macro(add_regex VARIABLE REGEX) - set(${VARIABLE} "${${VARIABLE}}${REGEX}.*") -endmacro () - -# Example of use: -# -# set(TEST_REGEX "") -# add_regex(TEST_REGEX "INFO : Overall capacity cost : 7.54846e[+]09" ) -# add_regex(TEST_REGEX "INFO : Overall simulation cost : 3.40945e[+]09") -# add_regex(TEST_REGEX "INFO : Overall reward : -1.09579e[+]10" ) -# set_tests_properties(Test_Name PROPERTIES PASS_REGULAR_EXPRESSION "${TEST_REGEX}" ) - -# -# macros to manage files and version -# - -# add_source_files(ListFiles FilesToInclude VersionRef VersionToCheck) -# ListFiles: a variable name which will contain the resulting list of files -# FilesToInclude: a variable name containing a list of files to be included -# VersionRef: a string containing the reference version (above or equal to this version, the files are included in the resulting list) -# VersionToCheck: a string containing the test version. If the version is above or equal to this version, the files are included in the resulting list -macro(add_source_files ListFiles FilesToInclude VersionRef VersionToCheck) - if (("${VersionToCheck}" VERSION_GREATER "${VersionRef}") OR ("${VersionToCheck}" VERSION_EQUAL "${VersionRef}")) - set(${ListFiles} ${${ListFiles}} - ${FilesToInclude}) - endif () -endmacro() - -# remove_source_files(ListFiles FilesToExclude VersionRef VersionToCheck) -# ListFiles: a variable name which will contain the resulting list of files -# FilesToInclude: a variable name containing a list of files to be excluded -# VersionRef: a string containing the reference version (above or equal to this version, the files are excluded from the resulting list) -# VersionToCheck: a string containing the test version. If the version is above or equal to this version, the files are excluded from the resulting list -macro(remove_source_files ListFiles FilesToExclude VersionRef VersionToCheck) - if (("${VersionToCheck}" VERSION_GREATER "${VersionRef}") OR ("${VersionToCheck}" VERSION_EQUAL "${VersionRef}")) - set(TMP_LIST ${FilesToExclude}) - #foreach(Item ${TMP_LIST}) - foreach(Item IN LISTS TMP_LIST) - list(REMOVE_ITEM ${ListFiles} ${Item}) - endforeach() - endif () -endmacro() - -# -# How to use these macros: -# -# -# set(LIST_SRCS file1.cpp -# file2.cpp -# file3.cpp) -# -# set(LIST_TO_ADD_SRCS file4.cpp -# file5.cpp -# file6.cpp) -# -# set(VERSION "1.1") -# -# add_source_files(LIST_SRCS "${LIST_TO_ADD_SRCS}" "1.0" "${VERSION}") -# -# set(LIST_TO_ADD_SRCS file7.cpp) -# -# set(VERSION "0.9") -# -# add_source_files(LIST_SRCS "${LIST_TO_ADD_SRCS}" "1.0" "${VERSION}") -# -# message(STATUS "RESULT: ADD - LIST_SRCS = ${LIST_SRCS}") -# -# set(LIST_TO_REMOVE_SRCS file4.cpp) -# -# set(VERSION "1.1") -# -# remove_source_files(LIST_SRCS LIST_TO_REMOVE_SRCS "1.0" "${VERSION}") -# -# set(LIST_TO_REMOVE_SRCS file5.cpp) -# -# set(VERSION "0.9") -# -# remove_source_files(LIST_SRCS LIST_TO_REMOVE_SRCS "1.0" "${VERSION}") -# -# message(STATUS "RESULT: REMOVE - LIST_SRCS = ${LIST_SRCS}") - -macro(add_ipopt_test Name FileData) - add_test(NAME ${Name} - COMMAND ${CMAKE_BINARY_DIR}/bin/ipopt -- ${FileData}) -endmacro() - -macro(add_ipopt_test_list Prefix Suffix FileList Label Timeout) - foreach(File ${${FileList}}) - string(REGEX REPLACE "[\\.]" "_" _NAME "${File}") - string(REGEX REPLACE "[-]" "_" _NAME "${_NAME}") - string(REGEX REPLACE "[/]" "_" _NAME "${_NAME}") - - add_ipopt_test(${Prefix}_${_NAME}_${Suffix} ${IPOPT_INSTANCES_DIR}/${File}) - - if (NOT COIN_TESTS_DISABLE_TIMEOUT) - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT ${Timeout}) - else () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES TIMEOUT 1000000) - endif () - set_tests_properties(${Prefix}_${_NAME}_${Suffix} PROPERTIES LABELS "${Label}") - endforeach () -endmacro() diff --git a/recipe/cmake/cmake/compat.c b/recipe/cmake/cmake/compat.c deleted file mode 100644 index 9fb447d..0000000 --- a/recipe/cmake/cmake/compat.c +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// Prior to GLIBC_2.14, memcpy was aliased to memmove. -void* memmove(void* a, const void* b, size_t c); -void* memcpy(void* a, const void* b, size_t c); -void* memcpy(void* a, const void* b, size_t c) { - return memmove(a, b, c); -} - -#ifdef __cplusplus -} -#endif diff --git a/recipe/cmake/cmake/compat.cpp b/recipe/cmake/cmake/compat.cpp deleted file mode 100644 index 134acdc..0000000 --- a/recipe/cmake/cmake/compat.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include -#include -#include -#include - -#ifndef _GLIBCXX_USE_NOEXCEPT -# define _GLIBCXX_USE_NOEXCEPT throw() -#endif - -namespace std { - -const char* bad_exception::what() const throw() -{ - return "std::bad_exception"; -} - -const char* bad_cast::what() const throw() -{ - return "std::bad_cast"; -} - -const char* bad_alloc::what() const throw() -{ - return "std::bad_alloc"; -} - -namespace __detail -{ -struct _List_node_base -{ - void _M_hook(std::__detail::_List_node_base* const __position) throw () __attribute__((used)) - { - _M_next = __position; - _M_prev = __position->_M_prev; - __position->_M_prev->_M_next = this; - __position->_M_prev = this; - } - void _M_unhook() __attribute__((used)) - { - _List_node_base* const __next_node = _M_next; - _List_node_base* const __prev_node = _M_prev; - __prev_node->_M_next = __next_node; - __next_node->_M_prev = __prev_node; - } - _List_node_base* _M_next; - _List_node_base* _M_prev; -}; -} // namespace detail - -template ostream& ostream::_M_insert(bool); -template ostream& ostream::_M_insert(long); -template ostream& ostream::_M_insert(double); -template ostream& ostream::_M_insert(unsigned long); -template ostream& ostream::_M_insert(const void*); -template ostream& __ostream_insert(ostream&, const char*, streamsize); -template istream& istream::_M_extract(long&); -template istream& istream::_M_extract(unsigned short&); - -out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT { } - -// Used with permission. -// See: https://github.com/madlib/madlib/commit/c3db418c0d34d6813608f2137fef1012ce03043d - -void -ctype::_M_widen_init() const { - char __tmp[sizeof(_M_widen)]; - for (unsigned __i = 0; __i < sizeof(_M_widen); ++__i) - __tmp[__i] = __i; - do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); - - _M_widen_ok = 1; - // Set _M_widen_ok to 2 if memcpy can't be used. - for (unsigned __i = 0; __i < sizeof(_M_widen); ++__i) - if (__tmp[__i] != _M_widen[__i]) { - _M_widen_ok = 2; - break; - } -} - -}// namespace std diff --git a/recipe/cmake/cmake/compatibility.h b/recipe/cmake/cmake/compatibility.h deleted file mode 100644 index 004e579..0000000 --- a/recipe/cmake/cmake/compatibility.h +++ /dev/null @@ -1,11 +0,0 @@ -#if defined(__linux) && !defined(DISABLE_SYMVER) -__asm__(".symver memcpy, memcpy@GLIBC_2.2.5"); -__asm__(".symver omp_set_lock, omp_set_lock@OMP_1.0"); -__asm__(".symver omp_unset_lock, omp_unset_lock@OMP_1.0"); -__asm__(".symver omp_init_lock, omp_init_lock@OMP_1.0"); -#endif - -#ifdef _MSC_VER -# define stricmp _stricmp -# define inline __inline -#endif diff --git a/recipe/cmake/cmake/export_git.cmake b/recipe/cmake/cmake/export_git.cmake deleted file mode 100644 index 447fa7d..0000000 --- a/recipe/cmake/cmake/export_git.cmake +++ /dev/null @@ -1,176 +0,0 @@ -#------------------------------------------------------------ -# Find Git -#------------------------------------------------------------ - -# GIT_EXECUTABLE - path to git command line client -# GIT_FOUND - true if the command line client was found -# GIT_VERSION_STRING - the version of git found (since CMake 2.8.8) - -find_package(Git) - -if (NOT GIT_FOUND) - message(ERROR "Git required to build this tool") -endif () - -if (NOT TARGET git-update) - add_custom_target(git-update) -endif () - -# GIT_WC_INFO(dir prefix) -# Input parameters: -# - dir: the root directory of the git repository -# - prefix: the prefix which will be prefixed to each result variable -# Macro which return 2 informations related to the git repo: -# - ${prefix}_WC_REVISION: the hash revision number of the current state of the repo -# - ${prefix}_WC_ROOT: the origin URL of the repository -# - ${prefix}_WC_DESCRIBE: the 'git describe' version of the working copy -# - ${prefix}_WC_SVNEQUIV: return an equivalent to a svn revision number (the number of commit after a tag) - -macro(GIT_WC_INFO dir prefix) - execute_process(COMMAND ${GIT_EXECUTABLE} rev-list -n 1 HEAD - WORKING_DIRECTORY ${dir} - ERROR_VARIABLE GIT_error - OUTPUT_VARIABLE ${prefix}_WC_REVISION_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE) - - set(${prefix}_WC_REVISION ${${prefix}_WC_REVISION_HASH}) - - if (NOT ${GIT_error} EQUAL 0) - message(SEND_ERROR "Command \"${GIT_EXECUTABLE} rev-list -n 1 HEAD\" in directory ${dir} failed with output:\n${GIT_error}") - else () - execute_process(COMMAND ${GIT_EXECUTABLE} name-rev ${${prefix}_WC_REVISION_HASH} - WORKING_DIRECTORY ${dir} - OUTPUT_VARIABLE ${prefix}_WC_REVISION_NAME - OUTPUT_STRIP_TRAILING_WHITESPACE) - endif () - - execute_process(COMMAND ${GIT_EXECUTABLE} config --get remote.origin.url - WORKING_DIRECTORY ${dir} - OUTPUT_VARIABLE ${prefix}_WC_URL - OUTPUT_STRIP_TRAILING_WHITESPACE) - - set(${prefix}_WC_ROOT ${${prefix}_WC_URL}) - - execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=8 - WORKING_DIRECTORY ${dir} - OUTPUT_VARIABLE ${prefix}_WC_DESCRIBE - ERROR_VARIABLE GIT_ERROR_VAR - OUTPUT_STRIP_TRAILING_WHITESPACE) - - if (NOT GIT_ERROR_VAR STREQUAL "") - message(FATAL_ERROR "Error: Git describe doesn't work - missing tags ?") - endif () - - string(REGEX REPLACE "(.*-)([0-9]*)(-g.*)" "\\2" ${prefix}_WC_SVNEQUIV "${${prefix}_WC_DESCRIBE}") -endmacro(GIT_WC_INFO) - -# Clone a git repository by branch. -# Input variables: -# - Path_repo: the URL of the repo (git@192.168.0.18:NetworkDesignerDemo for example) -# - Path_dest: the URL of the destination directory (/home/me/myclonedrepo/ for example) -# - Repo_branch: the name of the branch to be cloned -# - Repo_commit: the hash tag of the commit to be retrieved (HEAD for example) -# - Rule_name: the name of the rule to update the repo -macro(clone_git_branch Path_repo Path_dest Repo_branch Repo_commit Rule_name) - if ("${Repo_branch}" STREQUAL "master") - message(FATAL_ERROR "Can't clone the master branch, use the 'clone_git' macro instead") - endif () - - if ("${Repo_commit}" STREQUAL "") - set (Repo_commit "HEAD") - endif () - - if (NOT EXISTS ${Path_dest}) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${Path_dest}) - execute_process(COMMAND ${GIT_EXECUTABLE} clone -b ${Repo_branch} ${Path_repo} ${Path_dest} - OUTPUT_VARIABLE _GIT_CLONE_GIT_BRANCH_OUTPUT - ERROR_VARIABLE _GIT_CLONE_GIT_BRANCH_ERROR) - if (NOT ${_GIT_CLONE_GIT_BRANCH_ERROR} EQUAL 0) - message(SEND_ERROR "Command ${GIT_EXECUTABLE} clone failed with output:\n${_GIT_CLONE_GIT_BRANCH_ERROR}") - endif () - endif () - - add_custom_target(git-update-branch-${Rule_name}) - add_custom_command(TARGET git-update-branch-${Rule_name} - COMMAND ${GIT_EXECUTABLE} pull - WORKING_DIRECTORY ${Path_dest} - COMMENT "clone_git_branch: updating repository branch ${Repo_branch} in ${Path_dest}") - - add_dependencies(git-update git-update-branch-${Rule_name}) - - add_subdirectory(${Path_dest}) -endmacro(clone_git_branch) - -# Clone a git repository by tag. -# Input variables: -# - Path_repo: the URL of the repo (git@192.168.0.18:NetworkDesignerDemo for example) -# - Path_dest: the URL of the destination directory (/home/me/myclonedrepo/ for example) -# - Repo_branch: the name of the branch to be cloned -# - Repo_commit: the hash tag of the commit to be retrieved (HEAD for example) -# - Rule_name: the name of the rule to update the repo -macro(clone_git_tag Path_repo Path_dest Repo_tag Repo_commit Rule_name) - if ("${Repo_tag}" STREQUAL "master") - message(FATAL_ERROR "Can't clone the tag branch, use the 'clone_git' macro instead") - endif () - - if ("${Repo_commit}" STREQUAL "") - set (Repo_commit "HEAD") - endif () - - if (NOT EXISTS ${Path_dest}) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${Path_dest}) - execute_process(COMMAND ${GIT_EXECUTABLE} clone ${Path_repo} ${Path_dest} - COMMAND ${GIT_EXECUTABLE} checkout tags/${Repo_tag} ${Repo_commit} - WORKING_DIRECTORY ${Path_dest} - OUTPUT_VARIABLE _GIT_CLONE_GIT_TAG_OUTPUT - ERROR_VARIABLE _GIT_CLONE_GIT_TAG_ERROR) - - if (NOT ${_GIT_CLONE_GIT_TAG_ERROR} EQUAL 0) - message(SEND_ERROR "Command ${GIT_EXECUTABLE} clone failed with output:\n${_GIT_CLONE_GIT_TAG_ERROR}") - endif () - endif () - - add_custom_target(git-update-tag-${Rule_name}) - add_custom_command(TARGET git-update-tag-${Rule_name} - COMMAND ${GIT_EXECUTABLE} pull - WORKING_DIRECTORY ${Path_dest} - COMMENT "clone_git_tag: updating repository tag ${Repo_branch} in ${Path_dest}") - - add_dependencies(git-update git-update-tag-${Rule_name}) - - add_subdirectory(${Path_dest}) -endmacro(clone_git_tag) - -# Clone a git repository -# Input variables: -# - Path_repo: the URL of the repo (git@192.168.0.18:NetworkDesignerDemo for example) -# - Path_dest: the URL of the destination directory (/home/me/myclonedrepo/ for example) -# - Repo_commit: the hash tag of the commit to be retrieved (HEAD for example) -# - Rule_name: the name of the rule to update the repo -macro(clone_git Path_repo Path_dest Repo_commit Rule_name) - if ("${Repo_commit}" STREQUAL "") - set (Repo_commit "HEAD") - endif () - - if (NOT EXISTS ${Path_dest}) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${Path_dest}) - execute_process(COMMAND ${GIT_EXECUTABLE} clone ${Path_repo} ${Path_dest} - WORKING_DIRECTORY ${Path_dest} - OUTPUT_VARIABLE _GIT_CLONE_GIT_BRANCH_OUTPUT - ERROR_VARIABLE _GIT_CLONE_GIT_BRANCH_ERROR) - - if (NOT ${_GIT_CLONE_GIT_BRANCH_ERROR} EQUAL 0) - message(SEND_ERROR "Command ${GIT_EXECUTABLE} clone failed with output:\n${_GIT_CLONE_GIT_BRANCH_ERROR}") - endif () - endif () - - add_custom_target(git-update-${Rule_name}) - add_custom_command(TARGET git-update-${Rule_name} - COMMAND ${GIT_EXECUTABLE} pull - WORKING_DIRECTORY ${Path_dest} - COMMENT "clone_git: updating repository tag ${Repo_branch} in ${Path_dest}") - - add_dependencies(git-update git-update-${Rule_name}) - - add_subdirectory(${Path_dest}) -endmacro(clone_git) diff --git a/recipe/cmake/cmake/ipopt_macros.cmake b/recipe/cmake/cmake/ipopt_macros.cmake deleted file mode 100644 index 22eb162..0000000 --- a/recipe/cmake/cmake/ipopt_macros.cmake +++ /dev/null @@ -1,274 +0,0 @@ -# Attempt to automatically determine the Fortran name-mangling scheme. -# We do this by: -# -# 1) creating a library from a Fortran source file which defines a function "mysub" -# 2) attempting to link with this library a C source file which calls the "mysub" -# function using various possible schemes (6 different schemes, corresponding -# to all combinations lower/upper case and none/one/two underscores) -# -# Note that, since names of symbols with and without underscore may be mangled -# differently (e.g. g77 mangles mysub to mysub_ and my_sub to my_sub__), we have -# to consider both cases. The two name mangling schemes are encoded in the cached -# variables SCHEME_NO_UNDERSCORES and SCHEME_WITH_UNDERSCORES. -# -# Once the name mangling schemes are determined, we use them to define two C -# preprocessor macros, F77_FUNC and F77_FUNC_, corresponding to the two cases: -# symbols with names not containing underscores and symbols with names containing -# underscores. For example, if using g77 the definitions of these two macros will be: -# #define F77_FUNC(name,NAME) name ## _ -# #define F77_FUNC_(name,NAME) name ## __ -# The appropriate #define lines are stored in the cached variables DEFINE_F77_FUNC and -# DEFINE_F77_FUNC_, respectively, and can be used to generate a configuration header -# file (using CONFIGURE_FILE). - -# Need Fortran support for this -ENABLE_LANGUAGE(Fortran) - -# Make sure that the following tests use the C and Fortran flags corresponding -# to the current build type. These flags are stored in the variables TMP_C_FLAGS -# and TMP_Fortran_FLAGS, respectively, and are used in the generated CMakeLists files. -IF(NOT CMAKE_BUILD_TYPE) - SET(TMP_C_FLAGS ${CMAKE_C_FLAGS}) - SET(TMP_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}) -ENDIF(NOT CMAKE_BUILD_TYPE) -IF(CMAKE_BUILD_TYPE MATCHES "Default") - SET(TMP_C_FLAGS ${CMAKE_C_FLAGS}) - SET(TMP_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}) -ENDIF(CMAKE_BUILD_TYPE MATCHES "Default") -IF(CMAKE_BUILD_TYPE MATCHES "Release") - SET(TMP_C_FLAGS ${CMAKE_C_FLAGS_RELEASE}) - SET(TMP_Fortran_FLAGS ${CMAKE_Fortran_FLAGS_RELEASE}) -ENDIF(CMAKE_BUILD_TYPE MATCHES "Release") -IF(CMAKE_BUILD_TYPE MATCHES "Debug") - SET(TMP_C_FLAGS ${CMAKE_C_FLAGS_DEBUG}) - SET(TMP_Fortran_FLAGS ${CMAKE_Fortran_FLAGS_DEBUG}) -ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug") -IF(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") - SET(TMP_C_FLAGS ${CMAKE_C_FLAGS_RELWITHDEBINFO}) - SET(TMP_Fortran_FLAGS ${CMAKE_Fortran_FLAGS_RELWITHDEBINFO}) -ENDIF(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") -IF(CMAKE_BUILD_TYPE MATCHES "MinSizeRel") - SET(TMP_C_FLAGS ${CMAKE_C_FLAGS_MINSIZE}) - SET(TMP_Fortran_FLAGS ${CMAKE_Fortran_FLAGS_MINSIZE}) -ENDIF(CMAKE_BUILD_TYPE MATCHES "MinSizeRel") - -# Create a CMakeLists.txt file which will generate the "flib" library -FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt - "PROJECT(FortranTest Fortran)\n" - "SET(CMAKE_VERBOSE_MAKEFILE ON)\n" - "SET(CMAKE_Fortran_FLAGS \"${TMP_Fortran_FLAGS}\")\n" - "ADD_LIBRARY(flib ftest.f)\n" - ) - -# Create a simple Fortran source which defines two subroutines, "mysub" and "my_sub" -FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/ftest.f - " SUBROUTINE mysub\n" - " RETURN\n" - " END\n" - " SUBROUTINE my_sub\n" - " RETURN\n" - " END\n" - ) - -# Use TRY_COMPILE to make the target "flib" -TRY_COMPILE( - FTEST_OK - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp - flib - OUTPUT_VARIABLE MY_OUTPUT) - -message("${MY_OUTPUT}") - -# Initialize the name mangling schemes for symbol names -# with and without underscores -SET(SCHEME_NO_UNDERSCORES "" - CACHE INTERNAL "Name mangling scheme (symbol names without underscores)") -SET(SCHEME_WITH_UNDERSCORES "" - CACHE INTERNAL "Name mangling scheme (symbol names with underscores)") - -# Continue only if we were successful in creating the "flib" library -IF(FTEST_OK) - - # CASE 1: symbol names WITHOUT undersores - # --------------------------------------- - - # Overwrite CMakeLists.txt with one which will generate the "ctest1" executable - FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt - "PROJECT(FortranTest C)\n" - "SET(CMAKE_VERBOSE_MAKEFILE ON)\n" - "SET(CMAKE_C_FLAGS \"${TMP_C_FLAGS}\")\n" - "ADD_EXECUTABLE(ctest1 ctest1.c)\n" - "FIND_LIBRARY(FLIB flib ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp)\n" - "TARGET_LINK_LIBRARIES(ctest1 \${FLIB})\n") - - # Define the list "options" of all possible schemes that we want to consider - # Get its length and initialize the counter "iopt" to zero - SET(options mysub mysub_ mysub__ MYSUB MYSUB_ MYSUB__) - LIST(LENGTH options imax) - SET(iopt 0) - - # We will attempt to sucessfully generate the "ctest" executable as long as - # there still are entries in the "options" list - WHILE(${iopt} LESS ${imax}) - - # Get the current list entry (current scheme) - LIST(GET options ${iopt} opt) - - # Generate C source which calls the "mysub" function using the current scheme - FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/ctest1.c - "int main(){${opt}();return(0);}\n") - - # Use TRY_COMPILE to make the "ctest1" executable from the current C source - # and linking to the previously created "flib" library. - TRY_COMPILE( - CTEST_OK - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp - ctest1 - OUTPUT_VARIABLE MY_OUTPUT) - - # To ensure we do not use stuff from the previous attempts, we must remove the - # CMakeFiles directory. - # ??? I didn't think I'll have to do this, but it doesn't work otherwise - FILE(REMOVE_RECURSE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeFiles) - - # Test if we successfully created the "ctest" executable. - # If yes, flag that we have successfuly determined the name mangling scheme, - # save the current scheme, and set the counter "iopt" to "imax" so that we - # exit the while loop. - # Otherwise, increment the counter "iopt" and go back in the while loop. - IF(CTEST_OK) - SET(SCHEME_NO_UNDERSCORES ${opt} - CACHE INTERNAL "Name mangling scheme (symbol names without underscores)") - SET(iopt ${imax}) - ELSE(CTEST_OK) - MATH(EXPR iopt ${iopt}+1) - ENDIF(CTEST_OK) - - ENDWHILE(${iopt} LESS ${imax}) - - # CASE 2: symbol names WITH undersores - # ------------------------------------ - - FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt - "PROJECT(FortranTest C)\n" - "SET(CMAKE_VERBOSE_MAKEFILE ON)\n" - "SET(CMAKE_C_FLAGS \"${TMP_C_FLAGS}\")\n" - "ADD_EXECUTABLE(ctest2 ctest2.c)\n" - "FIND_LIBRARY(FLIB flib ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp)\n" - "TARGET_LINK_LIBRARIES(ctest2 \${FLIB})\n") - - SET(options my_sub my_sub_ my_sub__ MY_SUB MY_SUB_ MY_SUB__) - LIST(LENGTH options imax) - SET(iopt 0) - - WHILE(${iopt} LESS ${imax}) - LIST(GET options ${iopt} opt) - FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/ctest2.c - "int main(){${opt}();return(0);}\n") - TRY_COMPILE( - CTEST_OK - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp - ctest2 - OUTPUT_VARIABLE MY_OUTPUT) - FILE(REMOVE_RECURSE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeFiles) - IF(CTEST_OK) - SET(SCHEME_WITH_UNDERSCORES ${opt} - CACHE INTERNAL "Name mangling scheme (symbol names with underscores)") - SET(iopt ${imax}) - ELSE(CTEST_OK) - MATH(EXPR iopt ${iopt}+1) - ENDIF(CTEST_OK) - ENDWHILE(${iopt} LESS ${imax}) - -ENDIF(FTEST_OK) - -# If the name mangling scheme of symbol names not containing underscores -# was successfully determined, set the appropriate C preprocessor macro - -SET(CPP_macro "") - -IF(SCHEME_NO_UNDERSCORES) - - IF(SCHEME_NO_UNDERSCORES MATCHES "mysub") - SET(CPP_macro "#define F77_FUNC(name,NAME) name") - ENDIF(SCHEME_NO_UNDERSCORES MATCHES "mysub") - - IF(SCHEME_NO_UNDERSCORES MATCHES "mysub_") - SET(CPP_macro "#define F77_FUNC(name,NAME) name ## _") - ENDIF(SCHEME_NO_UNDERSCORES MATCHES "mysub_") - - IF(SCHEME_NO_UNDERSCORES MATCHES "mysub__") - SET(CPP_macro "#define F77_FUNC(name,NAME) name ## __") - ENDIF(SCHEME_NO_UNDERSCORES MATCHES "mysub__") - - IF(SCHEME_NO_UNDERSCORES MATCHES "MYSUB") - SET(CPP_macro "#define F77_FUNC(name,NAME) NAME") - ENDIF(SCHEME_NO_UNDERSCORES MATCHES "MYSUB") - - IF(SCHEME_NO_UNDERSCORES MATCHES "MYSUB_") - SET(CPP_macro "#define F77_FUNC(name,NAME) NAME ## _") - ENDIF(SCHEME_NO_UNDERSCORES MATCHES "MYSUB_") - - IF(SCHEME_NO_UNDERSCORES MATCHES "MYSUB__") - SET(CPP_macro "#define F77_FUNC(name,NAME) NAME ## __") - ENDIF(SCHEME_NO_UNDERSCORES MATCHES "MYSUB__") - -ENDIF(SCHEME_NO_UNDERSCORES) - -SET(DEFINE_F77_FUNC ${CPP_macro} - CACHE INTERNAL "CPP macro for name mangling scheme of symbols without underscores") - -IF(SCHEME_NO_UNDERSCORES) - MESSAGE("Name mangling scheme for symbol names without underscores:\n" - " mysub -> ${SCHEME_NO_UNDERSCORES}\n" - " ${DEFINE_F77_FUNC}") -ELSE(SCHEME_NO_UNDERSCORES) - MESSAGE("Unable to determine name mangling scheme for symbol names without underscores!") -ENDIF(SCHEME_NO_UNDERSCORES) - -# If the name mangling scheme of symbol names containing underscores -# was successfully determined, set the appropriate C preprocessor macro - -SET(CPP_macro "") - -IF(SCHEME_WITH_UNDERSCORES) - - IF(SCHEME_WITH_UNDERSCORES MATCHES "my_sub") - SET(CPP_macro "#define F77_FUNC_(name,NAME) name") - ENDIF(SCHEME_WITH_UNDERSCORES MATCHES "my_sub") - - IF(SCHEME_WITH_UNDERSCORES MATCHES "my_sub_") - SET(CPP_macro "#define F77_FUNC_(name,NAME) name ## _") - ENDIF(SCHEME_WITH_UNDERSCORES MATCHES "my_sub_") - - IF(SCHEME_WITH_UNDERSCORES MATCHES "my_sub__") - SET(CPP_macro "#define F77_FUNC_(name,NAME) name ## __") - ENDIF(SCHEME_WITH_UNDERSCORES MATCHES "my_sub__") - - IF(SCHEME_WITH_UNDERSCORES MATCHES "MY_SUB") - SET(CPP_macro "#define F77_FUNC_(name,NAME) NAME") - ENDIF(SCHEME_WITH_UNDERSCORES MATCHES "MY_SUB") - - IF(SCHEME_WITH_UNDERSCORES MATCHES "MY_SUB_") - SET(CPP_macro "#define F77_FUNC_(name,NAME) NAME ## _") - ENDIF(SCHEME_WITH_UNDERSCORES MATCHES "MY_SUB_") - - IF(SCHEME_WITH_UNDERSCORES MATCHES "MY_SUB__") - SET(CPP_macro "#define F77_FUNC_(name,NAME) NAME ## __") - ENDIF(SCHEME_WITH_UNDERSCORES MATCHES "MY_SUB__") - -ENDIF(SCHEME_WITH_UNDERSCORES) - -SET(DEFINE_F77_FUNC_ "${CPP_macro}" - CACHE INTERNAL "CPP macro for name mangling scheme of symbols with underscores") - -IF(SCHEME_WITH_UNDERSCORES) - MESSAGE("Name mangling scheme for symbol names with underscores:\n" - " my_sub -> ${SCHEME_WITH_UNDERSCORES}\n" - " ${DEFINE_F77_FUNC_}") -ELSE(SCHEME_WITH_UNDERSCORES) - MESSAGE("Unable to determine name mangling scheme for symbol names with underscores!") -ENDIF(SCHEME_WITH_UNDERSCORES) \ No newline at end of file diff --git a/recipe/cmake/cmake/libstdc++-compatibility.cpp b/recipe/cmake/cmake/libstdc++-compatibility.cpp deleted file mode 100644 index 6fa189e..0000000 --- a/recipe/cmake/cmake/libstdc++-compatibility.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/* ----------------------------------------------------------------------- *//** - * - * @file libstdcxx-compatibility.cpp - * - * @brief Declarations/definitions for using an "old" libstdc++ with a newer g++ - * - * This file follows ideas proposed here: http://glandium.org/blog/?p=1901 - * Unfortunately, MADlib seems to use libstdc++ to a greater extend than - * Firefox 4.0 did, so we need to do a bit more. - * - * The declarations and definitions in this file make it possible to build - * MADlib with the following versions of gcc (please add to the list), while - * continuing to only rely on libstdc++.so.6.0.8 (which corresponds to - * gcc 4.1.2, and labels GLIBCXX_3.4.8, CXXABI_1.3.1). - * - * As of September 2012, there is still the need to support libstdc++.so.6.0.8, - * as this is the libstdc++ that shipped with RedHad/CentOS 5. - * - * Tested with the following versions of gcc: - * - gcc 4.4.2 - * - gcc 4.5.4 - * - gcc 4.6.2 - * - * For a mapping between gcc versions, libstdc++ versions, and symbol versioning - * on the libstdc++.so binary, see: - * http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html - * - *//* ----------------------------------------------------------------------- */ - -#include - -// The following macro was introduced with this commit: -// http://gcc.gnu.org/viewcvs?diff_format=h&view=revision&revision=173774 -#ifndef _GLIBCXX_USE_NOEXCEPT - #define _GLIBCXX_USE_NOEXCEPT throw() -#endif - -#define GCC_VERSION ( __GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) - -// CXXABI_1.3.2 symbols - -#if (LIBSTDCXX_COMPAT < 40300 && GCC_VERSION >= 40300) - -namespace __cxxabiv1 { - -/** - * @brief Virtual destructor for forced-unwinding class - * - * We provide an implementation to avoid CXXABI_1.3.2 symbol versions. - * - * Older versions of libstdc++ had the problem that POSIX thread cancellations - * while writing to an ostream caused an abort: - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28145 - * - * Newer versions have an additional catch block for references of type - * __cxxabiv1::__forced_unwind, which represents the POSIX cancellation object: - * http://gcc.gnu.org/onlinedocs/libstdc++/manual/using_exceptions.html - * See, e.g., file included from . Catching - * exceptions of this type requires its \c type_info object. However, this - * object is not normally present in the current binary, as explained in the - * following. - * - * The type __cxxabiv1::__forced_unwind was only introduced in May 2007 (see - * attachments to the previous bug report) and thus after the release of - * gcc 4.1.2 (Feb 13, 2007, see http://gcc.gnu.org/releases.html). - * - * As http://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html explains: - *
- * If the class declares any non-inline, non-pure virtual functions, the - * first one is chosen as the "key method" for the class, and the vtable is - * only emitted in the translation unit where the key method is defined. - *
- * - * And later on the same page: - *
- * For polymorphic classes (classes with virtual functions), the - * \c type_info object is written out along with the vtable [...]. - *
- * - * Hence, to include a vtable, we need a definition for the key method, which is - * the constructor. See the declaration here: - * http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/libsupc%2B%2B/cxxabi_forced.h - */ -__forced_unwind::~__forced_unwind() _GLIBCXX_USE_NOEXCEPT { } - -} // namespace __cxxabiv1 - -#endif // (LIBSTDCXX_COMPAT < 40300 && GCC_VERSION >= 40300) - - -// GLIBCXX_3.4.9 symbols - -#if (LIBSTDCXX_COMPAT < 40200 && GCC_VERSION >= 40200) - -namespace std { - -/** - * @brief Write a value to an ostream - * - * In recent versions of libstdc++, \c _M_insert contains the implementation for - * the various operator<<() overloads. Now, as http://glandium.org/blog/?p=1901 - * explains, newer libstdc++ versions contain various instantiations for - * \c _M_insert, even though contains a general (template) - * definition. - * - * Older versions of libstdc++ did not contain implementations for \c _M_insert, - * so we instantiate them here. See this change: - * http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/include/bits/ostream.tcc?r1=109235&r2=109236& - */ -template ostream& ostream::_M_insert(bool); -// The following four lines are not needed and commented out. Specialized -// implementations exist for ostream<<([unsigned] {short|int}). -// template ostream& ostream::_M_insert(short); -// template ostream& ostream::_M_insert(unsigned short); -// template ostream& ostream::_M_insert(int); -// template ostream& ostream::_M_insert(unsigned int); -template ostream& ostream::_M_insert(long); -template ostream& ostream::_M_insert(unsigned long); -#ifdef _GLIBCXX_USE_LONG_LONG -template ostream& ostream::_M_insert(long long); -template ostream& ostream::_M_insert(unsigned long long); -#endif -template ostream& ostream::_M_insert(float); -template ostream& ostream::_M_insert(double); -template ostream& ostream::_M_insert(long double); -template ostream& ostream::_M_insert(const void*); - -/** - * @brief Write a sequence of characters to an ostream - * - * This function was only added with this commit: - * http://gcc.gnu.org/viewcvs?view=revision&revision=123692 - */ -template ostream& __ostream_insert(ostream&, const char*, streamsize); - -} // namespace std - -#endif // (LIBSTDCXX_COMPAT < 40200 && GCC_VERSION >= 40200) - - -// GLIBCXX_3.4.11 symbols - -#if (LIBSTDCXX_COMPAT < 40400 && GCC_VERSION >= 40400) - -namespace std { - -/** - * @brief Initialize an internal data structure of ctype - * - * This was previously an inline function and moved out of line with this - * commit: - * http://gcc.gnu.org/viewcvs?view=revision&revision=140238 - * - * See also this bug report: - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37455 - * - * std::ctype::_M_widen_init() is a function added to libstdc++ by - * Jerry Quinn with revision 74662 on Dec 16, 2003: - * http://gcc.gnu.org/viewcvs?diff_format=h&view=revision&revision=74662 - * - * With explicit permission by Jerry Quinn from Oct 9, 2012, we include a - * verbatim copy of _M_widen_init() here. However, a static_cast was added to - * avoid a warning. - * - * Revision 74662 of the libstdc++-v3 file include/bits/locale_facets.h, where - * std::ctype::_M_widen_init() has been copied from, also included the - * following notice in the file header: - * http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/include/bits/locale_facets.h?diff_format=h&view=markup&pathrev=74662 - * - *
- * As a special exception, you may use this file as part of a free software - * library without restriction. [...] - *
- */ -void -ctype::_M_widen_init() const { - char __tmp[sizeof(_M_widen)]; - for (unsigned __i = 0; __i < sizeof(_M_widen); ++__i) - __tmp[__i] = static_cast(__i); - do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); - - _M_widen_ok = 1; - // Set _M_widen_ok to 2 if memcpy can't be used. - for (unsigned __i = 0; __i < sizeof(_M_widen); ++__i) - if (__tmp[__i] != _M_widen[__i]) { - _M_widen_ok = 2; - break; - } -} - -} // namespace std - -#endif // (LIBSTDCXX_COMPAT < 40400 && GCC_VERSION >= 40400) - - -// GLIBCXX_3.5.15 symbols - -#if (LIBSTDCXX_COMPAT < 40600 && GCC_VERSION >= 40600) - -#include - -namespace std { - -/** - * @brief Empty dtors for standard exceptions - * - * Later versions of libstdc++ added destructors to some standard exceptions. - * Definitions for these are missing in older versions of libstdc++. - * - * Of course, additing destructors is potentially dangerous and can change the - * ABI. However, these classes derived from \c runtime_error and \c logic_error - * before and therefore have always had virtual members. - * - * The first commit that added these destructors is: - * http://gcc.gnu.org/viewcvs?diff_format=h&view=revision&revision=170975 - * This commit was included already in the first gcc 4.6.0 release: - * http://gcc.gnu.org/viewcvs/tags/gcc_4_6_0_release/libstdc%2B%2B-v3/src/stdexcept.cc - */ -domain_error::~domain_error() _GLIBCXX_USE_NOEXCEPT { } -invalid_argument::~invalid_argument() _GLIBCXX_USE_NOEXCEPT { } -length_error::~length_error() _GLIBCXX_USE_NOEXCEPT { } -out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT { } -runtime_error::~runtime_error() _GLIBCXX_USE_NOEXCEPT { } -range_error::~range_error() _GLIBCXX_USE_NOEXCEPT { } -overflow_error::~overflow_error() _GLIBCXX_USE_NOEXCEPT { } -underflow_error::~underflow_error() _GLIBCXX_USE_NOEXCEPT { } - -} // namespace std - -#endif // (LIBSTDCXX_COMPAT < 40600 && GCC_VERSION >= 40600) diff --git a/recipe/cmake/cmake/mingw-toolchain.cmake b/recipe/cmake/cmake/mingw-toolchain.cmake deleted file mode 100644 index 483899c..0000000 --- a/recipe/cmake/cmake/mingw-toolchain.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Windows) - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) -set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) - -# $ dnf install mingw64-gcc mingw64-gcc-c++ mingw64-gcc-gfortran - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32/sys-root/mingw/ $ENV{HOME}/mingw-install ) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/recipe/cmake/cmake/mingw64-toolchain.cmake b/recipe/cmake/cmake/mingw64-toolchain.cmake deleted file mode 100644 index cd33799..0000000 --- a/recipe/cmake/cmake/mingw64-toolchain.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# based on http://www.cmake.org/Wiki/CmakeMingw - -# the name of the target operating system -SET(CMAKE_SYSTEM_NAME Windows) - -# Choose an appropriate compiler prefix - -# for classical mingw32 -# see http://www.mingw.org/ -#set(COMPILER_PREFIX "i586-mingw32msvc") - -# for 32 or 64 bits mingw-w64 -# see http://mingw-w64.sourceforge.net/ -set(COMPILER_PREFIX "x86_64-w64-mingw32") - -# which compilers to use for C and C++ -find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres) -find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc) -find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++) -find_program(CMAKE_Fortran_COMPILER NAMES ${COMPILER_PREFIX}-gfortran) - -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX}) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file diff --git a/recipe/cmake/cmake/parse_results.py b/recipe/cmake/cmake/parse_results.py deleted file mode 100644 index 411f253..0000000 --- a/recipe/cmake/cmake/parse_results.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/python - -import re -import sys - -# Example command line -# parse_results.py netlib_fit2d_cbc.log 'Optimal objective ' -68464.293294 1e-6 -# parse_results.py netlib_fit2d_cbc.log 'Optimal objective ' -68464.293294 - -# comparator = 0 -> "<=" -# comparator = 1 -> "<" -# comparator = 2 -> "=" -# comparator = 3 -> ">" -# comparator = 4 -> ">=" - -rel_level = 1e-6 -epsilon = 1e-9 -comparator = 1 - -if (len(sys.argv) <= 4): - filename = sys.argv[1] - patterns = sys.argv[2] - ref_value = float(sys.argv[3]) -elif (len(sys.argv) <= 5): - filename = sys.argv[1] - patterns = sys.argv[2] - ref_value = float(sys.argv[3]) - rel_level = float(sys.argv[4]) -elif (len(sys.argv) <= 6): - filename = sys.argv[1] - patterns = sys.argv[2] - ref_value = float(sys.argv[3]) - rel_level = float(sys.argv[4]) - comparator = int(sys.argv[5]) -else: - print('usage: parse_result.py filename pattern ref_value [rel_level=1e-6] [comparator=1]') - sys.exit(1) - -if comparator > 4: - print('wrong value for comparator (0,1,2,3,4) here: %s' % comparator) - comparator = 1 - -# Internal variables -number_re = '([-+]?\d+\.*\d*)' - -# Generate the regular expression -patterns = patterns.replace('', number_re) -patterns = patterns.split("<|>") - -# Make sure file gets closed after being iterated -with open(filename, 'r') as f: - # Read the file contents and generate a list with each line - lines = f.readlines() - -# Iterate each line -for line in lines: - for pattern in patterns: - # Regex applied to each line - match = re.findall(pattern, line) - if match: - if comparator == 0: # <= - res = abs(float(match[0]) - ref_value) / max(abs(ref_value), epsilon) - result = res <= rel_level - print('abs(float(%s) - %d) / max(abs(%d), 1e-9) (=%f) <= %f ==> %s' % (match[0],ref_value,ref_value,res,rel_level,result)) - elif comparator == 1: # < - res = abs(float(match[0]) - ref_value) / max(abs(ref_value), epsilon) - result = res < rel_level - print('abs(float(%s) - %d) / max(abs(%d), 1e-9) (=%f) < %f ==> %s' % (match[0],ref_value,ref_value,res,rel_level,result)) - elif comparator == 2: # = - res = abs(float(match[0]) - ref_value) / max(abs(ref_value), epsilon) - result = res == rel_level - print('abs(float(%s) - %d) / max(abs(%d), 1e-9) (=%f) == %f ==> %s' % (match[0],ref_value,ref_value,res,rel_level,result)) - elif comparator == 3: # > - res = abs(float(match[0]) - ref_value) / max(abs(ref_value), epsilon) - result = res > rel_level - print('abs(float(%s) - %d) / max(abs(%d), 1e-9) (=%f) > %f ==> %s' % (match[0],ref_value,ref_value,res,rel_level,result)) - elif comparator == 4: # >= - res = abs(float(match[0]) - ref_value) / max(abs(ref_value), epsilon) - result = res >= rel_level - print('abs(float(%s) - %d) / max(abs(%d), 1e-9) (=%f) >= %f ==> %s' % (match[0],ref_value,ref_value,res,rel_level,result)) - - if (not result): - print('FAILED') - sys.exit(-1) - else: - print('PASSED') - sys.exit(0) - -print('NOT FOUND') -sys.exit(-1) - diff --git a/recipe/cmake/cmake/uninstall.cmake b/recipe/cmake/cmake/uninstall.cmake deleted file mode 100644 index 8fc7d78..0000000 --- a/recipe/cmake/cmake/uninstall.cmake +++ /dev/null @@ -1,27 +0,0 @@ -message(STATUS "Attempting to create uninstall target for make") - -set(INSTALL_MANIFEST_PATH "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt") - -if (EXISTS ${INSTALL_MANIFEST_PATH}) - message(STATUS "install_manifest.txt found") - - file(STRINGS ${INSTALL_MANIFEST_PATH} FILES_TO_REMOVE) - - foreach(FILE_TO_REMOVE ${FILES_TO_REMOVE}) - if (EXISTS ${FILE_TO_REMOVE}) - exec_program(${CMAKE_COMMAND} ARGS "-E remove \"${FILE_TO_REMOVE}\"" - OUTPUT_VARIABLE STDOUT - RETURN_VALUE EXIT_CODE) - - if (${EXIT_CODE} EQUAL 0) - message(STATUS "Successfully removed file ${FILE_TO_REMOVE}") - else () - message(FATAL_ERROR "Failed to remove file ${FILE_TO_REMOVE} with error code ${EXIT_CODE}") - endif () - else () - message(WARNING "Could not find file ${FILE_TO_REMOVE}") - endif () - endforeach(FILE_TO_REMOVE) -else () - message(FATAL_ERROR "Could not find install manifest at ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\nThis may be because 'make install' has non been run or install_manifest.txt has been deleted") -endif () diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7d02261..3f92e91 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -23,7 +23,7 @@ requirements: - {{ compiler('c') }} - {{ stdlib("c") }} - {{ compiler('cxx') }} - - cmake # [win] + - autotools_clang_conda # [win] - make # [not win] - wget # [not win] - pkg-config @@ -32,7 +32,7 @@ requirements: - liblapack - mumps-seq - libspral # [linux] - - ampl-asl # [not win] + - ampl-asl test: files: diff --git a/recipe/run_test.bat b/recipe/run_test.bat index 7b0ee44..c73a828 100644 --- a/recipe/run_test.bat +++ b/recipe/run_test.bat @@ -7,15 +7,19 @@ if errorlevel 1 exit 1 pkg-config --validate --print-errors --debug ipopt if errorlevel 1 exit 1 +:: Make sure that Windows native find is found before the find in C:\Miniconda\Library\usr\bin\ +set PATH=C:\Windows\System32;%PATH% + +:: Test the ipopt binary +ipopt mytoy.nl | find "Optimal Solution" + +:: Test linking against the ipopt library cd test :: Compile example that links ipopt -cl.exe /EHsc /I%PREFIX%\Library\include\coin-or ipopt-3.lib cpp_example.cpp MyNLP.cpp +cl.exe /EHsc /I%PREFIX%\Library\include\coin-or ipopt.lib cpp_example.cpp MyNLP.cpp if errorlevel 1 exit 1 -:: Make sure that Windows native find is found before the find in C:\Miniconda\Library\usr\bin\ -set PATH=C:\Windows\System32;%PATH% - :: Run example .\cpp_example.exe mumps | find "Optimal Solution" if errorlevel 1 exit 1 From 05d8c6a4f447aa147c09f368487ecfdc4effbb89 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 14 Dec 2024 17:33:03 +0100 Subject: [PATCH 4/7] Do not depend on a fortran compiler on Windows --- recipe/meta.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3f92e91..ad4bf2a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -19,7 +19,10 @@ build: requirements: build: - gnuconfig # [unix] - - {{ compiler('fortran') }} + # Do not depend on a fortran compiler on Windows, + # see https://github.com/conda-forge/ipopt-feedstock/pull/125#issuecomment-2543175086 + # for more details + - {{ compiler('fortran') }} # [not win] - {{ compiler('c') }} - {{ stdlib("c") }} - {{ compiler('cxx') }} @@ -40,7 +43,10 @@ test: - mytoy.nl requires: - - {{ compiler('fortran') }} + # Do not depend on a fortran compiler on Windows, + # see https://github.com/conda-forge/ipopt-feedstock/pull/125#issuecomment-2543175086 + # for more details + - {{ compiler('fortran') }} # [not win] - {{ compiler('c') }} - {{ compiler('cxx') }} - pkg-config From 260cd9826269d725a20973c1b033134cd636eedf Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 16:41:03 +0000 Subject: [PATCH 5/7] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.0, and conda-forge-pinning 2024.12.14.15.32.45 --- .ci_support/win_64_.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 8587391..fef4ef6 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -8,10 +8,6 @@ channel_targets: - conda-forge main cxx_compiler: - vs2019 -fortran_compiler: -- flang -fortran_compiler_version: -- '5' ipopt: - 3.14.16 libblas: From d9ea6a72ffd55c5df2426e436222470339ec68a0 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 16 Dec 2024 13:02:37 +0100 Subject: [PATCH 6/7] Add backward compatibility install file ipopt-3.lib --- recipe/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index f70f157..84ab861 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -60,4 +60,9 @@ if [[ "$target_platform" == "win-64" ]]; then # sipopt.dll.lib mv "${PREFIX}/lib/ipoptamplinterface.dll.lib" "${PREFIX}/lib/ipoptamplinterface.lib" mv "${PREFIX}/lib/sipopt.dll.lib" "${PREFIX}/lib/sipopt.lib" + # While the ipopt.dll.lib library is renamed to ipopt.lib by run_autotools_clang_conda_build, for backward + # compatibility (see https://github.com/conda-forge/ipopt-feedstock/pull/125#issuecomment-2544745043) + # we also want to install ipopt-3.lib that was the import library name used by the Windows package of ipopt in conda-forge < 3.14.17 + du -h "${PREFIX}/lib/ipopt.dll.lib" + cp "${PREFIX}/lib/ipopt.dll.lib" "${PREFIX}/lib/ipopt-3.lib" fi From 65cbdc539f951533737afbc836f5e03796f7ee3c Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 16 Dec 2024 13:05:38 +0100 Subject: [PATCH 7/7] Also test ipopt-3.lib backward compatible import library --- recipe/run_test.bat | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipe/run_test.bat b/recipe/run_test.bat index c73a828..ad39e14 100644 --- a/recipe/run_test.bat +++ b/recipe/run_test.bat @@ -23,3 +23,11 @@ if errorlevel 1 exit 1 :: Run example .\cpp_example.exe mumps | find "Optimal Solution" if errorlevel 1 exit 1 + +:: Compile examples that links the backward-compatibilty import library ipopt-3.lib +:: See https://github.com/conda-forge/ipopt-feedstock/pull/125#issuecomment-2544745043 +del .\cpp_example.exe +cl.exe /EHsc /I%PREFIX%\Library\include\coin-or ipopt-3.lib cpp_example.cpp MyNLP.cpp +if errorlevel 1 exit 1 +.\cpp_example.exe mumps | find "Optimal Solution" +if errorlevel 1 exit 1