mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-06-29 16:30:44 +00:00
CMake: Renamed LLVM_ENABLE_ASSERTS to
LLVM_ENABLE_ASSERTIONS. Fine-tuned the logic that controls the definition of NDEBUG and _DEBUG macros. Thanks to Jay Foad for this suggestions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3b0a4f186b
commit
76941b2733
|
@ -58,13 +58,22 @@ endif( MSVC )
|
||||||
option(LLVM_ENABLE_THREADS "Use threads if available." ON)
|
option(LLVM_ENABLE_THREADS "Use threads if available." ON)
|
||||||
|
|
||||||
if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
||||||
option(LLVM_ENABLE_ASSERTS "Enable asserts" OFF)
|
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
|
||||||
else()
|
else()
|
||||||
option(LLVM_ENABLE_ASSERTS "Enable asserts" ON)
|
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( LLVM_ENABLE_ASSERTS )
|
if( LLVM_ENABLE_ASSERTIONS )
|
||||||
add_definitions( -D_DEBUG -UNDEBUG )
|
add_definitions( -D_DEBUG )
|
||||||
|
# On Release builds cmake automatically defines NDEBUG, so we
|
||||||
|
# explicitly undefine it:
|
||||||
|
if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
||||||
|
add_definitions( -UNDEBUG )
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
|
||||||
|
add_definitions( -DNDEBUG )
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
|
if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
|
||||||
|
|
|
@ -248,8 +248,8 @@
|
||||||
<dt><b>LLVM_ENABLE_THREADS</b>:BOOL</dt>
|
<dt><b>LLVM_ENABLE_THREADS</b>:BOOL</dt>
|
||||||
<dd>Build with threads support, if available. Defaults to ON.</dd>
|
<dd>Build with threads support, if available. Defaults to ON.</dd>
|
||||||
|
|
||||||
<dt><b>LLVM_ENABLE_ASSERTS</b>:BOOL</dt>
|
<dt><b>LLVM_ENABLE_ASSERTIONS</b>:BOOL</dt>
|
||||||
<dd>Enables code asserts. Defaults to ON if and only if
|
<dd>Enables code assertions. Defaults to ON if and only if
|
||||||
CMAKE_BUILD_TYPE is <i>Release</i>.</dd>
|
CMAKE_BUILD_TYPE is <i>Release</i>.</dd>
|
||||||
|
|
||||||
<dt><b>LLVM_ENABLE_PIC</b>:BOOL</dt>
|
<dt><b>LLVM_ENABLE_PIC</b>:BOOL</dt>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user