Skip to content

Commit

Permalink
Default to C++14
Browse files Browse the repository at this point in the history
Updates ITKMontage to match the ITK default C++14 standard (see [https://github.com/InsightSoftwareConsortium/ITK/blob/master/CMake/ITKInitializeCXXStandard.cmake#L3](https://github.com/InsightSoftwareConsortium/ITK/blob/master/CMake/ITKInitializeCXXStandard.cmake#L3)). 

Attempting to build ITKMontage with the C++11 standard against an ITK instance built against the C++14 default standard yields a warning and subsequent errors:
```sh
ITK-build-dev/Modules/Core/Common/itkConfigure.h:56:6: warning: #warning "WARNING:  The current project is configured to use a C++ standard version older than the C++ standard used for this build of ITK" [-Wcpp]
   56 |     #warning "WARNING:  The current project is configured to use a C++ standard version older than the C++ standard used for this build of ITK"
      |      ^~~~~~~
```
  • Loading branch information
tbirdso authored and hjmjohnson committed Dec 17, 2021
1 parent c5f9214 commit 2ed2198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(CMAKE_CXX_STANDARD EQUAL "98" )
endif()

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11) # Supported values are ``11``, ``14``, and ``17``.
set(CMAKE_CXX_STANDARD 14) # Supported values are ``11``, ``14``, and ``17``.
endif()
if(NOT CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down

0 comments on commit 2ed2198

Please sign in to comment.