Skip to content
Snippets Groups Projects
Verified Commit 8749cc26 authored by Tim Kaune's avatar Tim Kaune
Browse files

Move handling of default build type to separate file

parent c966573d
No related branches found
No related tags found
No related merge requests found
...@@ -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)
......
#[[
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 ()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment