forked from ixray-team/ixray-1.6-stcop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclang.cmake
28 lines (23 loc) · 878 Bytes
/
clang.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# General build options
add_compile_options(-Wno-switch -Wno-unused-result)
if (WIN32)
add_compile_options(--Wno-microsoft-template-shadow)
else()
add_compile_options(-fms-extensions -Wno-null-dereference -Wno-nonnull -Wno-format-truncation -Wno-attributes -Wno-format)
endif()
if (NOT WIN32)
find_program(LLD_PROGRAM lld)
if(LLD_PROGRAM)
add_link_options("-fuse-ld=lld")
link_directories(/usr/lib64 /usr/local/lib64)
endif(LLD_PROGRAM)
endif()
# Setup build patches
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<CONFIG>)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<CONFIG>)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<CONFIG>)
# Hack for COPY
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_EX ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# Other
function(target_validate_pch target target_path)
endfunction()