]> granicus.if.org Git - curl/commit
cmake: avoid linking executable for some tests with cmake 3.6+
authorJakub Zakrzewski <slither.jz@gmail.com>
Sun, 7 Apr 2019 10:43:38 +0000 (12:43 +0200)
committerJakub Zakrzewski <slither.jz@gmail.com>
Wed, 10 Apr 2019 17:12:28 +0000 (19:12 +0200)
commitbe17f298ff508d62d493d4a8d43e56a1e2861a50
tree827ce8d6f32fb7359dbfc2bf6245cb3a15724fb2
parent639cfeb0f8f0f869d9cdd3756f72935f382b179a
cmake: avoid linking executable for some tests with cmake 3.6+

With CMAKE_TRY_COMPILE_TARGET_TYPE set to STATIC_LIBRARY, the try_compile()
(which is used by check_c_source_compiles()) will build static library
instead of executable. This avoids linking additional libraries in and thus
speeds up those checks a little.

This commit also avoids #3743 (GSSAPI build errors) on itself with cmake
3.6 or above. That issue was fixed separately for all versions.

Ref: #3744
CMake/OtherTests.cmake