Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Netlib f2c
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
netlib
Netlib f2c
Commits
8749cc26
Verified
Commit
8749cc26
authored
4 months ago
by
Tim Kaune
Browse files
Options
Downloads
Patches
Plain Diff
Move handling of default build type to separate file
parent
c966573d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-12
1 addition, 12 deletions
CMakeLists.txt
cmake/SetDefaultBuildType.cmake
+30
-0
30 additions, 0 deletions
cmake/SetDefaultBuildType.cmake
with
31 additions
and
12 deletions
CMakeLists.txt
+
1
−
12
View file @
8749cc26
...
@@ -32,18 +32,7 @@ if (DEFINED NetlibF2C_SHARED_LIBS)
...
@@ -32,18 +32,7 @@ if (DEFINED NetlibF2C_SHARED_LIBS)
set
(
BUILD_SHARED_LIBS
"
${
NetlibF2C_SHARED_LIBS
}
"
)
set
(
BUILD_SHARED_LIBS
"
${
NetlibF2C_SHARED_LIBS
}
"
)
endif
()
endif
()
# NetlibF2C is a third-party tool and library, which we rarely want to debug.
include
(
"./cmake/SetDefaultBuildType.cmake"
)
# Set the default build type to Release.
# If using a multi config generator
get_property
(
_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG
)
if
(
_IS_MULTI_CONFIG
)
set
(
CMAKE_DEFAULT_BUILD_TYPE
"Release"
)
# If using a single config generator
else
()
if
(
NOT DEFINED CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Release"
)
endif
()
endif
()
if
(
BUILD_SHARED_LIBS
)
if
(
BUILD_SHARED_LIBS
)
include
(
CheckPIESupported
)
include
(
CheckPIESupported
)
...
...
This diff is collapsed.
Click to expand it.
cmake/SetDefaultBuildType.cmake
0 → 100644
+
30
−
0
View file @
8749cc26
#[[
CMake build script for netlib f2c
Copyright (C) 2025 Tim Kaune
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see
<https://www.gnu.org/licenses/>.
]]
# If using a multi config generator
get_property
(
_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG
)
if
(
_IS_MULTI_CONFIG
)
set
(
CMAKE_DEFAULT_BUILD_TYPE
"Release"
)
# If using a single config generator
else
()
if
(
NOT DEFINED CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Release"
)
endif
()
endif
()
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