aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-08-04 15:50:31 +0200
committerShauren <shauren.trinity@gmail.com>2020-08-04 15:50:31 +0200
commitc8fed48b161cfff5fa90d8bf4342ede88086ada4 (patch)
tree2f41bb1d87cf133e42097e807ee9679fb751113d /cmake
parentb3db50a3b41b2db209327387f59afa1c40532773 (diff)
Build: Enable /permissive- flag on msvc
Diffstat (limited to 'cmake')
-rw-r--r--cmake/compiler/msvc/settings.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index 1d58f1b2cd3..c822702a6c8 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -21,6 +21,11 @@ target_compile_options(trinity-warning-interface
INTERFACE
/W3)
+# disable permissive mode to make msvc more eager to reject code that other compilers don't already accept
+target_compile_options(trinity-compile-option-interface
+ INTERFACE
+ /permissive-)
+
# set up output paths ofr static libraries etc (commented out - shown here as an example only)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)