Skip to content

Commit

Permalink
ENH: Detect/use recommended compiler flags
Browse files Browse the repository at this point in the history
This patch set sets recommended compiler flags based
on detected OS/compiler evironment detection in a consistent
way.

1)----------------
Add file ITKSetStandardCompilerFlags.cmake

Wrote warning flag detection system (adapted by David Cole)
Use the check_compiler_warning_flags
function to determine at CMake time what is the set of common C and C++ compiler
warning flags supported by the current compilers. Add those warning flags to
ITK_REQUIRED_C_FLAGS and ITK_REQUIRED_CXX_FLAGS so they are enabled by default.

2)---------------
Default to CMake 2.8 CheckCXXAcceptsFlags, and removed custom itkCheckCXXAcceptsFlags.cmake version.

Converted to use the default CMake capability (which filter on compiler
options that only give warnings, and removes those also) rather than
the custom code that was only in ITK.

3)---------------
Consolodated ITKPlatformSpecificChecks.cmake consistently into ITKSetStandardCompilerFlags.cmake

Re-writing code in ITKPlatformSpecificChecks.cmake and make a more consistent
set of tools used to identify which compiler options should be used.

Issue-Ids:  ITK-145
Change-Id: Iab95e55064b69f3eee489b65a389a556db8fc65e
  • Loading branch information
hjmjohnson committed Aug 24, 2011
1 parent 3357ae2 commit 8a135bc
Show file tree
Hide file tree
Showing 6 changed files with 270 additions and 227 deletions.
1 change: 1 addition & 0 deletions CMake/CTestCustom.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
".*[/\\\\][Mm]odules[/\\\\][Tt]hird[Pp]arty[/\\\\][Vv][Nn][Ll][/\\\\].*[Ww]arning.*"
".*[/\\\\][Mm]odules[/\\\\][Tt]hird[Pp]arty[/\\\\][Vv][Nn][Ll][Ii]nstantiation[/\\\\].*[Ww]arning.*"
".*[/\\\\][Mm]odules[/\\\\][Tt]hird[Pp]arty[/\\\\][Zz][Ll][Ii][Bb][/\\\\].*[Ww]arning.*"
".*Microsoft.*include.*win.*.h.*[Ww]arning.*"
)

IF(APPLE)
Expand Down
170 changes: 0 additions & 170 deletions CMake/ITKPlatformSpecificChecks.cmake

This file was deleted.

0 comments on commit 8a135bc

Please sign in to comment.