diff options
author | Jeremy Hayes <jeremy@lunarg.com> | 2018-10-29 13:56:59 -0600 |
---|---|---|
committer | Jeremy Hayes <jeremy-lunarg@users.noreply.github.com> | 2018-10-30 15:44:52 -0600 |
commit | bc4b9f44103045044ab90fe16edaa21b300f1c38 (patch) | |
tree | 76439e477e25f1b96c777d6788b77acdb3a3d121 | |
parent | a8899f16fac38176e9a4dd359b27e2ccbf27b0a5 (diff) | |
download | Vulkan-Loader-bc4b9f44103045044ab90fe16edaa21b300f1c38.tar.gz Vulkan-Loader-bc4b9f44103045044ab90fe16edaa21b300f1c38.tar.bz2 Vulkan-Loader-bc4b9f44103045044ab90fe16edaa21b300f1c38.zip |
Revert "build: Fix ninja on windows build"
This reverts commit 41e6a818ff70370cf4d190d9141ee3caecf01806.
Change-Id: I48f98533126354a8c310aca7dfb321c560873955
-rw-r--r-- | CMakeLists.txt | 14 | ||||
-rw-r--r-- | loader/CMakeLists.txt | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index eee5ca88..fd160d00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,18 +139,18 @@ endif() if(MSVC) # Treat warnings as errors - add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/WX>) + add_compile_options("/WX") # Disable RTTI - add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/GR->) + add_compile_options("/GR-") # Warn about nested declarations - add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/w34456>) + add_compile_options("/w34456") # Warn about potentially uninitialized variables - add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/w34701>) - add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/w34703>) + add_compile_options("/w34701") + add_compile_options("/w34703") # Warn about different indirection types. - add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/w34057>) + add_compile_options("/w34057") # Warn about signed/unsigned mismatch. - add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/w34245>) + add_compile_options("/w34245") endif() # Define a macro to generate source code from vk.xml diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 2c7e0ce8..75d587bc 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -28,7 +28,7 @@ if(WIN32) if(MSVC AND NOT MSVC_VERSION LESS 1900) # Enable control flow guard message(STATUS "Building loader with control flow guard") - add_compile_options($<$<COMPILE_LANGUAGE:C>:/guard:cf>) + add_compile_options("/guard:cf") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf") endif() @@ -171,11 +171,11 @@ if(WIN32) add_library(loader-norm OBJECT ${NORMAL_LOADER_SRCS} dirent_on_windows.c) add_dependencies(loader-norm generate_helper_files loader_gen_files) - target_compile_options(loader-norm PUBLIC "$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANGUAGE:C>>:${LOCAL_C_FLAGS_DBG}>") + target_compile_options(loader-norm PUBLIC "$<$<CONFIG:DEBUG>:${LOCAL_C_FLAGS_DBG}>") add_library(loader-opt OBJECT ${OPT_LOADER_SRCS}) add_dependencies(loader-opt generate_helper_files loader_gen_files loader_asm_gen_files) - target_compile_options(loader-opt PUBLIC "$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANGUAGE:C>>:${LOCAL_C_FLAGS_REL}>") + target_compile_options(loader-opt PUBLIC "$<$<CONFIG:DEBUG>:${LOCAL_C_FLAGS_REL}>") if(NOT ENABLE_STATIC_LOADER) target_compile_definitions(loader-norm PUBLIC LOADER_DYNAMIC_LIB) |