Skip to content

Commit

Permalink
Update CXX compiler from 14 to 17
Browse files Browse the repository at this point in the history
Similar to #678
  • Loading branch information
malfet committed Nov 10, 2023
1 parent c67bbab commit f0d6fc9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cpp/autograd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.1)

project(autograd)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)

find_package(Torch REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion cpp/dcgan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()

add_executable(dcgan dcgan.cpp)
target_link_libraries(dcgan "${TORCH_LIBRARIES}")
set_property(TARGET dcgan PROPERTY CXX_STANDARD 14)
set_property(TARGET dcgan PROPERTY CXX_STANDARD 17)

if (MSVC)
file(GLOB TORCH_DLLS "${TORCH_INSTALL_PREFIX}/lib/*.dll")
Expand Down
2 changes: 1 addition & 1 deletion cpp/mnist/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(mnist)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)

find_package(Torch REQUIRED)

Expand Down
4 changes: 2 additions & 2 deletions cpp/regression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.1)

project(regression)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)

find_package(Torch REQUIRED)

Expand Down
4 changes: 2 additions & 2 deletions cpp/transfer-learning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ target_link_libraries(example "${TORCH_LIBRARIES}")
target_link_libraries(classify ${OpenCV_LIBS})
target_link_libraries(classify "${TORCH_LIBRARIES}")

set_property(TARGET classify PROPERTY CXX_STANDARD 14)
set_property(TARGET example PROPERTY CXX_STANDARD 14)
set_property(TARGET classify PROPERTY CXX_STANDARD 17)
set_property(TARGET example PROPERTY CXX_STANDARD 17)
2 changes: 1 addition & 1 deletion fx/native_interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ find_package(Torch REQUIRED)

# Define our library target
add_library(interpreter SHARED interpreter.cpp)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
# Link against LibTorch
target_link_libraries(interpreter "${TORCH_LIBRARIES}")

0 comments on commit f0d6fc9

Please sign in to comment.