Skip to content

Commit edf38e5

Browse files
ChrisThrashereXpl0it3r
authored andcommitted
Don't over-specify language requirements
Disabling compiler extensions isn't a bad idea because it changes -std=gnu++17 to -std=c++17 and it makes it harder to accidentally use extensions but it's not really particularly helpful given how hard it is to accidentally use compiler extensions. Besides, the CI pipeline already in this project will build with enough compilers to guarantee that compilers extensions are not being used. As for CMAKE_CXX_STANDARD_REQUIRED, this one is overspecifying the requirements. If you request C++17 but only use C++14 features, it's fine if your compiler only supports C++14. It's better to let a compiler attempt to build the project than fail prematurely before even giving it a chance to work.
1 parent 1c91ad3 commit edf38e5

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES})
1010

1111
# CMake SFML Project uses C++17 features
1212
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
13-
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_EXTENSIONS NO CXX_STANDARD_REQUIRED YES)
1413

1514
# Find SFML
1615
find_package(SFML 2.5 COMPONENTS graphics REQUIRED)

0 commit comments

Comments
 (0)