Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented Jan 4, 2024

No description provided.

project(Cppcheck)
cmake_minimum_required(VERSION 3.5)
if (MSVC)
cmake_minimum_required(VERSION 3.13)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subsequent calls to raise the required version are allowed

endif()

if (CMAKE_VERSION VERSION_LESS "3.9")
message(FATAL_ERROR "Registering tests with CTest requires at least CMake 3.9. Use REGISTER_TESTS=OFF to disable this.")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would have bailed out in the test code later on before. I moved it up so there is not a stray cmake_minimum_required() call somewhere in the code.


include(GNUInstallDirs)

include(cmake/ccache.cmake)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer necessary. Was a work around for CMake 2.8.


include(cmake/cxx11.cmake)
use_cxx11()
set (CMAKE_CXX_STANDARD_REQUIRED ON)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved from cxx11.cmake as it is generic and available now.

@firewave
Copy link
Collaborator Author

firewave commented Jan 4, 2024

Requires #5398 to be merged first.

@firewave firewave marked this pull request as ready for review January 4, 2024 20:33
@firewave firewave marked this pull request as draft January 4, 2024 20:44
@firewave firewave marked this pull request as ready for review January 4, 2024 20:47
Copy link
Owner

@danmar danmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@firewave firewave merged commit 93a53af into danmar:main Jan 5, 2024
@firewave firewave deleted the cmake-3x branch January 5, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants