Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
35ce3216
Commit
35ce3216
authored
8 years ago
by
Norihiro Watanabe
Committed by
Dmitri Naumov
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] set the default OGS_LOG_LEVEL to debug also in release build
parent
fba9522b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+16
-0
16 additions, 0 deletions
CMakeLists.txt
scripts/cmake/ProjectSetup.cmake
+0
-15
0 additions, 15 deletions
scripts/cmake/ProjectSetup.cmake
with
16 additions
and
15 deletions
CMakeLists.txt
+
16
−
0
View file @
35ce3216
...
...
@@ -86,6 +86,15 @@ option(EIGEN_NO_DEBUG "Disables Eigen's assertions" OFF)
# Logging
option
(
OGS_DISABLE_LOGGING
"Disables all logog messages."
OFF
)
set
(
OGS_LOG_LEVEL
"LOGOG_LEVEL_DEBUG"
CACHE STRING
"Set logging level included in compilation."
)
set_property
(
CACHE OGS_LOG_LEVEL PROPERTY STRINGS
LOGOG_LEVEL_NONE
LOGOG_LEVEL_ERROR
LOGOG_LEVEL_WARN
LOGOG_LEVEL_INFO
LOGOG_LEVEL_DEBUG
LOGOG_LEVEL_ALL
)
# Debug
option
(
OGS_FATAL_ABORT
"Abort in OGS_FATAL"
OFF
)
...
...
@@ -166,6 +175,13 @@ if(OGS_BUILD_TESTS)
set
(
Data_BINARY_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/Tests/Data CACHE INTERNAL
""
)
endif
()
# Logging level
if
(
OGS_DISABLE_LOGGING
)
set
(
OGS_LOG_LEVEL LOGOG_LEVEL_NONE
)
endif
()
add_definitions
(
-DLOGOG_LEVEL=
${
OGS_LOG_LEVEL
}
)
######################
### Subdirectories ###
######################
...
...
This diff is collapsed.
Click to expand it.
scripts/cmake/ProjectSetup.cmake
+
0
−
15
View file @
35ce3216
...
...
@@ -9,21 +9,6 @@ endif()
set
(
EXECUTABLE_OUTPUT_PATH
${
PROJECT_BINARY_DIR
}
/bin
)
set
(
LIBRARY_OUTPUT_PATH
${
PROJECT_BINARY_DIR
}
/lib
)
# Logging level
if
(
OGS_DISABLE_LOGGING
)
set
(
OGS_LOG_LEVEL LOGOG_LEVEL_NONE
)
endif
()
if
(
NOT DEFINED OGS_LOG_LEVEL
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
add_definitions
(
-DLOGOG_LEVEL=LOGOG_LEVEL_DEBUG
)
else
()
add_definitions
(
-DLOGOG_LEVEL=LOGOG_LEVEL_INFO
)
endif
()
# CMAKE_BUILD_TYPE = Debug
else
()
add_definitions
(
-DLOGOG_LEVEL=
${
OGS_LOG_LEVEL
}
)
endif
()
# NOT DEFINED OGS_LOG_LEVEL
# Enable Visual Studio project folder grouping
set_property
(
GLOBAL PROPERTY USE_FOLDERS ON
)
...
...
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