Skip to content

Commit

Permalink
Add correct std to setup.py too
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulPPelaez committed Nov 14, 2023
1 parent 6cbc78d commit d26f945
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ add_custom_command(
add_custom_target(PythonInstall DEPENDS "${WRAP_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/setup.py")
set(NN_PLUGIN_HEADER_DIR "${CMAKE_SOURCE_DIR}/openmmapi/include")
set(NN_PLUGIN_LIBRARY_DIR "${CMAKE_BINARY_DIR}")
set(EXTENSION_CXX_STANDARD ${CMAKE_CXX_STANDARD})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py ${CMAKE_CURRENT_BINARY_DIR}/setup.py)
add_custom_command(TARGET PythonInstall
COMMAND "${PYTHON_EXECUTABLE}" -m pip install .
Expand Down
3 changes: 2 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
torch_include_dirs = '@TORCH_INCLUDE_DIRS@'.split(';')
nn_plugin_header_dir = '@NN_PLUGIN_HEADER_DIR@'
nn_plugin_library_dir = '@NN_PLUGIN_LIBRARY_DIR@'
cpp_std = '@EXTENSION_CXX_STANDARD@'
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++' + cpp_std]
extra_link_args = []

if platform.system() == 'Darwin':
Expand Down

0 comments on commit d26f945

Please sign in to comment.