Adjustments to CMake Building#1925
Adjustments to CMake Building#1925danmar merged 1 commit intocppcheck-opensource:masterfrom scottfurry:CMakeChanges
Conversation
From CMake Docs( https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html ), BUILD_SHARED_LIBS may not be defined. This can result in printinfo.cmake outputing variable without a value. A conditional is applied to ensure that some output is provided to the user should variable not be defined. Removed explicit C++ standard flag. Any setting user would add on the command line would be replaced due to ordering. `-std=c++0x` would be last value added to CMAKE_CXX_FLAGS and ultimately the one used by the compiler.
ok.. how can it be provided by user if needed? I assume that is needed if an old gcc is used. |
|
Two ways:
or 2) There is the |
|
ok thanks. I added some cmake instructions to the readme with the commit fef7bc5. Feel free to review that. |
|
Project CMake specify minimum required version as 2.8.11. Hopefully people are at least updated to 3.x series and can use the flag identified. Again, alternative is to Project Qt I think changes should cover most usage. |
From CMake Docs( https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html ), BUILD_SHARED_LIBS may not be defined. This can result in printinfo.cmake outputing variable without a value. A conditional is applied to ensure that some output is provided to the user should variable not be defined. Removed explicit C++ standard flag. Any setting user would add on the command line would be replaced due to ordering. `-std=c++0x` would be last value added to CMAKE_CXX_FLAGS and ultimately the one used by the compiler.
From CMake Docs( https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html ),
BUILD_SHARED_LIBS may not be defined. This can result in printinfo.cmake outputing
variable without a value. A conditional is applied to ensure that some output is
provided to the user should variable not be defined.
Removed explicit C++ standard flag. Any setting user would add on the command
line would be replaced due to ordering.
-std=c++0xwould be last value addedto CMAKE_CXX_FLAGS and ultimately the one used by the compiler.