Closed alexreinking closed 2 years ago
Also a question: the examples are compiled with the increased warnings options? I'm asking because apparently some warnings pop out on windows build when you trned on examples build.
I fixed several warnings on windows compilation of the examples. Unfortunately the changes conflict with your PR, but these are easy fixes.
I rebased my PR on the latest master
branch. I have also bumped the CMake version to 3.14 and enabled warnings on the examples. However, there are warnings on G++-10, which causes CI to fail. How would you like to proceed?
I'm preparing a commit to remove the warnings from the ctjs example. You'll rebase on that.
I'm preparing a commit to remove the warnings from the ctjs example. You'll rebase on that.
Sounds good. Ping me when it's ready.
GCC shouldbe fine, unfortunately MSVC gives some ridiculous warnings that some of the difinitions in library hide global ones in the examples, but in fact library is included first. So if I have a definition in some nested namespace called 'number' I cannot have a definition of 'number' in the example. See if you have the same issue on MSVC. If so I can't see any other solution than removing pedantic warnings from examples.
I rebased and now Clang 12 doesn't like an unused variable in ctjs
Made another fix. Sorry.
I think this shadowing warning fom msvc is a comiler bug. This would make sense if I shadowed some library definition by a definition in an example. This is the opposite, definition in library (which is compiler first) shadows a global in later code. Disabling the warning is a good idea.
Fixed the clang warning in custom_lexer.cpp. Please rebase.
Done. Looks like disabling the one warning was sufficient for the examples.
@JPenuchot can you update the AUR package?
Done !
There were a number of issues with the CMake build before. This PR fixes all of them. They are:
BUILD_TESTING
variable wasn't honored.add_subdirectory
users got the project's install rules by default.language
example unnecessarily usedinclude_directories
.#include <ctpg.hpp>
and#include <ctpg/ctpg.hpp>
was inconsistent.ctpg::ctpg
alias for FetchContent andadd_subdirectory
users.Happy to work with you to make these changes more palatable.