Skip to content

CMake fixes: #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

CMake fixes: #15

wants to merge 2 commits into from

Conversation

bourdin
Copy link

@bourdin bourdin commented Jul 6, 2025

  • Add the option to build static or shared library
  • Fixed make install

   - Add the option to build static or shared library
   - Fixed make install
@bourdin
Copy link
Author

bourdin commented Jul 6, 2025

I am definitely not a cmake expert so I hope that this does not break anything

CMakeLists.txt Outdated
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8)
enable_language(C Fortran)
project(symengine.f90)
set (CMAKE_Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/mod")
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might hardwire this option to always ON. Rather, why not let the user choose at the command line:

cmake -DBUILD_SHARED_LIBS=ON ..

We can document this in README.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we set the default to OFF then? Unless the option is explicitly declared it does not show when using ccmake ..

@certik
Copy link
Contributor

certik commented Jul 7, 2025

Thanks for the PR!

I left some comments. We should also test the make install at our CI.

removed unused statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants