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

Remove unused stuff and the global include from VirtualFluidsDefinition.h....

Remove unused stuff and the global include from VirtualFluidsDefinition.h. Adds missing export includes.
parent 87e7a2b0
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ set(includeDirectories "${CMAKE_SOURCE_DIR}/src/gpu" ...@@ -12,7 +12,7 @@ set(includeDirectories "${CMAKE_SOURCE_DIR}/src/gpu"
PROJECT(LidDrivenCavity) PROJECT(LidDrivenCavity)
vf_add_library(BUILDTYPE binary DEPENDS VirtualFluids_GPU basics GridGenerator GksMeshAdapter GksGpu FILES LidDrivenCavity.cpp) vf_add_library(BUILDTYPE binary DEPENDS basics GridGenerator VirtualFluids_GPU GksMeshAdapter GksGpu FILES LidDrivenCavity.cpp)
vf_get_library_name(library_name) vf_get_library_name(library_name)
target_include_directories(${library_name} PRIVATE ${includeDirectories} ) target_include_directories(${library_name} PRIVATE ${includeDirectories} )
\ No newline at end of file
...@@ -82,11 +82,7 @@ enable_language(CUDA) ...@@ -82,11 +82,7 @@ enable_language(CUDA)
include(${CMAKE_PATH}/CMakeMacros_old/general/FindCompiler.cmake) include(${CMAKE_PATH}/CMakeMacros_old/general/FindCompiler.cmake)
configure_file(src/gpu/VirtualFluidsDefinitions.in.h VirtualFluidsDefinitions.h) configure_file(src/gpu/VirtualFluidsDefinitions.in.h VirtualFluidsDefinitions.h)
IF(MSVC)
SET( CMAKE_CXX_FLAGS "/FI${CMAKE_BINARY_DIR}/VirtualFluidsDefinitions.h ${CMAKE_CXX_FLAGS}" )
ELSE(MSVC)
SET( CMAKE_CXX_FLAGS "-include ${CMAKE_BINARY_DIR}/VirtualFluidsDefinitions.h ${CMAKE_CXX_FLAGS}" )
ENDIF(MSVC)
# only use this with device of CC larger than 6.0 # only use this with device of CC larger than 6.0
IF(VF_DOUBLE_ACCURACY) IF(VF_DOUBLE_ACCURACY)
......
...@@ -19,9 +19,7 @@ include(Core/buildInfo.cmake) ...@@ -19,9 +19,7 @@ include(Core/buildInfo.cmake)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/VirtualFluidsCore) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/VirtualFluidsCore)
INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
IF(MSVC)
add_compile_definitions(NOMINMAX) # Disable Min/Max-Macros
ENDIF(MSVC)
vf_add_library(BUILDTYPE static vf_add_library(BUILDTYPE static
FOLDER FOLDER
...@@ -52,6 +50,10 @@ vf_get_library_name (library_name) ...@@ -52,6 +50,10 @@ vf_get_library_name (library_name)
target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Core) target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Core)
target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
IF(MSVC)
target_compile_definitions(${library_name} PUBLIC NOMINMAX) # Disable Min/Max-Macros
ENDIF(MSVC)
include (${CMAKE_PATH}/3rd/mpi.cmake) include (${CMAKE_PATH}/3rd/mpi.cmake)
vf_add_tests() vf_add_tests()
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <string> #include <string>
//#include "VirtualFluidsDefinitions.h" #include "VirtualFluidsDefinitions.h"
#ifdef VF_DOUBLE_ACCURACY #ifdef VF_DOUBLE_ACCURACY
typedef double real; typedef double real;
......
#ifndef REAL_CONSTANT_H #ifndef REAL_CONSTANT_H
#define REAL_CONSTANT_H #define REAL_CONSTANT_H
//#include "VirtualFluidsDefinitions.h" #include "VirtualFluidsDefinitions.h"
#ifdef VF_DOUBLE_ACCURACY #ifdef VF_DOUBLE_ACCURACY
#define c1o2 0.5 #define c1o2 0.5
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <cmath> #include <cmath>
#include "VirtualFluidsDefinitions.h"
bool vf::Math::equal(const real& val1, const real& val2, real maxRelDiff) bool vf::Math::equal(const real& val1, const real& val2, real maxRelDiff)
{ {
const real diff = std::fabs(val1 - val2); const real diff = std::fabs(val1 - val2);
......
...@@ -23,44 +23,4 @@ ...@@ -23,44 +23,4 @@
#cmakedefine VF_CXX_COMPILER_IS_MSVC #cmakedefine VF_CXX_COMPILER_IS_MSVC
#cmakedefine VF_CXX_COMPILER_IS_CLANG #cmakedefine VF_CXX_COMPILER_IS_CLANG
// Generic helper definitions for shared library support
#if defined _WIN32 || defined __CYGWIN__
#define VF_SHARED_LIB_IMPORT __declspec(dllimport)
#define VF_SHARED_LIB_EXPORT __declspec(dllexport)
#define VF_SHARED_LIB_LOCAL
#else
#if __GNUC__ >= 4
#define VF_SHARED_LIB_IMPORT __attribute__ ((visibility ("default")))
#define VF_SHARED_LIB_EXPORT __attribute__ ((visibility ("default")))
#define VF_SHARED_LIB_LOCAL __attribute__ ((visibility ("hidden")))
#else
#define VF_SHARED_LIB_IMPORT
#define VF_SHARED_LIB_EXPORT
#define VF_SHARED_LIB_LOCAL
#endif
#endif
// Now we use the generic helper definitions above to define VIRTUALFLUIDS_GPU_EXPORT, VF_PROTECTED
// and VF_PRIVATE. VIRTUALFLUIDS_GPU_EXPORT is for symbols part of the public application programming
// interface (API), VF_PROTECTED is for symbols used e.g. by public templated or
// inlined code. These symbols must also be publicly available when compiling the
// application. VF_PRIVATE are symbols for internal use inside the library only.
#ifdef BUILD_SHARED_LIBS
// defined if VF is compiled as a shared library
#ifdef VF_SHARED_LIB_SELECT_IMPORTS
// defined if we are building the VF SHARED_LIB (instead of using it)
#define VIRTUALFLUIDS_GPU_EXPORT VF_SHARED_LIB_IMPORT
#else
#define VIRTUALFLUIDS_GPU_EXPORT VF_SHARED_LIB_EXPORT
#endif
#define VF_PRIVATE VF_SHARED_LIB_LOCAL
#else
// VF_SHARED_LIB is not defined: this means VF is a static library
#define VIRTUALFLUIDS_GPU_EXPORT
#define VF_PRIVATE
#endif
#define VF_PROTECTED VIRTUALFLUIDS_GPU_EXPORT
#endif #endif
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <VirtualFluidsDefinitions.h> #include <VirtualFluidsDefinitions.h>
#include "Core/PointerDefinitions.h" #include "Core/PointerDefinitions.h"
#include "VirtualFluids_GPU_export.h"
//! \brief Class forwarding for CudaMemoryManager, GridBuilder and Parameter //! \brief Class forwarding for CudaMemoryManager, GridBuilder and Parameter
class Parameter; class Parameter;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <memory> #include <memory>
#include "Core/PointerDefinitions.h" #include "Core/PointerDefinitions.h"
#include "VirtualFluids_GPU_export.h"
//! \brief Class forwarding for Parameter //! \brief Class forwarding for Parameter
class Parameter; class Parameter;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <Core/PointerDefinitions.h> #include <Core/PointerDefinitions.h>
#include <VirtualFluidsDefinitions.h> #include <VirtualFluidsDefinitions.h>
#include "Output/LogWriter.hpp" #include "Output/LogWriter.hpp"
#include "VirtualFluids_GPU_export.h"
//! \brief Class forwarding for CudaMemoryManager, Parameter, GridProvider and DataWriter //! \brief Class forwarding for CudaMemoryManager, Parameter, GridProvider and DataWriter
class CudaMemoryManager; class CudaMemoryManager;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "Core/PointerDefinitions.h" #include "Core/PointerDefinitions.h"
#include "Core/DataTypes.h" #include "Core/DataTypes.h"
#include "VirtualFluids_GPU_export.h"
//! \brief Class forwarding for CudaMemoryManager and Parameter //! \brief Class forwarding for CudaMemoryManager and Parameter
class Parameter; class Parameter;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "LBM/LB.h" #include "LBM/LB.h"
#include "Core/PointerDefinitions.h" #include "Core/PointerDefinitions.h"
#include "VirtualFluidsDefinitions.h" #include "VirtualFluidsDefinitions.h"
#include "VirtualFluids_GPU_export.h"
//! \struct ParameterStruct //! \struct ParameterStruct
//! \brief struct holds and manages the LB-parameter of the simulation //! \brief struct holds and manages the LB-parameter of the simulation
......
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