More Windows work.
This commit is contained in:
parent
ee373a94d6
commit
1dbbab50a5
|
@ -96,7 +96,17 @@ else()
|
|||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# TODO
|
||||
append2(CMAKE_C_FLAGS CMAKE_CXX_FLAGS
|
||||
"-W4 -wd4100 -bigobj -RTC1 -RTCs -RTCu")
|
||||
|
||||
# shut the compiler up in some cases
|
||||
# LONGTERM still needed?
|
||||
append(CMAKE_CXX_FLAGS " -EHsc")
|
||||
|
||||
append2(CMAKE_SHARED_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS
|
||||
" -largeaddressaware -incremental:no")
|
||||
append(CMAKE_EXE_LINKER_FLAGS
|
||||
" -largeaddressaware -incremental:no")
|
||||
else()
|
||||
append2(CMAKE_C_FLAGS CMAKE_CXX_FLAGS
|
||||
" -Wall -Wextra -pedantic -Wno-unused-parameter -Wno-switch")
|
||||
|
@ -127,6 +137,10 @@ else()
|
|||
# don't amend CMAKE_STATIC_LINKER_FLAGS; that's for ar
|
||||
endif()
|
||||
|
||||
if(NOT _SHARED)
|
||||
append(_LIBUI_CFLAGS " -D_UI_STATIC")
|
||||
endif()
|
||||
|
||||
add_subdirectory("common")
|
||||
add_subdirectory("${_OSDIR}")
|
||||
if(_SHARED)
|
||||
|
@ -164,8 +178,4 @@ set_target_properties(tester PROPERTIES
|
|||
OUTPUT_NAME test
|
||||
WIN32_EXECUTABLE FALSE)
|
||||
|
||||
# the same resources.rc is shared by all the examples
|
||||
if(_RESOURCES_RC)
|
||||
set(_RESOURCES_RC "../${_RESOURCES_RC}")
|
||||
endif()
|
||||
add_subdirectory("examples")
|
||||
|
|
|
@ -27,22 +27,7 @@
|
|||
# TODO /analyze requires us to write annotations everywhere
|
||||
# TODO undecided flags from qo?
|
||||
# -RTCc is not supplied because it's discouraged as of VS2015; see https://www.reddit.com/r/cpp/comments/46mhne/rtcc_rejects_conformant_code_with_visual_c_2015/d06auq5
|
||||
CFLAGS += \
|
||||
-W4 \
|
||||
-wd4100 \
|
||||
-TC \
|
||||
-bigobj -nologo \
|
||||
-RTC1 -RTCs -RTCu
|
||||
|
||||
# TODO prune these
|
||||
# -EHsc is to shut the compiler up in some cases
|
||||
CXXFLAGS += \
|
||||
-W4 \
|
||||
-wd4100 \
|
||||
-TP \
|
||||
-bigobj -nologo \
|
||||
-RTC1 -RTCs -RTCu \
|
||||
-EHsc
|
||||
|
||||
# TODO warnings on undefined symbols
|
||||
LDFLAGS += \
|
||||
|
|
Loading…
Reference in New Issue