Try putting gfortran and pthread last.

This commit is contained in:
Ryan Curtin
2022-08-02 09:36:59 -04:00
parent 9a18cd751b
commit 11cbc77cfd
2 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -40,6 +40,5 @@ macro(search_openblas version)
endif()
find_library(GFORTRAN NAMES libgfortran.a)
find_library(PTHREAD NAMES libpthread.a)
set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${GFORTRAN} ${PTHREAD})
message(STATUS "mlpack_libraries: ${MLPACK_LIBRARIES}")
set(CROSS_COMPILE_SUPPORT_LIBRARIES ${GFORTRAN} ${PTHREAD})
endmacro()
+4 -4
View File
@@ -7,8 +7,6 @@ include(CMake/Autodownload.cmake)
include(CMake/ConfigureCrossCompile.cmake)
include(CMake/CheckAtomic.cmake)
message(STATUS "now mlpack_libraries ${MLPACK_LIBRARIES}")
# First, define all the compilation options.
# We default to debugging mode for developers.
option(DEBUG "Compile with debugging information." OFF)
@@ -224,8 +222,6 @@ if (CMAKE_COMPILER_IS_GNUCC)
set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif()
message(STATUS "now 2nd mlpack_libraries ${MLPACK_LIBRARIES}")
# Debugging CFLAGS. Turn optimizations off; turn debugging symbols on.
if (DEBUG)
if (NOT MSVC)
@@ -481,6 +477,10 @@ if (BUILD_CLI_EXECUTABLES AND UNIX)
endif ()
endif ()
# Finally, add any cross-compilation support libraries (they may need to come
# last). If we are not cross-compiling, no changes will happen here.
set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${CROSS_COMPILE_SUPPORT_LIBRARIES})
# Recurse into the rest of the project.
add_subdirectory(src/mlpack)