Add some more Windows build tweaks.

This enables building on Windows with Ninja.
main
David Chisnall 8 years ago
parent d0c3fe5323
commit 0da21d5064

@ -6,7 +6,7 @@
# On Windows, CMake adds /TC to the clang-cl flags and doesn't provide a way to # On Windows, CMake adds /TC to the clang-cl flags and doesn't provide a way to
# tell it not to. We fix this by telling clang do disregard that option, # tell it not to. We fix this by telling clang do disregard that option,
# unconditionally (which means that it still defaults to C for .c files). # unconditionally (which means that it still defaults to C for .c files).
set(ENV{CCC_OVERRIDE_OPTIONS} "x/TC x/TP") set(ENV{CCC_OVERRIDE_OPTIONS} "x/TC x/TP x-TC x-TP")
set(INCREMENTAL " ") set(INCREMENTAL " ")
if (MSVC) if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS "/DEBUG /INCREMENTAL:NO ${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "/DEBUG /INCREMENTAL:NO ${CMAKE_EXE_LINKER_FLAGS}")
@ -98,7 +98,7 @@ function(addtest_flags TEST_NAME FLAGS TEST_SOURCE)
set(ARC "") set(ARC "")
set_target_properties(${TEST_NAME} PROPERTIES set_target_properties(${TEST_NAME} PROPERTIES
INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}" INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}"
COMPILE_FLAGS "-Xclang -fblocks ${FLAGS}" COMPILE_FLAGS "-Xclang -fblocks -Xclang -fobjc-exceptions ${FLAGS}"
LINK_FLAGS ${INCREMENTAL} LINK_FLAGS ${INCREMENTAL}
LINKER_LANGUAGE C LINKER_LANGUAGE C
) )

Loading…
Cancel
Save