From fc75c7ddd7bb9be4b6ad525a99db450c897f06a2 Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Thu, 20 Aug 2020 09:50:34 +0200 Subject: [PATCH] Fix: In CMake add only current files to source group. --- CMake/FileUtilities.cmake | 8 ++++---- CMakeLists.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMake/FileUtilities.cmake b/CMake/FileUtilities.cmake index 604e6fe42..23e256dfd 100644 --- a/CMake/FileUtilities.cmake +++ b/CMake/FileUtilities.cmake @@ -42,7 +42,7 @@ macro(includeFiles targetName file_paths) collectFilesFrom(${file}) if (package_dir) - setSourceGroupForFilesIn(${package_dir} ${targetName}) + setSourceGroupForFilesIn(${file} ${package_dir} ${targetName}) endif() endforeach() @@ -72,14 +72,14 @@ endmacro() -macro(setSourceGroupForFilesIn package_dir targetName) +macro(setSourceGroupForFilesIn file package_dir targetName) #input: target_name PACKAGE_SRCS buildSourceGroup(${targetName} ${package_dir}) if(isAllTestSuite) - source_group(${targetName}\\${SOURCE_GROUP} FILES ${MY_SRCS}) + source_group(${targetName}\\${SOURCE_GROUP} FILES ${file}) else() - source_group(${SOURCE_GROUP} FILES ${MY_SRCS}) + source_group(${SOURCE_GROUP} FILES ${file}) endif() #output: - endmacro(setSourceGroupForFilesIn) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65ef677b7..f031956ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,10 +48,10 @@ add_subdirectory(src/basics) ################################################################################# # VIRTUAL FLUIDS CPU / GPU ################################################################################# -#if (BUILD_VF_CPU) +if (BUILD_VF_CPU) include (cpu.cmake) -#endif() -#if(BUILD_VF_GPU) +endif() +if(BUILD_VF_GPU) include (gpu.cmake) -#endif() +endif() -- GitLab