File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,6 @@ include_guard(GLOBAL)
6
6
include (CheckCXXSourceCompiles )
7
7
include (CMakePushCheckState )
8
8
9
- # This avoids running the linker.
10
- set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY )
11
-
12
- macro (check_cxx_source_links source )
13
- set (CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE )
14
- check_cxx_source_compiles ("${source} " ${ARGN} )
15
- set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY )
16
- endmacro ()
17
-
18
9
macro (check_cxx_source_compiles_with_flags flags source )
19
10
cmake_push_check_state (RESET )
20
11
set (CMAKE_REQUIRED_FLAGS ${flags} )
@@ -27,13 +18,13 @@ macro(check_cxx_source_links_with_flags flags source)
27
18
cmake_push_check_state (RESET )
28
19
set (CMAKE_REQUIRED_FLAGS ${flags} )
29
20
list (JOIN CMAKE_REQUIRED_FLAGS " " CMAKE_REQUIRED_FLAGS )
30
- check_cxx_source_links ("${source} " ${ARGN} )
21
+ check_cxx_source_compiles ("${source} " ${ARGN} )
31
22
cmake_pop_check_state ()
32
23
endmacro ()
33
24
34
25
macro (check_cxx_source_links_with_libs libs source )
35
26
cmake_push_check_state (RESET )
36
27
set (CMAKE_REQUIRED_LIBRARIES "${libs} " )
37
- check_cxx_source_links ("${source} " ${ARGN} )
28
+ check_cxx_source_compiles ("${source} " ${ARGN} )
38
29
cmake_pop_check_state ()
39
30
endmacro ()
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function(test_append_socket_library target)
26
26
" )
27
27
28
28
include (CheckSourceCompilesAndLinks )
29
- check_cxx_source_links ("${check_socket_source} " IFADDR_LINKS_WITHOUT_LIBSOCKET )
29
+ check_cxx_source_compiles ("${check_socket_source} " IFADDR_LINKS_WITHOUT_LIBSOCKET )
30
30
if (NOT IFADDR_LINKS_WITHOUT_LIBSOCKET )
31
31
check_cxx_source_links_with_libs (socket "${check_socket_source} " IFADDR_NEEDS_LINK_TO_LIBSOCKET )
32
32
if (IFADDR_NEEDS_LINK_TO_LIBSOCKET )
@@ -78,7 +78,7 @@ function(test_append_atomic_library target)
78
78
" )
79
79
80
80
include (CheckSourceCompilesAndLinks )
81
- check_cxx_source_links ("${check_atomic_source} " STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC )
81
+ check_cxx_source_compiles ("${check_atomic_source} " STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC )
82
82
if (STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC )
83
83
return ()
84
84
endif ()
You can’t perform that action at this time.
0 commit comments