diff --git a/src/basics/PointerDefinitions.h b/src/basics/PointerDefinitions.h index 3ce2330379e13785c5603da9dcb2966bff38978b..8940262fc7ea1a7439a1d090bcd5c142835ef14f 100644 --- a/src/basics/PointerDefinitions.h +++ b/src/basics/PointerDefinitions.h @@ -26,8 +26,6 @@ // 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/>. // -//! \file PointerDefinitions.h -//! \ingroup Core //! \author Soeren Peters //======================================================================================= #ifndef SHARED_POINTER_H @@ -45,7 +43,7 @@ template <class T> using UPtr = std::unique_ptr<T>; template <class T> -using RPtr = T *; +using RPtr = T*; template <class T> using enableSharedFromThis = std::enable_shared_from_this<T>; diff --git a/src/basics/buildInfo.cmake b/src/basics/buildInfo.cmake index bbad317e989f670e05eb663a74123343035daa63..dea11a7c4e2f30aac06c365b1340d4e1a216ad3a 100644 --- a/src/basics/buildInfo.cmake +++ b/src/basics/buildInfo.cmake @@ -1,3 +1,33 @@ +#======================================================================================= +# ____ ____ __ ______ __________ __ __ __ __ +# \ \ | | | | | _ \ |___ ___| | | | | / \ | | +# \ \ | | | | | |_) | | | | | | | / \ | | +# \ \ | | | | | _ / | | | | | | / /\ \ | | +# \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +# \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +# \ \ | | ________________________________________________________________ +# \ \ | | | ______________________________________________________________| +# \ \| | | | __ __ __ __ ______ _______ +# \ | | |_____ | | | | | | | | | _ \ / _____) +# \ | | _____| | | | | | | | | | | \ \ \_______ +# \ | | | | |_____ | \_/ | | | | |_/ / _____ | +# \ _____| |__| |________| \_______/ |__| |______/ (_______/ +# +# 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/>. +# +#! \author Soeren Peters +#======================================================================================= set(buildInfoPath ${CMAKE_BINARY_DIR}/buildInfo) set(buildInfoFile buildInfo.cpp) set(buildInfoInput ${CMAKE_CURRENT_LIST_DIR}/buildInfo.in.cpp) @@ -7,10 +37,19 @@ get_git_head_revision(git_branch git_commit_hash) set(COMPILER_FLAGS "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}} ${CMAKE_CXX_FLAGS}") +site_name(BUILD_computerName) + +if( BUILD_VF_DOUBLE_ACCURACY ) + set(BUILD_PRECISION "double") +else() + set(BUILD_PRECISION "float") +endif() + +get_target_property(BUILD_COMPILE_OPTIONS project_options INTERFACE_COMPILE_OPTIONS) +get_target_property(BUILD_COMPILE_DEFINITIONS project_options INTERFACE_COMPILE_DEFINITIONS) +get_target_property(BUILD_COMPILE_WARNINGS project_warnings INTERFACE_COMPILE_OPTIONS) + configure_file(${buildInfoInput} ${buildInfoPath}/${buildInfoFile}) -#message ("buildInfoPath: ${buildInfoPath}") -include_directories(${buildInfoPath}) -#set(MY_SRCS ${MY_SRCS} ${buildInfoPath}/${buildInfoFile} ${CMAKE_CURRENT_LIST_DIR}/${buildInfoFileHeader}) + set(MY_SRCS ${MY_SRCS} ${buildInfoPath}/${buildInfoFile}) source_group("" FILES ${buildInfoPath}/${buildInfoFile}) -#source_group("" FILES ${CMAKE_CURRENT_LIST_DIR}/${buildInfoFileHeader}) \ No newline at end of file diff --git a/src/basics/buildInfo.h b/src/basics/buildInfo.h index 598d5ee742fc329c01c66a24429cd20b2cebe89e..b3a86f411d629ddb2c8eb0cb2ec9036b3db3d5ac 100644 --- a/src/basics/buildInfo.h +++ b/src/basics/buildInfo.h @@ -26,8 +26,6 @@ // 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/>. // -//! \file buildInfo.h -//! \ingroup Core //! \author Soeren Peters //======================================================================================= #ifndef buildInfo_H @@ -35,21 +33,18 @@ namespace buildInfo { -const char *gitCommitHash(); -const char *gitBranch(); -const char *buildType(); -const char *compilerFlags(); -const char *buildMachine(); -const char *projectDir(); -const char *binaryDir(); -} // namespace buildInfo -#define GIT_COMMIT_HASH buildinfo::gitCommitHash() -#define GIT_BRANCH buildinfo::gitBranch() -#define BUILD_MACHINE buildinfo::buildMachine() -#define PROJECT_DIR buildinfo::projectDir() -#define BINARY_DIR buildinfo::binaryDir() -#define COMPILER_FLAGS buildinfo::compilerFlags() -#define BUILD_TYPE buildinfo::buildType() +const char* gitCommitHash(); +const char* gitBranch(); +const char* buildType(); +const char* compilerFlags(); +const char* compilerFlagWarnings(); +const char* compilerDefinitions(); +const char* buildMachine(); +const char* projectDir(); +const char* binaryDir(); +const char* precision(); + +} // namespace buildInfo #endif diff --git a/src/basics/buildInfo.in.cpp b/src/basics/buildInfo.in.cpp index 59dbe5a3af2ef2798a1a4816f15382b1a59ec387..cc0ca03ebfc2bd22ac295c18e084d9c6bb9ea20b 100644 --- a/src/basics/buildInfo.in.cpp +++ b/src/basics/buildInfo.in.cpp @@ -1,12 +1,85 @@ - +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ +// +// 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/>. +// +//! \author Soeren Peters +//======================================================================================= namespace buildInfo { -const char *gitCommitHash() { return "@git_commit_hash@"; } -const char *gitBranch() { return "@git_branch@"; } -const char *buildType() { return "@CMAKE_BUILD_TYPE@"; } -const char *compilerFlags() { return "@COMPILER_FLAGS@"; } -const char *buildMachine() { return "@BUILD_computerName@"; } -const char *projectDir() { return "@CMAKE_SOURCE_DIR@"; } -const char *binaryDir() { return "@CMAKE_BINARY_DIR@"; } + +const char* gitCommitHash() +{ + return "@git_commit_hash@"; +} + +const char* gitBranch() +{ + return "@git_branch@"; +} + +const char* buildType() +{ + return "@CMAKE_BUILD_TYPE@"; +} + +const char* compilerFlags() +{ + return "@BUILD_COMPILE_OPTIONS@"; +} + +const char* compilerFlagWarnings() +{ + return "@BUILD_COMPILE_WARNINGS@"; +} + +const char* compilerDefinitions() +{ + return "@BUILD_COMPILE_DEFINITIONS@"; +} + +const char* buildMachine() +{ + return "@BUILD_computerName@"; +} + +const char* projectDir() +{ + return "@CMAKE_SOURCE_DIR@"; +} + +const char* binaryDir() +{ + return "@CMAKE_BINARY_DIR@"; +} + +const char* precision() +{ + return "@BUILD_PRECISION@"; +} + } // namespace buildInfo