]> granicus.if.org Git - json-c/commitdiff
Set cmake policy CMP0075, to have check_include_file use the value of CMAKE_REQUIRED_...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Fri, 6 Dec 2019 05:15:14 +0000 (00:15 -0500)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Fri, 6 Dec 2019 05:15:14 +0000 (00:15 -0500)
CMakeLists.txt

index 569462f031b51f9b7dd1197a9c49ee480b9c4d47..0008cbbe9f6ec90bdefcced02d836daca7111af2 100644 (file)
@@ -19,6 +19,12 @@ if(POLICY CMP0054)
     cmake_policy(SET CMP0054 NEW)
 endif()
 
+# Include file check macros honor CMAKE_REQUIRED_LIBRARIES
+# i.e. the check_include_file() calls will include -lm when checking.
+if(POLICY CMP0075)
+       cmake_policy(SET CMP0075 NEW)
+endif()
+
 include(CTest)
 
 if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND