diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 6d43bb58b8f..e79b3264f7a 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -143,6 +143,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release -DBUILD_NATIVE=OFF \ -DCMAKE_PREFIX_PATH="`brew --prefix`;`brew --prefix libffi`" \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=ON \ --debug-trycompile - name: Build libraries using Ninja diff --git a/.gitmodules b/.gitmodules index f0933ad93be..4f8e9b10199 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "M2/submodules/memtailor"] path = M2/submodules/memtailor - url = https://github.com/Macaulay2/memtailor + url = https://github.com/passagemath/upstream-memtailor [submodule "M2/submodules/mathic"] path = M2/submodules/mathic - url = https://github.com/Macaulay2/mathic + url = https://github.com/passagemath/upstream-mathic [submodule "M2/submodules/mathicgb"] path = M2/submodules/mathicgb - url = https://github.com/Macaulay2/mathicgb + url = https://github.com/passagemath/upstream-mathicgb [submodule "M2/submodules/bdwgc"] path = M2/submodules/bdwgc url = https://github.com/ivmai/bdwgc.git diff --git a/M2/Macaulay2/CMakeLists.txt b/M2/Macaulay2/CMakeLists.txt index bf199311246..e0bbc2d262e 100644 --- a/M2/Macaulay2/CMakeLists.txt +++ b/M2/Macaulay2/CMakeLists.txt @@ -19,7 +19,6 @@ file(STRINGS "packages/\=distributed-packages" DISTRIBUTED_PACKAGES REGEX "^[a-z list(JOIN DISTRIBUTED_PACKAGES " " DISTRIBUTED_PACKAGES) # This tells CMake how to set the RPATH on the installed executable -set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/Macaulay2/lib) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # Add extra compiler warning flags for Macaulay2 diff --git a/M2/Macaulay2/e/CMakeLists.txt b/M2/Macaulay2/e/CMakeLists.txt index f9f8907d91e..b64f526341f 100644 --- a/M2/Macaulay2/e/CMakeLists.txt +++ b/M2/Macaulay2/e/CMakeLists.txt @@ -357,9 +357,8 @@ endif() ## Compile the engine # TODO: enable INTERPROCEDURAL_OPTIMIZATION? -# TODO: remove STATIC once M2-engine can be used independently, then we can -# set -DBUILD_SHARED_LIBS=ON to generate a shared library -add_library(M2-engine STATIC ${SOURCES} ${HEADERS} ${TAGS}) +# Set -DBUILD_SHARED_LIBS=ON to generate a shared library +add_library(M2-engine ${SOURCES} ${HEADERS} ${TAGS}) # TODO: Which headers should be included in the development build? set_target_properties(M2-engine PROPERTIES PUBLIC_HEADER "${HEADERS}") @@ -369,7 +368,7 @@ target_include_directories(M2-engine PUBLIC $) # TODO: make engine independent of interpreter headers -target_link_libraries(M2-engine PUBLIC memtailor mathic mathicgb) +target_link_libraries(M2-engine PUBLIC memtailor mathic mathicgb M2-supervisor) if(EIGEN3_FOUND) target_link_libraries(M2-engine PUBLIC Eigen3::Eigen) @@ -417,9 +416,8 @@ target_compile_options(M2-engine PRIVATE ############################################################################### ## Export the target -# TODO: change ARCHIVE to LIBRARY once M2-engine can be used independently install(TARGETS M2-engine mathicgb mathic memtailor EXPORT Macaulay2 - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/Macaulay2/lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel EXCLUDE_FROM_ALL PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Macaulay2 COMPONENT devel EXCLUDE_FROM_ALL) diff --git a/M2/Macaulay2/system/CMakeLists.txt b/M2/Macaulay2/system/CMakeLists.txt index 34f9323f290..cbff0fe7db7 100644 --- a/M2/Macaulay2/system/CMakeLists.txt +++ b/M2/Macaulay2/system/CMakeLists.txt @@ -3,7 +3,7 @@ ## entity responsible for managing Macaulay2 threads. # TODO: m2util.hpp is not used -add_library(M2-supervisor OBJECT +add_library(M2-supervisor supervisorinterface.h supervisor.hpp supervisor.cpp # used .. a lot m2fileinterface.h m2file.hpp m2file.cpp # used by stdio.d pthread-methods.hpp # used by m2file diff --git a/M2/submodules/mathic b/M2/submodules/mathic index 08b3c715c12..a6358bd7f89 160000 --- a/M2/submodules/mathic +++ b/M2/submodules/mathic @@ -1 +1 @@ -Subproject commit 08b3c715c12d6e3a4d6b596e3fa1d49a9ee77c40 +Subproject commit a6358bd7f893197064a1dbf1f7cf3e0615726011 diff --git a/M2/submodules/mathicgb b/M2/submodules/mathicgb index fb6af156edc..030925489ad 160000 --- a/M2/submodules/mathicgb +++ b/M2/submodules/mathicgb @@ -1 +1 @@ -Subproject commit fb6af156edc37c0563f0d98993496e43620a3f17 +Subproject commit 030925489ad30be95823045136c6487401593b99 diff --git a/M2/submodules/memtailor b/M2/submodules/memtailor index c7ef44a5792..1997ebc29cc 160000 --- a/M2/submodules/memtailor +++ b/M2/submodules/memtailor @@ -1 +1 @@ -Subproject commit c7ef44a5792631f5c7da200a7a2b06e053026efc +Subproject commit 1997ebc29cc2014dfa394e4f9255d815df734263