Skip to content
Merged
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
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.11)
cmake_minimum_required(VERSION 3.12)

project(SofaPython3)

Expand Down Expand Up @@ -60,6 +60,12 @@ if (NOT SP3_COMPILED_AS_SUBPROJECT)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIBRARY_OUTPUT_DIRECTORY})
endif()

if(MSVC)
# With C++17 (/std:c++17), to get MSVC to behave, you need /permissive-
# see https://github.com/pybind/pybind11/issues/1616
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-")
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down
1 change: 1 addition & 0 deletions bindings/Sofa/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/Types DESTINAT
install(
TARGETS ${PROJECT_NAME}
EXPORT BindingsTargets
RUNTIME DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}
)
1 change: 1 addition & 0 deletions bindings/SofaExporter/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/tests DESTINAT
install(
TARGETS ${PROJECT_NAME}
EXPORT BindingsTargets
RUNTIME DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}
)
2 changes: 1 addition & 1 deletion bindings/SofaGui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.12)
project(Bindings.SofaGui)

set(SOURCE_FILES
Expand Down
1 change: 1 addition & 0 deletions bindings/SofaRuntime/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/tests DESTINAT
install(
TARGETS ${PROJECT_NAME}
EXPORT BindingsTargets
RUNTIME DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}
)
1 change: 1 addition & 0 deletions bindings/SofaTypes/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/pyfiles DESTIN
install(
TARGETS ${PROJECT_NAME}
EXPORT BindingsTargets
RUNTIME DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}
)