Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
dde474a4
Commit
dde474a4
authored
3 years ago
by
Matthias Puchner
Browse files
Options
Downloads
Patches
Plain Diff
moved build type modification out of Compiler.cmake to head of CMake script
parent
116c6ee2
No related branches found
No related tags found
1 merge request
!73
CMake improvements
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+7
-1
7 additions, 1 deletion
CMakeLists.txt
cmake/BornAgain/Compiler.cmake
+0
-8
0 additions, 8 deletions
cmake/BornAgain/Compiler.cmake
with
7 additions
and
9 deletions
CMakeLists.txt
+
7
−
1
View file @
dde474a4
...
...
@@ -22,13 +22,19 @@ project(BornAgain
set
(
CMAKE_C_STANDARD 11
)
set
(
CMAKE_CXX_STANDARD 17
)
# Show info about generator type
#
# Show info about generator type
; set CMAKE_BUILD_TYPE if not given
if
(
CMAKE_CONFIGURATION_TYPES
)
message
(
STATUS
"Generator type: Multi-configuration generator"
)
else
()
message
(
STATUS
"Generator type: Single-configuration generator"
)
endif
()
message
(
" CMAKE_CONFIGURATION_TYPES:
${
CMAKE_CONFIGURATION_TYPES
}
"
)
# The following is not correct/does not have any effect for multi-configuration generators.
# But when correcting this, be aware that CMAKE_BUILD_TYPE is used in more scripts!
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE Release CACHE STRING
""
FORCE
)
message
(
" CMAKE_BUILD_TYPE type not given - forced to 'Release'"
)
endif
()
message
(
" CMAKE_BUILD_TYPE:
${
CMAKE_BUILD_TYPE
}
"
)
include
(
CTest
)
# equivalent to "enable_testing() ???
...
...
This diff is collapsed.
Click to expand it.
cmake/BornAgain/Compiler.cmake
+
0
−
8
View file @
dde474a4
...
...
@@ -2,14 +2,6 @@
# Compiler.cmake
#---------------------------------------------------------------------------------------------------
#--- Set a default build type for single-configuration CMake generators if no build type is set ---
if
(
NOT CMAKE_BUILD_TYPE
)
# set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "" FORCE)
set
(
CMAKE_BUILD_TYPE Release CACHE STRING
""
FORCE
)
endif
()
message
(
STATUS
"CMAKE_BUILD_TYPE:
${
CMAKE_BUILD_TYPE
}
"
)
#--- Need to locate thead libraries and options to set properly some compilation flags ---
find_package
(
Threads
)
...
...
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