File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ if(NOT CMAKE_BUILD_TYPE)
17
17
set (CMAKE_BUILD_TYPE Release )
18
18
endif ()
19
19
20
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
20
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ( UNIX AND NOT APPLE ) )
21
21
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld" )
22
22
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld" )
23
23
endif ()
@@ -67,18 +67,19 @@ function(setup_executable_target target_name)
67
67
endif ()
68
68
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
69
69
target_compile_options (${target_name} PRIVATE -stdlib=libc++ -Wextra-semi-stmt -Wshadow-all )
70
- target_link_options (${target_name} PRIVATE -stdlib=libc++ -fuse-ld=lld )
70
+ target_link_options (${target_name} PRIVATE -stdlib=libc++ )
71
71
if (UNIX AND NOT APPLE )
72
72
target_link_libraries (${target_name} PRIVATE c++ c++abi m )
73
- endif ()
73
+ target_link_options (${target_name} PRIVATE -fuse-ld=lld )
74
+ endif ()
74
75
endif ()
75
76
if (MSVC )
76
77
target_compile_options (${target_name} PRIVATE
77
78
/W4 /permissive /sdl /utf-8 /Za /Zc:__cplusplus /Zc:rvalueCast /Zc:inline
78
79
/Zc:strictStrings /Zc:throwingNew /Zc:referenceBinding /Zc:wchar_t )
79
80
target_link_options (${target_name} PRIVATE
80
81
$< $< OR:$< CONFIG:Release> ,$< CONFIG:MinSizeRel> > :/OPT:REF /OPT:ICF> )
81
- endif ()
82
+ endif ()
82
83
endfunction ()
83
84
84
85
option (BUILD_TESTS "Build tests" ON )
You can’t perform that action at this time.
0 commit comments