Skip to content

Commit

Permalink
C++17
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Feb 23, 2024
1 parent 38c972f commit 5fac818
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ include(init)

project(MP)

# Set the c++11 flag without GNU extensions.
set(CMAKE_CXX_STANDARD 11)
# Set the c++17 flag without GNU extensions.
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand Down Expand Up @@ -258,7 +258,7 @@ function (add_mp_library name)
PUBLIC ${add_mp_library_COMPILE_DEFINITIONS})
target_include_directories(${name}
PUBLIC ${add_mp_library_INCLUDE_DIRECTORIES})
set_property(TARGET ${name} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${name} PROPERTY CXX_STANDARD 17)
if (add_mp_library_DEPENDS)
add_dependencies(${name} ${add_mp_library_DEPENDS})
endif ()
Expand Down
2 changes: 1 addition & 1 deletion nl-writer2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10)
project(NLWriter2)


set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)


Expand Down
2 changes: 1 addition & 1 deletion solvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function(add_ampl_solver name)
if(add_ampl_solver_VERSION)
target_compile_definitions(${static_lib} PUBLIC DRIVER_DATE=${add_ampl_solver_VERSION})
endif()
set_property(TARGET ${static_lib} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${static_lib} PROPERTY CXX_STANDARD 17)
if (use_dll_runtime)
target_link_libraries(${static_lib} PUBLIC mp-dynrt)
else ()
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function(add_mp_test name)
cmake_parse_arguments(add_mp_test "" "" LIBS ${ARGN})
add_executable(${name} ${add_mp_test_UNPARSED_ARGUMENTS})
set_target_properties(${name} PROPERTIES OUTPUT_NAME ${name})
set_property(TARGET ${name} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${name} PROPERTY CXX_STANDARD 17)
if (MINGW)
set_target_properties(${name} PROPERTIES
LINK_FLAGS "-static-libgcc -static-libstdc++")
Expand Down

0 comments on commit 5fac818

Please sign in to comment.