mirror of
https://github.com/reactos/reactos
synced 2025-10-06 00:12:51 +02:00
[CMAKE] Elimitate the use of GCC and CLANG variables
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user