commit 2d5efae6781b71ce98ea3514bd3175791234a587
parent f8ce683aee1fb8b335dd5c7b9a53d09a1aa76ac6
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 11 Jan 2023 08:40:08 +0100
planeto: fix conditional compilation
The compilation option HTRDR_BUILD_PLANETO was not used correctly. In
addition, the planeto option was not supported by the htrdr command.
Diffstat:
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -42,7 +42,7 @@ endif()
if(HTRDR_BUILD_COMBUSTION)
set(HTRDR_BUILD_COMMANDS "${HTRDR_BUILD_COMMANDS};HTRDR_BUILD_COMBUSTION")
endif()
-if(HTRDR_BUILD_COMBUSTION)
+if(HTRDR_BUILD_PLANETO)
set(HTRDR_BUILD_COMMANDS "${HTRDR_BUILD_COMMANDS};HTRDR_BUILD_PLANETO")
endif()
diff --git a/cmake/commands/CMakeLists.txt b/cmake/commands/CMakeLists.txt
@@ -33,7 +33,7 @@ if(HTRDR_BUILD_COMBUSTION)
list(APPEND _link_libraries htrdr-combustion)
endif()
if(HTRDR_BUILD_PLANETO)
- list(APPEND _lin_libraries htrdr-planeto)
+ list(APPEND _link_libraries htrdr-planeto)
endif()
################################################################################
diff --git a/src/commands/htrdr_cmd.c b/src/commands/htrdr_cmd.c
@@ -25,6 +25,9 @@
#ifdef HTRDR_BUILD_COMBUSTION
#include "combustion/htrdr_combustion.h"
#endif
+#ifdef HTRDR_BUILD_PLANETO
+ #include "planeto/htrdr_planeto.h"
+#endif
#include "core/htrdr_log.h"
#include "core/htrdr_version.h"
@@ -62,6 +65,8 @@ print_help(const char* cmd)
" atmosphere Radiative transfer computations in a cloudy atmosphere.\n");
printf(
" combustion Radiative transfer computations in a combustion medium.\n");
+ printf(
+" planeto Radiative transfer computations in a 3D planetory atmosphere.\n");
printf("\n");
htrdr_fprint_license(cmd, stdout);
@@ -106,6 +111,18 @@ main(int argc, char** argv)
goto error;
#endif
+ /* Planeto mode */
+ } else if(!strcmp(argv[1], "planeto")) {
+#ifdef HTRDR_BUILD_PLANETO
+ err = htrdr_planeto_main(argc-1, argv+1);
+ if(err) goto error;
+#else
+ fprintf(stderr,
+ "The planeto mode is not available in this htrdr build.\n");
+ err = 1;
+ goto error;
+#endif
+
/* Version */
} else if(!strcmp(argv[1], "--version")) {
printf("%s version %d.%d.%d\n",