Skip to content

Commit

Permalink
Replace CompilerFlags with CompilerSettings
Browse files Browse the repository at this point in the history
The new module takes a completely different approach that is more
straightforward and easier to understand.

Signed-off-by: Derek G Foster <[email protected]>
  • Loading branch information
ffoulkes committed Aug 16, 2023
1 parent 6f62d0b commit be4b2da
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 275 deletions.
20 changes: 7 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ cmake_minimum_required(VERSION 3.15)
# Set before the first project() command.
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Type of build to perform")

# Include before the project() command.
set(ENABLE_PIE_FLAG OFF)
set(ENABLE_SANITIZE_CFI OFF)
set(ENABLE_SPECTRE_FLAGS OFF)
include(cmake/CompilerFlags.cmake)
define_compiler_init_variables()

project(networking-recipe VERSION 23.07 LANGUAGES C CXX)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(CMakePrintHelpers)
include(CompilerSettings)
include(CTest)
include(FindPkgConfig)
include(GNUInstallDirs)
Expand Down Expand Up @@ -66,7 +60,6 @@ include(SelectTdiTarget)
###################

option(SET_RPATH "Set RPATH in libraries and executables" OFF)

option(WITH_KRNLMON "Enable Kernel Monitor support" ON)
option(WITH_OVSP4RT "Enable OVS support" ON)

Expand All @@ -78,9 +71,12 @@ endif()
cmake_print_variables(WITH_KRNLMON)
cmake_print_variables(WITH_OVSP4RT)

###########################
# Global compiler options #
###########################
############################
# Global compiler settings #
############################

add_basic_settings()
add_security_settings(${CMAKE_BUILD_TYPE})

add_compile_options(-D${TARGETFLAG})

Expand All @@ -92,8 +88,6 @@ if(NOT DEPEND_INSTALL_DIR STREQUAL "")
endif()
endif()

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

############################
# find_xxxx() search paths #
############################
Expand Down
262 changes: 0 additions & 262 deletions cmake/CompilerFlags.cmake

This file was deleted.

Loading

0 comments on commit be4b2da

Please sign in to comment.