Skip to content

Commit

Permalink
CORE-14513 [CMAKE] Remove modules that are shipped with cmake (reacto…
Browse files Browse the repository at this point in the history
…s#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
  • Loading branch information
ariscop authored and tkreuzer committed Aug 19, 2018
1 parent 2eb7ddd commit 8cd5c4e
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 1,187 deletions.
14 changes: 5 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ endif()
# Don't escape preprocessor definition values added via add_definitions
cmake_policy(SET CMP0005 OLD)

# Shadow cmake provided modules
cmake_policy(SET CMP0017 OLD)

# Honor CMAKE_SHARED_LIBRARY_<Lang>_FLAGS variable.
cmake_policy(SET CMP0018 OLD)

Expand Down Expand Up @@ -68,12 +65,6 @@ if(MSVC_IDE)
add_compile_flags("/MP")
endif()
# We don't need CMake importlib handling.
# FIXME: Remove the MSVC_IDE condition when the upcoming RosBE lands.
if(NOT MSVC_IDE)
unset(CMAKE_IMPORT_LIBRARY_SUFFIX)
endif()
# Bison and Flex support
# include(sdk/cmake/bison-flex.cmake)
Expand Down Expand Up @@ -115,6 +106,11 @@ if(NOT CMAKE_CROSSCOMPILING)
endif()
else()
# We don't need CMake importlib handling.
# FIXME: Remove the MSVC_IDE condition when the upcoming RosBE lands.
if(NOT MSVC_IDE)
unset(CMAKE_IMPORT_LIBRARY_SUFFIX)
endif()
if(NEW_STYLE_BUILD)
include(sdk/cmake/host-tools.cmake)
Expand Down
6 changes: 6 additions & 0 deletions overrides-gcc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
foreach(lang C CXX ASM)
set(CMAKE_${lang}_FLAGS_DEBUG "")
set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELEASE "")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
endforeach()
14 changes: 14 additions & 0 deletions overrides-msvc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set(CMAKE_CXX_FLAGS_DEBUG_INIT "")
set(CMAKE_CXX_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "")
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "")
set(CMAKE_C_FLAGS_DEBUG_INIT "")
set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_C_FLAGS_RELEASE_INIT "")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "/debug")
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT "/debug")
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
Loading

0 comments on commit 8cd5c4e

Please sign in to comment.