浏览代码

Document Check(C|CXX)SourceCompiles behavior more clearly (#11688)

Explicitly state up front that the macros try to link an executable and
that the source provided must define 'main'.
Brad King 15 年之前
父节点
当前提交
cabb6cd00e
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      Modules/CheckCSourceCompiles.cmake
  2. 2 2
      Modules/CheckCXXSourceCompiles.cmake

+ 2 - 2
Modules/CheckCSourceCompiles.cmake

@@ -1,6 +1,6 @@
-# - Check if the given C source code compiles.
+# - Check if given C source compiles and links into an executable
 # CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-#  <code>       - source code to try to compile
+#  <code>       - source code to try to compile, must define 'main'
 #  <var>        - variable to store whether the source code compiled
 #  <fail-regex> - fail if test output matches this regex
 # The following variables may be set before calling this macro to

+ 2 - 2
Modules/CheckCXXSourceCompiles.cmake

@@ -1,6 +1,6 @@
-# - Check if the given C++ source code compiles.
+# - Check if given C++ source compiles and links into an executable
 # CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-#  <code>       - source code to try to compile
+#  <code>       - source code to try to compile, must define 'main'
 #  <var>        - variable to store whether the source code compiled
 #  <fail-regex> - fail if test output matches this regex
 # The following variables may be set before calling this macro to