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

Merge pull request 'feature/add_public_include_directories' (#17) from...

Merge pull request 'feature/add_public_include_directories' (#17) from peters/VirtualFluids_dev:feature/add_public_include_directories into open_source
parents f283d981 ae1237cc
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,8 @@ set (VIRTUAL_FLUIDS_GLOB_FILES
*.c
*.h
*.cu
*.cuh
*.hpp
CACHE INTERNAL "File endings to glob for source files" )
......@@ -163,9 +165,11 @@ function(vf_add_library)
generateExportHeader (${library_name})
endif()
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(${library_name} PRIVATE ${CMAKE_BINARY_DIR})
target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR})
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/gpu)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/cpu)
#status("... configuring target: ${library_name} (type=${ARG_BUILDTYPE}) done")
......
INCLUDE_DIRECTORIES(${APPS_ROOT_CPU})
INCLUDE(${VF_SRC_DIR}/cpu/VirtualFluidsCore/IncludsList.cmake)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/cpu/VirtualFluidsCore)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/geometry3d)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/geometry3d/Creator)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/geometry3d/KdTree)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/basics/container)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/basics/memory)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/basics/objects)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/basics/transmiitter)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/basics/utilities)
INCLUDE_DIRECTORIES(${VF_SRC_DIR}/basics/basics/writer)
......@@ -2,7 +2,7 @@
PROJECT(LidDrivenCavity)
INCLUDE(${APPS_ROOT_CPU}/IncludsList.cmake)
vf_add_library(BUILDTYPE binary DEPENDS VirtualFluidsCore basics FILES LidDrivenCavity.cpp)
vf_get_library_name (library_name)
target_include_directories(${library_name} PRIVATE ${APPS_ROOT_CPU})
\ No newline at end of file
set(includeDirectories "${CMAKE_SOURCE_DIR}/src/gpu"
"${CMAKE_SOURCE_DIR}/src/basics/Core"
"${CMAKE_SOURCE_DIR}/src/gpu/VirtualFluids_GPU"
"${CMAKE_SOURCE_DIR}/src/gpu/GridGenerator"
"${CMAKE_SOURCE_DIR}/src/basics"
"${CMAKE_SOURCE_DIR}/src/gpu/GksMeshAdapter"
"${CMAKE_SOURCE_DIR}/src/gpu/GksGpu")
PROJECT(LidDrivenCavity)
vf_add_library(BUILDTYPE binary DEPENDS basics GridGenerator VirtualFluids_GPU GksMeshAdapter GksGpu FILES LidDrivenCavity.cpp)
vf_get_library_name(library_name)
target_include_directories(${library_name} PRIVATE ${includeDirectories} )
\ No newline at end of file
......@@ -11,5 +11,5 @@ add_subdirectory(${VF_THIRD_DIR}/MuParser)
add_subdirectory(src/cpu/VirtualFluidsCore)
set (APPS_ROOT_CPU "${CMAKE_SOURCE_DIR}/apps/cpu/")
set (APPS_ROOT_CPU "${VF_ROOT_DIR}/apps/cpu/")
include(${APPS_ROOT_CPU}/Applications.cmake)
\ No newline at end of file
......@@ -4,12 +4,14 @@ include(Core/buildInfo.cmake)
vf_add_library(BUILDTYPE static EXCLUDE buildInfo.in.cpp)
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}/geometry3d)
target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/basics/container)
target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/basics/objects)
target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/utilities)
target_include_directories(${library_name} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/basics/writer)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Core)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/geometry3d)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/container)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/objects)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/utilities)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/basics/writer)
IF(MSVC)
target_compile_definitions(${library_name} PUBLIC NOMINMAX) # Disable Min/Max-Macros
......
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/IncludsList.cmake)
IF(${USE_GCC})
SET(CAB_ADDITIONAL_LINK_LIBRARIES ${CAB_ADDITIONAL_LINK_LIBRARIES} rt)
SET(CAB_ADDITIONAL_LINK_LIBRARIES ${CAB_ADDITIONAL_LINK_LIBRARIES} gomp)
......@@ -15,12 +13,18 @@ ENDIF()
vf_add_library(BUILDTYPE static DEPENDS basics MuParser ${CAB_ADDITIONAL_LINK_LIBRARIES})
vf_get_library_name(library_name)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/geometry3d)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/basics/container)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/basics/memory)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/basics/objects)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/basics/transmitter)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/basics/utilities)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/basics/writer)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/BoundaryConditions)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Connectors)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Data)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Interactors)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/LBM)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Parallel)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Grid)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Visitors)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/CoProcessors)
target_include_directories(${library_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Utilities)
target_include_directories(${library_name} PUBLIC ${VF_THIRD_DIR})
#directory pathes for header files
set(VirtualFluidsCore_source_dir ${VF_SRC_DIR}/cpu/VirtualFluidsCore)
vf_get_library_name(library_name)
set (SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/cpu/")
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/BoundaryConditions)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Connectors)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Data)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Interactors)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/LBM)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Parallel)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Grid)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Visitors)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/CoProcessors)
INCLUDE_DIRECTORIES(${VirtualFluidsCore_source_dir}/Utilities)
INCLUDE_DIRECTORIES(${VF_THIRD_DIR})
......@@ -4,9 +4,3 @@ vf_add_library(BUILDTYPE shared DEPENDS basics GksMeshAdapter)
include (${VF_CMAKE_DIR}/3rd/cuda.cmake)
include (${VF_CMAKE_DIR}/3rd/mpi.cmake)
include (${VF_CMAKE_DIR}/3rd/OpenMP.cmake)
vf_get_library_name(library_name)
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics")
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu")
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/GksMeshAdapter")
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics/Core")
vf_add_library(BUILDTYPE shared DEPENDS basics GridGenerator)
vf_get_library_name(library_name)
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics")
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu")
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/GridGenerator")
target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics/Core")
......@@ -5,11 +5,5 @@ vf_add_library(BUILDTYPE shared DEPENDS basics)
include (${VF_CMAKE_DIR}/3rd/cuda.cmake)
include (${VF_CMAKE_DIR}/3rd/OpenMP.cmake)
vf_get_library_name(library_name)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/geometry3d)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/gpu)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/Core)
set_property(TARGET ${library_name} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
\ No newline at end of file
......@@ -11,17 +11,12 @@ vf_add_library(BUILDTYPE shared DEPENDS ${libsToLink})
include (${VF_CMAKE_DIR}/3rd/cuda.cmake)
vf_get_library_name(library_name)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/gpu)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/gpu/GridGenerator)
target_include_directories(${library_name} PRIVATE ${VF_SRC_DIR}/basics/Core)
#SET(TPN_WIN32 "/EHsc")
#https://stackoverflow.com/questions/6832666/lnk2019-when-including-asio-headers-solution-generated-with-cmake
#https://stackoverflow.com/questions/27442885/syntax-error-with-stdnumeric-limitsmax
IF(MSVC)
vf_get_library_name(library_name)
set_target_properties(${library_name} PROPERTIES LINK_FLAGS "/ignore:4251")
ENDIF(MSVC)
......@@ -70,7 +70,7 @@ bool FileWriter::isPeriodicCell(SPtr<Parameter> para, uint number2, uint number1
void FileWriter::writeUnstrucuredGridLT(SPtr<Parameter> para, std::vector<std::string >& fname)
{
std::vector< UbTupleFloat3 > nodes;
std::vector< UbTupleInt8 > cells;
std::vector< UbTupleUInt8 > cells;
std::vector< std::string > nodedatanames;
nodedatanames.push_back("Press");
nodedatanames.push_back("DRho");
......@@ -79,7 +79,7 @@ void FileWriter::writeUnstrucuredGridLT(SPtr<Parameter> para, std::vector<std::s
nodedatanames.push_back("Vz");
nodedatanames.push_back("Geometry");
unsigned int number1, number2, number3, number4, number5, number6, number7, number8;
int dn1, dn2, dn3, dn4, dn5, dn6, dn7, dn8;
unsigned int dn1, dn2, dn3, dn4, dn5, dn6, dn7, dn8;
bool neighborsAreFluid;
double vxmax = 0;
unsigned int startpos = 0;
......
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