mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
CMake: Implements and documents option LLVM_ENABLE_ASSERTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -17,6 +17,8 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
|
|||||||
Please delete them.")
|
Please delete them.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
include(FindPerl)
|
include(FindPerl)
|
||||||
|
|
||||||
set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
@ -55,6 +57,16 @@ 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" )
|
||||||
|
option(LLVM_ENABLE_ASSERTS "Enable asserts" OFF)
|
||||||
|
else()
|
||||||
|
option(LLVM_ENABLE_ASSERTS "Enable asserts" ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if( LLVM_ENABLE_ASSERTS )
|
||||||
|
add_definitions( -D_DEBUG -UNDEBUG )
|
||||||
|
endif()
|
||||||
|
|
||||||
if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
|
if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
|
||||||
set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} )
|
set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} )
|
||||||
endif()
|
endif()
|
||||||
|
@ -248,6 +248,10 @@
|
|||||||
<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>
|
||||||
|
<dd>Enables code asserts. Defaults to ON if and only if
|
||||||
|
CMAKE_BUILD_TYPE is <i>Release</i>.</dd>
|
||||||
|
|
||||||
<dt><b>LLVM_ENABLE_PIC</b>:BOOL</dt>
|
<dt><b>LLVM_ENABLE_PIC</b>:BOOL</dt>
|
||||||
<dd>Add the <i>-fPIC</i> flag to the compiler command-line, if the
|
<dd>Add the <i>-fPIC</i> flag to the compiler command-line, if the
|
||||||
compiler supports this flag. Some systems, like Windows, does not
|
compiler supports this flag. Some systems, like Windows, does not
|
||||||
|
@ -87,7 +87,6 @@ add_custom_command(OUTPUT ${FINAL_LIBDEPS}
|
|||||||
DEPENDS ${LIBDEPS}
|
DEPENDS ${LIBDEPS}
|
||||||
COMMENT "Checking for cyclic dependencies between LLVM libraries.")
|
COMMENT "Checking for cyclic dependencies between LLVM libraries.")
|
||||||
|
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
|
||||||
set(C_FLGS "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
set(C_FLGS "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||||
set(CXX_FLGS "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
set(CXX_FLGS "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||||
set(CPP_FLGS "${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
set(CPP_FLGS "${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||||
|
Reference in New Issue
Block a user