mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 16:35:53 +00:00
CMake: build consistently with default (unspecified) target
This commit is contained in:
committed by
Nik Bougalis
parent
2449f9c18d
commit
fab3ec0b56
@@ -12,13 +12,17 @@ endif()
|
||||
|
||||
macro(parse_target)
|
||||
|
||||
if (NOT target AND NOT CMAKE_BUILD_TYPE)
|
||||
if (NOT target)
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} target)
|
||||
if (APPLE)
|
||||
set(target clang.debug)
|
||||
set(target clang.${target})
|
||||
elseif(WIN32)
|
||||
set(target msvc)
|
||||
else()
|
||||
set(target gcc.debug)
|
||||
set(target gcc.${target})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -105,6 +109,7 @@ macro(parse_target)
|
||||
endif()
|
||||
|
||||
endwhile()
|
||||
endif()
|
||||
# Promote these values to the CACHE, then unset the locals
|
||||
# to prevent shadowing.
|
||||
set(CMAKE_C_COMPILER ${CMAKE_C_COMPILER} CACHE FILEPATH
|
||||
@@ -139,7 +144,6 @@ macro(parse_target)
|
||||
"Choose the type of build, options are in CMAKE_CONFIGURATION_TYPES"
|
||||
FORCE)
|
||||
unset(CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user