Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
b0129ad7
Commit
b0129ad7
authored
5 years ago
by
Guilherme Amadio
Browse files
Options
Downloads
Patches
Plain Diff
Update LLVM build type setup for multi-configuration generators
parent
d48812b1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interpreter/CMakeLists.txt
+33
-14
33 additions, 14 deletions
interpreter/CMakeLists.txt
with
33 additions
and
14 deletions
interpreter/CMakeLists.txt
+
33
−
14
View file @
b0129ad7
...
@@ -131,25 +131,44 @@ if(gcctoolchain)
...
@@ -131,25 +131,44 @@ if(gcctoolchain)
endif
()
endif
()
if
(
builtin_llvm
)
if
(
builtin_llvm
)
#---Build type
# Since debug builds of LLVM are quite large, we want to be able
# to control the build types of ROOT and LLVM independently. The
# logic below is to make that possible. LLVM is built in Release
# mode unless a different build type is chosen via LLVM_BUILD_TYPE.
if
(
NOT DEFINED LLVM_BUILD_TYPE
)
if
(
NOT DEFINED LLVM_BUILD_TYPE
)
set
(
LLVM_BUILD_TYPE Release CACHE STRING
"Build type for LLVM (used to set CMAKE_BUILD_TYPE)"
)
set
(
LLVM_BUILD_TYPE Release CACHE STRING
"Build type used for LLVM"
)
endif
()
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
AND NOT LLVM_BUILD_TYPE STREQUAL
"Debug"
)
message
(
STATUS
"Selected a 'Debug' build (CMAKE_BUILD_TYPE), LLVM will still be built in 'Release'."
" Set LLVM_BUILD_TYPE to Debug to change it."
)
endif
()
endif
()
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
set
(
LLVM_ENABLE_ASSERTIONS
"YES"
)
message
(
STATUS
"Building LLVM in '
${
LLVM_BUILD_TYPE
}
' mode."
)
else
()
if
(
LLVM_BUILD_TYPE STREQUAL
"Debug"
)
if
(
NOT DEFINED LLVM_ENABLE_ASSERTIONS
)
set
(
LLVM_ENABLE_ASSERTIONS
"YES"
)
if
(
CMAKE_BUILD_TYPE MATCHES
"(Debug|RelWithDebInfo)"
OR LLVM_BUILD_TYPE MATCHES
"(Debug|RelWithDebInfo)"
)
set
(
LLVM_ENABLE_ASSERTIONS TRUE
)
else
()
else
()
set
(
LLVM_ENABLE_ASSERTIONS
"NO"
)
set
(
LLVM_ENABLE_ASSERTIONS
FALSE
)
endif
()
endif
()
endif
()
endif
()
set
(
CMAKE_BUILD_TYPE
${
LLVM_BUILD_TYPE
}
)
set
(
BUILD_SHARED_LIBS
"NO"
)
# Multi-configuration generators ignore CMAKE_BUILD_TYPE, so
# in that case we set the flags for all configurations to the
# flags of the build type assigned to LLVM_BUILD_TYPE.
if
(
GENERATOR_IS_MULTI_CONFIG
)
string
(
TOUPPER
${
LLVM_BUILD_TYPE
}
LLVM_BUILD_TYPE
)
set
(
LLVM_C_FLAGS
${
CMAKE_C_FLAGS_
${
LLVM_BUILD_TYPE
}}
)
set
(
LLVM_CXX_FLAGS
${
CMAKE_CXX_FLAGS_
${
LLVM_BUILD_TYPE
}}
)
foreach
(
CONFIG
${
CMAKE_CONFIGURATION_TYPES
}
)
string
(
TOUPPER
${
CONFIG
}
CONFIG
)
set
(
CMAKE_C_FLAGS_
${
CONFIG
}
${
LLVM_C_FLAGS
}
)
set
(
CMAKE_CXX_FLAGS_
${
CONFIG
}
${
LLVM_CXX_FLAGS
}
)
endforeach
()
elseif
(
NOT LLVM_BUILD_TYPE STREQUAL CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
${
LLVM_BUILD_TYPE
}
)
endif
()
set
(
BUILD_SHARED_LIBS FALSE
)
set
(
CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL
""
)
set
(
CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL
""
)
set
(
CLANG_ENABLE_ARCMT OFF CACHE BOOL
""
)
set
(
CLANG_ENABLE_ARCMT OFF CACHE BOOL
""
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment