Skip to content

Commit

Permalink
Update C++ version and minimum macOS version
Browse files Browse the repository at this point in the history
  • Loading branch information
peastman committed May 23, 2024
1 parent 6f3a150 commit 41090bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SET(CMAKE_PREFIX_PATH "${PYTORCH_DIR}")
FIND_PACKAGE(Torch REQUIRED)

# Specify the C++ version we are building for.
SET (CMAKE_CXX_STANDARD 14)
SET (CMAKE_CXX_STANDARD 17)

# Set flags for linking on mac
IF(APPLE)
Expand Down
6 changes: 3 additions & 3 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
torch_dir, _ = os.path.split('@TORCH_LIBRARY@')

# setup extra compile and link arguments on Mac
extra_compile_args = ['-std=c++14']
extra_compile_args = ['-std=c++17']
extra_link_args = []

if platform.system() == 'Darwin':
extra_compile_args += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
extra_link_args += ['-stdlib=libc++', '-mmacosx-version-min=10.7', '-Wl', '-rpath', openmm_dir+'/lib', '-rpath', torch_dir]
extra_compile_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13']
extra_link_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13', '-Wl', '-rpath', openmm_dir+'/lib', '-rpath', torch_dir]

extension = Extension(name='_openmmtorch',
sources=['TorchPluginWrapper.cpp'],
Expand Down

0 comments on commit 41090bd

Please sign in to comment.