Commit graph

13 commits

Author SHA1 Message Date
William Kent
3464df8c28
[CMAKE] Search the PATH for the compilers and cache the results
We are deliberately using a macro here instead of REQUIRED parameter
because it is available only in CMake 3.18+, so it won't work with
CMake version that is being shipped with RosBE.

On my dev box the RosBE tools are only in the PATH when needed.
Since my IDE inherits the PATH from the system and not from my shell,
I needed to be able to run configure.sh with the tools in my PATH
and then be able to successfully reconfigure when building
from a "regular" command prompt.
2022-05-25 16:34:16 +03:00
Jérôme Gardou
e278b59d3a [CMAKE] Cache compiler paths to make some utilities happy
VS code being one of them
2021-07-05 09:56:41 +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
Jérôme Gardou
96dc5836ab [CMAKE] Make cmake use static libraries for testing the compiler 2021-04-06 19:28:47 +02:00
Jérôme Gardou
9c4ae0d05e [CMAKE] Honor CMAKE_EXE_LINKER_FLAGS_INIT in GCC build 2021-04-06 19:26:33 +02:00
Jérôme Gardou
bf04126e02 |CMAKE] Use RULE_LAUNCH_COMPILE property to handle ccache 2020-11-09 10:47:19 +01:00
Serge Gautherie
e6956dd3b1 [CMAKE] Remove obsolete '_ROSBE_VERSION' checks
following upgrade to RosBE (2.1 and now) 2.2.
2020-09-10 18:16:36 +02:00
Serge Gautherie
11345aedd8
[FORMATTING] [CMAKE] Remove space in 'if (' (#2847) 2020-05-26 20:24:02 +02:00
Jérôme Gardou
23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Jérôme Gardou
806ec9344e [CMAKE] Set CMAKE_OBJCOPY unconditionnally 2018-10-26 10:51:52 +02:00
Andrew Cook
8cd5c4e7bd CORE-14513 [CMAKE] Remove modules that are shipped with cmake (#575)
* Remove unused cmake modules - Both are unedited versions of modules provided by cmake itself
* Remove Compiler/GNU.cmake - Only chang was various _INIT flags, which are handled
via CMAKE_USER_MAKE_RULES_OVERRIDE instead
* Remove Platform/Windows.cmake - There's no clear explination for this file being in reactos
and is simply an old version of the one in cmake
* Remove Platform/Windows-MSVC.cmake - _INIT variable changes moved to overrides-msvc.cmake
Remove /implib from link commands
* Remove CMakeDetermineASMCompiler.cmake - Only change from 3.2 is the addition of a compiler list for the generic ASM dialect, but toolchain files explicitly set a compiler so the list is never used
2018-08-19 22:01:31 +02:00
Colin Finck
c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/toolchain-gcc.cmake (Browse further)