forked from InsightSoftwareConsortium/ITK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathITK_CheckCCompilerFlag.cmake
30 lines (27 loc) · 1.21 KB
/
ITK_CheckCCompilerFlag.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# - Check whether the C compiler supports a given flag.
# CHECK_C_COMPILER_FLAG(<flag> <var>)
# <flag> - the compiler flag
# <var> - variable to store the result
# This internally calls the check_c_source_compiles macro.
# See help for CheckCSourceCompiles for a listing of variables
# that can modify the build.
#=============================================================================
# Copyright 2006-2010 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <[email protected]>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
include(CheckCSourceCompiles)
macro(ITK_CHECK_C_COMPILER_FLAG _FLAG _RESULT)
if(ITK_LEGACY_REMOVE)
message(FATAL_ERROR "REPLACE ITK_CHECK_C_COMPILER_FLAG with check_c_compiler_flag")
endif()
check_c_compiler_flag(${_FLAG} ${_RESULT})
endmacro()