From a64d44c20a596347812228c3e3875c59b78a10da Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Wed, 28 Oct 2020 17:48:56 +0100 Subject: [PATCH] Add CUDA compilation to gpu executables. --- CMake/CMakeSetCompilerFlags.cmake | 2 +- apps/gpu/LBM/DrivenCavity/CMakeLists.txt | 2 ++ apps/gpu/LBM/TGV_3D/CMakeLists.txt | 2 ++ apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt | 2 ++ apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt | 2 ++ cpu.cmake | 2 +- 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMake/CMakeSetCompilerFlags.cmake b/CMake/CMakeSetCompilerFlags.cmake index b00a17fdb..4165eeff8 100644 --- a/CMake/CMakeSetCompilerFlags.cmake +++ b/CMake/CMakeSetCompilerFlags.cmake @@ -20,7 +20,7 @@ macro(loadMachineFile) SET(CMAKE_CONFIG_FILE "${VF_CMAKE_DIR}/cmake_config_files/${CAB_MACHINE}.config.cmake") IF(NOT EXISTS ${CMAKE_CONFIG_FILE}) - status("No configuration file found.") + status("No configuration file found for machine: ${CAB_MACHINE}.") ELSE() status("Load configuration file ${CAB_MACHINE}.config.cmake") include(${CMAKE_CONFIG_FILE}) diff --git a/apps/gpu/LBM/DrivenCavity/CMakeLists.txt b/apps/gpu/LBM/DrivenCavity/CMakeLists.txt index e170d772b..3c401265d 100644 --- a/apps/gpu/LBM/DrivenCavity/CMakeLists.txt +++ b/apps/gpu/LBM/DrivenCavity/CMakeLists.txt @@ -4,4 +4,6 @@ PROJECT(DrivenCavity) vf_add_library(BUILDTYPE binary PRIVATE_LINK VirtualFluids_GPU basics GridGenerator FILES DrivenCavity.cpp ) +set_source_files_properties(DrivenCavity.cpp PROPERTIES LANGUAGE CUDA) + linkCUDA() diff --git a/apps/gpu/LBM/TGV_3D/CMakeLists.txt b/apps/gpu/LBM/TGV_3D/CMakeLists.txt index a8018feeb..82e62a2e3 100644 --- a/apps/gpu/LBM/TGV_3D/CMakeLists.txt +++ b/apps/gpu/LBM/TGV_3D/CMakeLists.txt @@ -2,4 +2,6 @@ PROJECT(TGV_3D) vf_add_library(BUILDTYPE binary PRIVATE_LINK basics VirtualFluids_GPU GridGenerator FILES TGV_3D.cpp) +set_source_files_properties(TGV_3D.cpp PROPERTIES LANGUAGE CUDA) + linkCUDA() diff --git a/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt b/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt index 5fbef792d..ef91ada68 100644 --- a/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt +++ b/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt @@ -2,4 +2,6 @@ PROJECT(TGV_3D_MultiGPU) vf_add_library(BUILDTYPE binary PRIVATE_LINK basics VirtualFluids_GPU GridGenerator FILES TGV_3D_MultiGPU.cpp) +set_source_files_properties(TGV_3D_MultiGPU.cpp PROPERTIES LANGUAGE CUDA) + linkCUDA() diff --git a/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt b/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt index 636870f1d..b05d36ee5 100644 --- a/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt +++ b/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt @@ -2,4 +2,6 @@ PROJECT(GridGeneratorTest) vf_add_library(BUILDTYPE binary PRIVATE_LINK basics VirtualFluids_GPU GridGenerator FILES gridGenerator.cpp) +set_source_files_properties(gridGenerator.cpp PROPERTIES LANGUAGE CUDA) + linkCUDA() diff --git a/cpu.cmake b/cpu.cmake index 7e90d1b54..e9b33c18e 100644 --- a/cpu.cmake +++ b/cpu.cmake @@ -82,11 +82,11 @@ endif() add_subdirectory(${VF_THIRD_DIR}/MuParser) -add_subdirectory(${VF_THIRD_DIR}/pybind11/pybind11-2.5.0) add_subdirectory(src/cpu/VirtualFluidsCore) if(BUILD_VF_PYTHON_BINDINGS) + add_subdirectory(${VF_THIRD_DIR}/pybind11/pybind11-2.5.0) add_subdirectory(src/cpu/simulationconfig) add_subdirectory(src/cpu/pythonbindings) endif() -- GitLab