Skip to content
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

fix: set macos dylib version #1

Open
wants to merge 7 commits into
base: cmake
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ tutorial/finiteT/sus.dat
TAGS

unittest/test.h5

/build
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
cmake_minimum_required(VERSION 3.15)
project(ITensor VERSION 3.1.11 LANGUAGES CXX)
project(ITensor VERSION 3.2.0 LANGUAGES CXX)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
enable_testing()

find_package(LAPACK)
find_package(LAPACK REQUIRED)
find_package(OpenMP)

add_subdirectory(itensor)
Expand Down
6 changes: 6 additions & 0 deletions itensor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
set(${PROJECT_NAME}_COMPAT_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.0)

set(ITENSOR_PLATFORM lapack)
configure_file(config.h.in config.h @ONLY)

add_library(ITensor SHARED)
set_target_properties(ITensor PROPERTIES OUTPUT_NAME itensor)
if(APPLE)
set_target_properties(ITensor PROPERTIES LINK_FLAGS
"-Wl,-compatibility_version,${${PROJECT_NAME}_COMPAT_VERSION} -Wl,-current_version,${${PROJECT_NAME}_VERSION}")
endif()
target_compile_features(ITensor PUBLIC cxx_std_17)
target_sources(ITensor PRIVATE
util/args.cc util/input.cc util/cputime.cc
Expand Down