Skip to content
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

Check header for standalone compilation #2043

Merged
merged 13 commits into from Jan 12, 2018

Conversation

Projects
None yet
2 participants
@bilke
Copy link
Member

bilke commented Jan 11, 2018

Added check functionality to compile all headers standalone to check for correct includes.

Usage

$ rm CMakeFiles/CMakeError.log
$ cmake . -DOGS_CHECK_HEADER_COMPILATION=ON
[see CMake output for failing headers]
$ cat CMakeFiles/CMakeError.log # for details what went wrong

OR

make check-header

Status

Top-level libs are checked; no errors on standard config.
Checks are done on Jenkins when ufz/master gets build (Check-Header-job).

@bilke bilke added the WIP 🏗 label Jan 11, 2018

@bilke bilke requested a review from endJunction Jan 11, 2018

@endJunction
Copy link
Member

endJunction left a comment

Nice addition, thanks!

There are some guidelines by John Lakos for large software. One of them is that the header files included in a translation unit must be self sufficient.

@@ -34,3 +34,5 @@ endif()

include(${PROJECT_SOURCE_DIR}/scripts/cmake/packaging/InstallXmlSchemaFiles.cmake)
InstallXmlSchemaFiles("IO/XmlIO/*.xsd")

#check_header_compilation(GeoLib)

This comment has been minimized.

@endJunction

@bilke bilke force-pushed the bilke:check-includes branch 4 times, most recently from 5cb6246 to 03dba42 Jan 12, 2018

bilke added some commits Jan 12, 2018

[CMake] Added target header-check.
- works only on *nix
- is tested on Jenkins in Docker-Conan-Debug job

@bilke bilke force-pushed the bilke:check-includes branch from 79a6782 to 54932f5 Jan 12, 2018

@bilke bilke removed the WIP 🏗 label Jan 12, 2018

@bilke bilke merged commit 637d6c5 into ufz:master Jan 12, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details

@bilke bilke deleted the bilke:check-includes branch Jan 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.