-
Notifications
You must be signed in to change notification settings - Fork 156
Declare mockturtle as a SYSTEM library in CMake #437
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
Conversation
…ntic build warnings in any top-level project
Codecov Report
@@ Coverage Diff @@
## master #437 +/- ##
==========================================
- Coverage 79.74% 79.72% -0.03%
==========================================
Files 117 117
Lines 12720 12720
==========================================
- Hits 10144 10141 -3
- Misses 2576 2579 +3
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build 726086384
💛 - Coveralls |
|
I am wondering what prevents you from declaring |
|
I am by no means an expert in CMake, so I just used |
|
Instead of adding the subdirectory, you could just add your own target for However, your request sounds reasonable. I would suggest adding |
|
If I'm not mistaken, they link Examples: mockturtle/examples/CMakeLists.txt Line 6 in 7d0f355
Experiments: mockturtle/experiments/CMakeLists.txt Line 30 in 7d0f355
|
|
Perfect! Thank you. |
Libraries declared as
SYSTEMdo not propagate compiler warnings to top-level projects. Thereby, when usingmockturtleas a library while having a stricter compiler warnings setup, this suppresses warnings originating inmockturtle. Since the test cases now linkPUBLICly, you are still able to see all warnings as before while working onmockturtle. The changes only affect people including it.For more information see, e.g., https://foonathan.net/2018/10/cmake-warnings/
A nice compiler warnings setup can be found in Jason Turner's CPP Starter Project here: https://github.com/lefticus/cpp_starter_project/blob/master/cmake/CompilerWarnings.cmake