forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee14918
commit 338fbf6
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/cmake/CommonModules/TinyCommon.cmake b/cmake/CommonModules/TinyCommon.cmake | ||
index fd2cfc8a..160cecaa 100644 | ||
--- a/cmake/CommonModules/TinyCommon.cmake | ||
+++ b/cmake/CommonModules/TinyCommon.cmake | ||
@@ -91,7 +91,6 @@ ${TINY_UNPARSED_ARGUMENTS}") | ||
/Zc:__cplusplus | ||
# Standards-conforming behavior | ||
/Zc:strictStrings | ||
- /WX /W4 | ||
$<$<CONFIG:Debug>:/sdl> | ||
) | ||
|
||
@@ -102,7 +101,6 @@ ${TINY_UNPARSED_ARGUMENTS}") | ||
/permissive- | ||
# clang-cl 16 throws -Wunused-command-line-argument, so provide it | ||
# only for the MSVC | ||
- /guard:cf | ||
/bigobj | ||
# Standards-conforming behavior | ||
/Zc:wchar_t,rvalueCast,inline | ||
@@ -117,7 +115,6 @@ ${TINY_UNPARSED_ARGUMENTS}") | ||
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF,ICF=5> | ||
# /OPT:REF,ICF does not support incremental linking | ||
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO> | ||
- /WX | ||
) | ||
endif() | ||
|
||
@@ -135,44 +132,6 @@ ${TINY_UNPARSED_ARGUMENTS}") | ||
) | ||
endif() | ||
|
||
- if(NOT MSVC AND | ||
- (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR | ||
- CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR | ||
- CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
- ) | ||
- target_compile_options(${target} INTERFACE | ||
- # -fexceptions for linux is not needed, it is on by default | ||
- -Wall | ||
- -Wextra | ||
- -Weffc++ | ||
- -Werror | ||
- -Wfatal-errors | ||
- -Wcast-qual | ||
- -Wcast-align | ||
- -Woverloaded-virtual | ||
- -Wold-style-cast | ||
- -Wshadow | ||
- -Wundef | ||
- -Wfloat-equal | ||
- -Wformat-security | ||
- -Wdouble-promotion | ||
- -Wconversion | ||
- -Wzero-as-null-pointer-constant | ||
- -Wuninitialized | ||
- -pedantic | ||
- -pedantic-errors | ||
- # Reduce I/O operations | ||
- -pipe | ||
- ) | ||
- | ||
- # Clang 12 still doesn't support -Wstrict-null-sentinel | ||
- include(CheckCXXCompilerFlag) | ||
- check_cxx_compiler_flag(-Wstrict-null-sentinel SNS_SUPPORT) | ||
- if(SNS_SUPPORT) | ||
- target_compile_options(${target} INTERFACE -Wstrict-null-sentinel) | ||
- endif() | ||
- endif() | ||
- | ||
# Use faster lld linker on Clang (target the Clang except clang-cl with MSVC) | ||
if(NOT MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
target_link_options(${target} INTERFACE -fuse-ld=lld) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters