From db002d4cf7ca436c215e7af5b6dd267b0ffba172 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 15 Apr 2023 22:39:35 +0200 Subject: [PATCH] Fix CMake issues when disabling unit tests, Add new CMake flag OPENSPACE_ENABLE_ALL_MODULES to change default behavior of module inclusion --- apps/OpenSpace/CMakeLists.txt | 4 +++- ext/CMakeLists.txt | 4 +++- modules/CMakeLists.txt | 8 ++++++-- modules/globebrowsing/ext/geos | 2 +- scripts/developer_settings.lua | 4 ---- 5 files changed, 13 insertions(+), 9 deletions(-) delete mode 100644 scripts/developer_settings.lua diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index e5f1ee78f4..f79ee8f174 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -121,7 +121,9 @@ target_link_libraries(OpenSpace PRIVATE sgct) set_target_properties(sgct PROPERTIES FOLDER "External") set_target_properties(glfw PROPERTIES FOLDER "External") -set_target_properties(SGCTTest PROPERTIES FOLDER "External") +if (TARGET SGCTTest) + set_target_properties(SGCTTest PROPERTIES FOLDER "External") +endif () if (UNIX AND (NOT APPLE)) target_link_libraries(OpenSpace PRIVATE Xcursor Xinerama X11) diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index 3bb558417a..be0d33f15d 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -46,7 +46,9 @@ endif () # Ghoul add_subdirectory(ghoul) -set_target_properties(GhoulTest PROPERTIES FOLDER "Unit Tests") +if (TARGET GhoulTest) + set_target_properties(GhoulTest PROPERTIES FOLDER "Unit Tests") +endif () # Spice begin_dependency("Spice") diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 14f425a5d0..5c5ec9409c 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -162,7 +162,7 @@ endfunction () - +option(OPENSPACE_ENABLE_ALL_MODULES "If this is ON, all modules will be enabled by default") set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules") set(internal_module_path "${PROJECT_SOURCE_DIR}/modules") set(all_enabled_modules "") @@ -209,7 +209,11 @@ foreach(val RANGE ${all_module_names_count}) get_module_attribute_default(${path} is_default_module) create_option_name(${name} optionName) - option(${optionName} "Build ${path} Module" ${is_default_module}) + if (${OPENSPACE_ENABLE_ALL_MODULES}) + option(${optionName} "Build ${path} Module" ON) + else () + option(${optionName} "Build ${path} Module" ${is_default_module}) + endif () if (${optionName}) list(APPEND enabled_module_names ${name}) diff --git a/modules/globebrowsing/ext/geos b/modules/globebrowsing/ext/geos index fe36f23c2b..bc93e4c523 160000 --- a/modules/globebrowsing/ext/geos +++ b/modules/globebrowsing/ext/geos @@ -1 +1 @@ -Subproject commit fe36f23c2bd28c25669798ff041588e191aded67 +Subproject commit bc93e4c523e92baee3c92608b1309a31453ece06 diff --git a/scripts/developer_settings.lua b/scripts/developer_settings.lua deleted file mode 100644 index 8957cd3911..0000000000 --- a/scripts/developer_settings.lua +++ /dev/null @@ -1,4 +0,0 @@ -if os.getenv("OPENSPACE_DEVELOPER") -then - openspace.setPropertyValueSingle('OpenSpaceEngine.PropertyVisibility', 4) -end