mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 00:23:10 +00:00
[CMAKE] Get rid of add_compile_flags
Use add_compile_options and the like instead
This commit is contained in:
parent
84621b3634
commit
00ed72d7e8
26 changed files with 158 additions and 198 deletions
|
@ -1,13 +1,6 @@
|
|||
|
||||
include_directories(include/internal/mingw-w64)
|
||||
|
||||
if(NOT MSVC)
|
||||
add_compile_flags("-Wno-main")
|
||||
if(LTCG)
|
||||
add_compile_flags("-fno-lto")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND MSVCRTEX_SOURCE
|
||||
startup/crtexe.c
|
||||
startup/wcrtexe.c
|
||||
|
@ -102,11 +95,19 @@ add_asm_files(msvcrtex_asm ${MSVCRTEX_ASM_SOURCE})
|
|||
|
||||
add_library(msvcrtex ${MSVCRTEX_SOURCE} ${msvcrtex_asm})
|
||||
target_compile_definitions(msvcrtex PRIVATE _DLL _MSVCRTEX_)
|
||||
|
||||
if ((NOT MSVC) OR USE_CLANG_CL)
|
||||
target_compile_options(msvcrtex PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-main>)
|
||||
if (LTCG)
|
||||
target_compile_options(msvcrtex PRIVATE -fno-lto)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_source_files_properties(startup/crtdll.c PROPERTIES COMPILE_DEFINITIONS CRTDLL)
|
||||
set_source_files_properties(startup/crtexe.c
|
||||
startup/wcrtexe.c PROPERTIES COMPILE_DEFINITIONS _M_CEE_PURE)
|
||||
|
||||
if(NOT MSVC)
|
||||
if (NOT MSVC)
|
||||
target_link_libraries(msvcrtex oldnames)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue