-
Couldn't load subscription status.
- Fork 1.5k
CMake cleanup #7658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
CMake cleanup #7658
Changes from 12 commits
a72f0e8
7536500
9524828
aae3fa0
e5f8f8c
599a54e
74f853f
91afb23
00c462a
0e7f402
ca5c192
be40581
e690613
151d3d0
0276fd8
25d8719
f95486d
5416baa
063a2f8
5a27cca
a4b579d
c645209
b8bd740
f211acd
5c47f9e
8193d33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
|
|
||
| add_library(picojson INTERFACE) | ||
| target_include_directories(picojson SYSTEM INTERFACE .) | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| file(GLOB hdrs "*.h") | ||
| file(GLOB srcs "*.cpp") | ||
|
|
||
| add_library(simplecpp_objs OBJECT ${srcs} ${hdrs}) | ||
| if (BUILD_CORE_DLL) | ||
| target_compile_definitions(simplecpp_objs PRIVATE SIMPLECPP_EXPORT) | ||
| endif() | ||
| add_library(simplecpp ${srcs} ${hdrs}) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be able to become a shared library. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will if we set |
||
| target_dll_compile_definitions(simplecpp EXPORT SIMPLECPP_EXPORT IMPORT SIMPLECPP_IMPORT) | ||
|
|
||
| if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| target_compile_options_safe(simplecpp_objs -Wno-zero-as-null-pointer-constant) | ||
| target_compile_options_safe(simplecpp -Wno-zero-as-null-pointer-constant) | ||
| endif() | ||
|
|
||
| target_include_directories(simplecpp SYSTEM PUBLIC .) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,24 @@ | ||
| file(GLOB hdrs "*.h") | ||
| file(GLOB srcs "*.cpp") | ||
|
|
||
| add_library(tinyxml2_objs OBJECT ${srcs} ${hdrs}) | ||
| if (BUILD_CORE_DLL) | ||
| target_compile_definitions(tinyxml2_objs PRIVATE TINYXML2_EXPORT) | ||
| endif() | ||
| add_library(tinyxml2 ${srcs} ${hdrs}) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be able to become a shared library. |
||
| target_dll_compile_definitions(tinyxml2 EXPORT TINYXML2_EXPORT IMPORT TINYXML2_IMPORT) | ||
|
|
||
| # TODO: needs to be fixed upstream | ||
| if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
| target_compile_options(tinyxml2_objs PRIVATE -Wno-suggest-attribute=format) | ||
| target_compile_options(tinyxml2_objs PRIVATE -Wno-useless-cast) | ||
| target_compile_options(tinyxml2 PRIVATE -Wno-suggest-attribute=format) | ||
| target_compile_options(tinyxml2 PRIVATE -Wno-useless-cast) | ||
| endif() | ||
| if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| target_compile_options_safe(tinyxml2_objs -Wno-implicit-fallthrough) | ||
| target_compile_options_safe(tinyxml2_objs -Wno-suggest-destructor-override) | ||
| target_compile_options_safe(tinyxml2_objs -Wno-zero-as-null-pointer-constant) | ||
| target_compile_options_safe(tinyxml2_objs -Wno-format-nonliteral) | ||
| target_compile_options_safe(tinyxml2_objs -Wno-inconsistent-missing-destructor-override) | ||
| target_compile_options_safe(tinyxml2 -Wno-implicit-fallthrough) | ||
| target_compile_options_safe(tinyxml2 -Wno-suggest-destructor-override) | ||
| target_compile_options_safe(tinyxml2 -Wno-zero-as-null-pointer-constant) | ||
| target_compile_options_safe(tinyxml2 -Wno-format-nonliteral) | ||
| target_compile_options_safe(tinyxml2 -Wno-inconsistent-missing-destructor-override) | ||
| endif() | ||
| if(CYGWIN) | ||
| target_compile_definitions(-D_LARGEFILE_SOURCE) # required for fseeko() and ftello() | ||
| endif() | ||
|
|
||
| target_include_directories(tinyxml2 PUBLIC .) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| file(GLOB hdrs "*.h") | ||
| file(GLOB srcs "*.cpp") | ||
|
|
||
| add_library(frontend_objs OBJECT ${hdrs} ${srcs}) | ||
| target_include_directories(frontend_objs PRIVATE ${PROJECT_SOURCE_DIR}/lib) | ||
| add_library(frontend OBJECT ${hdrs} ${srcs}) | ||
|
||
| target_include_directories(frontend PUBLIC .) | ||
| target_link_libraries(frontend PRIVATE cppcheck-core) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes (among others) in
macos-15builds:Failing builds on warnings is tracked via https://trac.cppcheck.net/ticket/12021.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its needed to fix CI, because they became errors in the CI with these changes. I am not sure why it didnt error out before in the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scope is getting way too big with a lot of questionable sidecar changes. This needs to be fixed more incrementally.
That should not be happening. That indicates that something is wrong in these CMake change.