[CMAKE] Elimitate the use of GCC and CLANG variables

This commit is contained in:
Victor Perevertkin
2022-05-26 01:37:23 +03:00
parent 6f4be52a1c
commit f155b9377f
32 changed files with 78 additions and 116 deletions

View File

@@ -76,8 +76,7 @@ add_definitions(
# There doesn't seem to be a standard for __FILE__ being relative or absolute, so detect it at runtime.
file(RELATIVE_PATH _PATH_PREFIX ${REACTOS_BINARY_DIR} ${REACTOS_SOURCE_DIR})
if (GCC AND ((CMAKE_C_COMPILER_ID STREQUAL "GNU") AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "8.0.0")
OR ((CMAKE_C_COMPILER_ID STREQUAL "Clang") AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0.0"))))
if (NOT MSVC AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang"))
# Thankfully, GCC has this
add_compile_options(-ffile-prefix-map=${REACTOS_SOURCE_DIR}=)
add_compile_options(-ffile-prefix-map=${_PATH_PREFIX}=)
@@ -229,7 +228,7 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to
message(WARNING "-- Disabling precompiled headers support (ccache).")
option(PCH "Whether to use precompiled headers" OFF)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
elseif(GCC)
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
message(WARNING "-- Disabling precompiled headers on GCC by default CORE-17108.")
option(PCH "Whether to use precompiled headers" OFF)
else()