Skip to content

Commit

Permalink
Move setting of CMAKE_BUILD_TYPE to base CMakeLists.txt
Browse files Browse the repository at this point in the history
This keeps all CMake-level variables in one place.
  • Loading branch information
hainest committed Dec 22, 2022
1 parent fa518b7 commit 9f1ece4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ project(
HOMEPAGE_URL "https://github.com/dyninst/dyninst"
LANGUAGES C CXX ASM)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()

set(DYNINST_ROOT ${PROJECT_SOURCE_DIR})
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
Expand Down
11 changes: 0 additions & 11 deletions cmake/DyninstLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,3 @@ if(PLATFORM MATCHES nt OR PLATFORM MATCHES windows)
add_definitions(-Dsnprintf=_snprintf)
endif()
endif()


# set default configuration type

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE
RelWithDebInfo
CACHE STRING
"Choose the build type (None, Debug, Release, RelWithDebInfo, MinSizeRel)"
FORCE)
endif()

0 comments on commit 9f1ece4

Please sign in to comment.