Skip to content
Snippets Groups Projects
Commit 5689ce44 authored by Soeren Peters's avatar Soeren Peters
Browse files

Add header to config files.

parent 6c47df69
No related branches found
No related tags found
1 merge request!368Adds copyright headers and compiler information via buildInfo.h
############################################################################### # #######################################################################################
## VirtualFluids CI Pipeline ## # ____ ____ __ ______ __________ __ __ __ __
############################################################################### # \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>
# #######################################################################################
image: git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu22_04:1.1 image: git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu22_04:1.1
stages: stages:
......
function(linkBoost)
set( options )
set( oneValueArgs )
set( multiValueArgs COMPONENTS)
cmake_parse_arguments( ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
if(BUILD_SHARED_LIBS)
if (WIN32)
set(Boost_USE_STATIC_LIBS ON)
else()
set(Boost_USE_STATIC_LIBS OFF)
endif()
set(Boost_USE_STATIC_RUNTIME OFF)
else()
set(Boost_USE_STATIC_LIBS ON)
if(WIN32)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
endif()
set(Boost_USE_MULTITHREADED ON)
if (WIN32)
add_definitions( -DBOOST_ALL_NO_LIB )
# add_definitions( -DBOOST_ALL_DYN_LINK )
endif()
vf_get_library_name(library_name)
if(DEFINED ARG_COMPONENTS)
find_package( Boost REQUIRED COMPONENTS ${ARG_COMPONENTS})
target_link_libraries(${library_name} PRIVATE ${Boost_LIBRARIES})
else()
find_package( Boost REQUIRED)
endif()
target_include_directories(${library_name} PRIVATE ${Boost_INCLUDE_DIR})
endfunction()
# #######################################################################################
######################################################################### # ____ ____ __ ______ __________ __ __ __ __
# \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
#
# ########################################################################
# VTK_DIR needs to bet set to the VTK build directory in the config file. # VTK_DIR needs to bet set to the VTK build directory in the config file.
######################################################################### # #######################################################################################
find_package(VTK REQUIRED) find_package(VTK REQUIRED)
vf_get_library_name(library_name) vf_get_library_name(library_name)
......
# Enable cache if available # #######################################################################################
# ____ ____ __ ______ __________ __ __ __ __
# \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #######################################################################################
function(enable_cache) function(enable_cache)
set(CACHE_OPTION set(CACHE_OPTION
"ccache" "ccache"
......
################################################################################# # #######################################################################################
## Helper functions for building source groups # ____ ____ __ ______ __________ __ __ __ __
## and extracting test/production files. # \ \ | | | | | _ \ |___ ___| | | | | / \ | |
## # \ \ | | | | | |_) | | | | | | | / \ | |
## After function call the files are stored in: MY_SRCS # \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #################################################################################
# Helper functions for building source groups
# and extracting test/production files.
#
# After function call the files are stored in: MY_SRCS
################################################################################# #################################################################################
macro(includeAllFiles folderName file_path) macro(includeAllFiles folderName file_path)
......
# #######################################################################################
# ____ ____ __ ______ __________ __ __ __ __
# \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #######################################################################################
include(FetchContent) include(FetchContent)
# spdlog # spdlog
......
# #######################################################################################
# ____ ____ __ ______ __________ __ __ __ __
# \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #######################################################################################
function(enable_sanitizers project_name) function(enable_sanitizers project_name)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
......
# #######################################################################################
# ____ ____ __ ______ __________ __ __ __ __
# \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #######################################################################################
macro(enable_cppcheck) macro(enable_cppcheck)
find_program(CPPCHECK_PROGRAM cppcheck) find_program(CPPCHECK_PROGRAM cppcheck)
...@@ -111,4 +139,3 @@ macro(enable_include_what_you_use) ...@@ -111,4 +139,3 @@ macro(enable_include_what_you_use)
message(${WARNING_MESSAGE} "include-what-you-use requested but executable not found") message(${WARNING_MESSAGE} "include-what-you-use requested but executable not found")
endif() endif()
endmacro() endmacro()
################################################################################# # #######################################################################################
# _ ___ __ __________ _ __ # ____ ____ __ ______ __________ __ __ __ __
# | | / (_)____/ /___ ______ _/ / ____/ /_ __(_)___/ /____ # \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# | | / / / ___/ __/ / / / __ `/ / /_ / / / / / / __ / ___/ # \ \ | | | | | |_) | | | | | | | / \ | |
# | |/ / / / / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__ ) # \ \ | | | | | _ / | | | | | | / /\ \ | |
# |___/_/_/ \__/\__,_/\__,_/_/_/ /_/\__,_/_/\__,_/____/ # \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
# #
################################################################################# # This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #######################################################################################
function(status msg) function(status msg)
message(STATUS " VF: ${msg}") message(STATUS " VF: ${msg}")
......
# #######################################################################################
# ____ ____ __ ______ __________ __ __ __ __
# \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
#
# This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #######################################################################################
function(set_project_options project_name) function(set_project_options project_name)
set(PROJECT_OPTIONS_GCC "") set(PROJECT_OPTIONS_GCC "")
......
# from here: # #######################################################################################
# ____ ____ __ ______ __________ __ __ __ __
# \ \ | | | | | _ \ |___ ___| | | | | / \ | |
# \ \ | | | | | |_) | | | | | | | / \ | |
# \ \ | | | | | _ / | | | | | | / /\ \ | |
# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
# \ \ | | ________________________________________________________________
# \ \ | | | ______________________________________________________________|
# \ \| | | | __ __ __ __ ______ _______
# \ | | |_____ | | | | | | | | | _ \ / _____)
# \ | | _____| | | | | | | | | | | \ \ \_______
# \ | | | | |_____ | \_/ | | | | |_/ / _____ |
# \ _____| |__| |________| \_______/ |__| |______/ (_______/
# #
# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md # This file is part of VirtualFluids. VirtualFluids is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# VirtualFluids 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 General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
# #######################################################################################
# Credit: https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md
# #######################################################################################
function(set_project_warnings project_name) function(set_project_warnings project_name)
set(MSVC_WARNINGS set(MSVC_WARNINGS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment