Commit Graph

79 Commits

Author SHA1 Message Date
Timo Kreuzer
dc0433f02a [SDK] Add some missing headers 2024-11-04 08:42:34 +02:00
Timo Kreuzer
84344399b5 [VCRUNTIME] Move compiler runtime headers into their own folder
These headers come with the MS compiler. Some of them are standard, like emmintrin.h, others are MS specific like crtdefs.h
This separation will allow using MS CRT headers. Eventually it can allow compiling with the compilers' runtime headers.
2024-11-02 12:52:59 +02:00
Justin Miller
690783179e [SDK][WIN32SS] Make Them Build 2024-10-19 13:45:59 -07:00
Timo Kreuzer
9cc4d8994b [CMAKE] Use baseaddress64.cmake for all 64 bit builds
- Rename baseaddress_msvc_x64.cmake to baseaddress64.cmake
- Include it for all compilers and 64 bit architectures
2023-11-10 19:20:24 +02:00
Timo Kreuzer
3c2bfb570f [CMAKE] Add DLL_EXPORT_VERSION config option
Set this to e.g. 0x600 to build with Vista exports
2023-08-11 19:00:42 +03:00
Mark Jansen
a09d5bae0f
[LOG2LINES] Compile the tool for MSVC builds 2022-12-29 16:51:40 +01:00
Timo Kreuzer
61cc62d1b2 [ASMPP] Implement asm preprocessor
This converts ML style assembly to GAS compatible syntax
2022-12-01 15:21:59 +02:00
Hervé Poussineau
b6d7571ebb [CMAKE] Set KDBG define only where required (fastfat, win32k, ntoskrnl) 2022-09-10 23:16:27 +02:00
Hervé Poussineau
9e19352492 [CMAKE] Set _WINKD_ define only where required (kernel and setuplib) 2022-09-10 23:16:26 +02:00
Victor Perevertkin
a5a6101ca0
[CMAKE] Fix buildbot builders 2022-05-27 01:48:52 +03:00
Victor Perevertkin
447ef2aa4a
[CMAKE] Do not use USE_CLANG_CL variable in CMake scripts 2022-05-27 01:37:37 +03:00
Victor Perevertkin
f155b9377f
[CMAKE] Elimitate the use of GCC and CLANG variables 2022-05-27 01:37:34 +03:00
Justin Miller
2204695f0a
[SDK] Fix some arm64 stuff that was discovered during testing
Addendum to 6dfc13e4. CORE-17518
2022-04-07 19:50:43 +03:00
Mark Jansen
f1132155d9
[SDK][CRT] Add _CRT_NON_CONFORMING_SWPRINTFS support
This allows us to easier port wine changes, where swprintf with a size is used a lot
2022-03-20 19:28:22 +01:00
Victor Perevertkin
8ca4b0f257
[CMAKE] Remove __inline substitutions
All supported compilers can do C99 now, this is not needed anymore.
2021-10-26 22:51:03 +03:00
Justin Miller
be223b9de7
[SDK] Allow ARM64 MSVC to complete configuration (#4045)
- Add some of the missing CMake adjustments to continue the configure and compile process with ARM64 MSVC
- Created quick stubs for the functions in SDK needed to finish the configuration process
- Put in an ARM64 option for spec2def

CORE-17518 CORE-17615
2021-10-22 18:52:32 +03:00
Serge Gautherie
e4feaa1a69 [CMAKE] CMakeLists.txt: Add arm64 to ARCH allowed values
CORE-17518
2021-10-11 15:20:34 +03:00
Serge Gautherie
7e43c2610d [CMAKE] CMakeLists.txt: Fix 'omap-zoom2' typo
Addendum to fae2044 (r51783).
CORE-17604
2021-06-02 13:24:39 +03:00
Serge Gautherie
2dcc40fb3e [CMAKE] CMakeLists.txt: Remove NO_UNDERSCORE_PREFIX leftovers
And switch to add_compile_definitions().

Addendum to 9efafd6.
2021-06-02 10:04:21 +02:00
Mark Jansen
18e95f5a4e
[CMAKE] Store and re-use M4 and BISON_PKGDATADIR env variables
ROSBE-174
2021-05-22 16:38:17 +02:00
Serge Gautherie
b62f0d0fa3 [CMAKE] CMakeLists.txt: Print CMAKE_CONFIGURATION_TYPES
Follow-up to d10728a.
2021-05-06 16:13:05 +02:00
Jérôme Gardou
4ae4590b66 [CMAKE] Do not define _M_AMD64 when using amd64 clang-cl 2021-05-03 22:00:57 +02:00
Victor Perevertkin
d10728a645
[CMAKE] Rely less on CMAKE_BUILD_TYPE variable
Having conditional statements with CMAKE_BUILD_TYPE is an antipattern
See https://stackoverflow.com/questions/66079007/having-conditional-statements-on-build-type-variable-a-good-design

We use both single- and multi-config generators (Ninja and VS), so we
can't really rely on CMAKE_BUILD_TYPE, because it's not always set.

This commit alters some conditional flags to use <$CONFIG:...>
generator expression, but is still not complete. Also, our default
optimization level (4) now has what was always a de-facto flags
2021-04-15 06:44:56 +03:00
Victor Perevertkin
f0b53998c8
[CMAKE] Require ARCH variable to be specified explicitly
Also, use CMAKE_TRY_COMPILE_PLATFORM_VARIABLES in toolchain files
to solve issues with ARCH not being passed during try_compile
2021-04-15 06:44:55 +03:00
Victor Perevertkin
72ad37c1cd
[CMAKE] Unify configs for architectures
config*.cmake files are constantly getting out of sync between
each other. Besides that, the parameters are not really dependent
on a target architecture, but rather on a compiler (except *ARCH)

This approach seems to be more future-prone, and allows to see
all the options in one file (there are really not that many of them)
2021-04-15 06:44:52 +03:00
Jérôme Gardou
5d1ecc7575 [CMAKE] Define _SBCS when using VS generator
CORE-17423
2021-03-03 08:34:32 +01:00
Jérôme Gardou
49000c6471 [CMAKE] Disable policy CMP0091 and set /MT flag explicitly for Visual Studio generator 2021-03-03 08:34:32 +01:00
Jérôme Gardou
c68739e566 [CMAKE] Preprocess the ASM files but let msbuild handle their actual compilation
CORE-17423
2021-03-03 08:34:32 +01:00
Jérôme Gardou
41130ab5c6 [CMAKE] Use ASM_MASM language when building with MSVC toolchain
CORE-17423
2021-03-03 08:34:32 +01:00
Victor Perevertkin
5375e33490
[CMAKE] Generate Flex and Bison files at build time
We have Flex and Bison distributed along with RosBE 2.2 so this should
not be a problem
2021-01-28 06:43:05 +03:00
Hervé Poussineau
19779b3f96 [CMAKE] Our C code base is C99, so mark it as such.
This fixes 64211aa696, which mistakenly declared C11 as default.
2020-12-01 20:42:41 +01:00
Hervé Poussineau
64211aa696 [CMAKE] Declare that we want to use C11/C++11
That way, we won't use whatever standard is the default on whatever compiler we are using.
This should also prevent using more recent features without warning.
2020-12-01 18:51:42 +01:00
Jérôme Gardou
edc1f3ca56 [CMAKE] Fix use of CLang
- Updated toolchain file
 - set GCC variable when using CLang in "GCC mode"
 - Properly retrieve GCC support libraries
 - Various flags needed to get this going
2020-11-16 16:58:10 +01:00
Jérôme Gardou
bf04126e02 |CMAKE] Use RULE_LAUNCH_COMPILE property to handle ccache 2020-11-09 10:47:19 +01:00
Timo Kreuzer
743c378ed1 [CMAKE] Add architecture to our build string
This introduces a new CMake variable WINARCH, which what Windows usually uses ("x86" instead of "i386") e.g. in sxs names.
2020-11-07 18:40:45 +01:00
Serge Gautherie
a2a6038e56
[CMAKE] MSVC RUNTIME_CHECKS is a 'Debug'-only feature
"cl : Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible"

Addendum to 92dfec219d.
2020-10-24 04:28:16 +03:00
Jérôme Gardou
840fe4d6ac [CMAKE] Introduce the REACTOS_MODULE_TYPE target property
And set it in set_module_type function
2020-10-22 18:07:27 +02:00
Jérôme Gardou
bbe47e61b1 |CMAKE] Use ExternalProject for host-tools build 2020-10-22 09:31:11 +02:00
Jérôme Gardou
00ed72d7e8 [CMAKE] Get rid of add_compile_flags
Use add_compile_options and the like instead
2020-10-20 21:44:54 +02:00
Jérôme Gardou
683489ccf1 [CMAKE] Use -ffile-prefix-map for GCC builds
And also simplify the __RELFILE__ macro definition for the other cases
2020-10-20 21:44:54 +02:00
Jérôme Gardou
d6ea8659c8 [CMAKE] Get rid of the set_cpp macro
Instead of messing with global variables and the like, we introduce two target properties:
 - WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
 - WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
 - cpprt: for C++ runtime routines
 - cppstl: for the C++ standard template library

NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++

Finally, we manage the relevant flags with the ad-hoc generator expressions

So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module
2020-10-20 21:44:54 +02:00
Jérôme Gardou
980ce77316 [CMAKE] CMakeParseArguments is not needed anymore, cmake_parse_arguments is a builtin since CMake 3.5 2020-10-20 21:44:54 +02:00
Timo Kreuzer
280aa21179 [CMAKE] Add baseaddress_msvc_x64.cmake 2020-09-20 23:08:17 +02:00
Joachim Henze
a4fee60e46 [CMAKE] Fix regressions CORE-17243 & CORE-17246
By sledge-hammer-reverting of
0.4.15-dev-689-g
7ffb6a09c3

and 0.4.15-dev-688-g
1234223f41

Sorry, but the negative impact for other devs and the
whole project are just unbearable.
Stuff got committed meanwhile even so I had to act.
The improvements may be reapplied later when the
negative consequences are under control.
2020-09-06 04:35:33 +02:00
Jérôme Gardou
7ffb6a09c3 [CMAKE] Overhaul creation from CD
Get rid of global properties and use a target-level properties instead
Limit temporary files by using cmake-generator expressions instead
Avoid function calls at the end configuration, use file(GENERATE) idiom instead
2020-09-02 11:02:44 +02:00
Thomas Faber
dd6eb40381
[CMAKE] Remove work-arounds for old CMake versions. CORE-17109 2020-06-20 15:25:29 +02:00
Thomas Faber
a3a1d8f421
[CMAKE] Use CMake 3.17 default policies. CORE-17109 2020-06-20 15:25:28 +02:00
Thomas Faber
add677e45b
[CMAKE] Bump minimum to 3.17, no longer require -ReactOS build. CORE-17109 2020-06-20 15:25:28 +02:00
Thomas Faber
94073cc1d9
[CMAKE] Use NEW policy for CMP0058. CORE-17109 2020-06-20 15:25:27 +02:00
Amine Khaldi
139a3d6661
[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905 2020-06-06 21:58:41 +03:00