-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Almost all source files are compiled twice #268
Comments
The makefile-version of wgrib2 had some routines compiled differently for
the utility and the library depending on whether it was compiled with
-DCALLABLE_WGRIB2 or not. (CALLABLE_WGRIB2 -> library).
The github version still reflects double compile.
There is a pull request for making the wgrib2 utility call the wgrib2
library.
When libs_wne is merged, the wgrib2 utility will call the wgrib2 library.
I saw the double compile but I had problems removing it in "libs_wne".
So I considered it a problem to be solved later after the pull request was
merged.
…On Fri, Oct 11, 2024 at 10:28 AM Dusan Jovic ***@***.***> wrote:
Almost every .c file is compiled twice. I think unnecessarily. Once as a
dependency of obj_lib target, and second time as a dependency of wgrib2_lib
target.
[ 94%] Building C object wgrib2/CMakeFiles/obj_lib.dir/v1_v2_if.c.o
[ 94%] Building C object wgrib2/CMakeFiles/obj_lib.dir/VerfTime.c.o
[ 94%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Unmerge_fcst.c.o
[ 94%] Building C object wgrib2/CMakeFiles/obj_lib.dir/Waves.c.o
[ 95%] Building C object wgrib2/CMakeFiles/obj_lib.dir/Warn_old_g2lib.c.o
[ 95%] Building C object wgrib2/CMakeFiles/obj_lib.dir/wgrib2_api.c.o
[ 95%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/unpk.c.o
[ 95%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/unpk_0.c.o
[ 95%] Building C object wgrib2/CMakeFiles/obj_lib.dir/wgrib2.c.o
[ 96%] Building C object wgrib2/CMakeFiles/obj_lib.dir/Wind_speed.c.o
[ 96%] Building C object wgrib2/CMakeFiles/obj_lib.dir/Wind_dir.c.o
[ 96%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/unpk_complex.c.o
[ 97%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/unpk_run_length.c.o
[ 97%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/update_sec3.c.o
[ 97%] Building C object wgrib2/CMakeFiles/obj_lib.dir/Wind_uv.c.o
[ 97%] Building C object wgrib2/CMakeFiles/obj_lib.dir/Write_sec.c.o
[ 97%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/update_sec4.c.o
[ 97%] Building C object wgrib2/CMakeFiles/obj_lib.dir/Wrt_grib.c.o
[ 97%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/v1_v2_if.c.o
[ 97%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/VerfTime.c.o
[ 97%] Building C object wgrib2/CMakeFiles/obj_lib.dir/wrtieee.c.o
[ 97%] Building C object wgrib2/CMakeFiles/obj_lib.dir/wxtext.c.o
[ 97%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Warn_old_g2lib.c.o
[ 98%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Waves.c.o
[ 98%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/wgrib2_api.c.o
[ 98%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/wgrib2.c.o
[ 98%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Wind_dir.c.o
[ 98%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Wind_speed.c.o
[ 99%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Wind_uv.c.o
[ 99%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Write_sec.c.o
[ 99%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/Wrt_grib.c.o
[ 99%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/wxtext.c.o
[ 99%] Building C object wgrib2/CMakeFiles/wgrib2_lib.dir/wrtieee.c.o
If this is not intended, I suggest we make this change:
diff --git a/wgrib2/CMakeLists.txt b/wgrib2/CMakeLists.txt
index 4a8033d..cdf8a49 100644--- a/wgrib2/CMakeLists.txt+++ b/wgrib2/CMakeLists.txt@@ -69,9 +69,9 @@ if(BUILD_LIB)
# with -DCALLABLE_WGRIB2 for the lib
if(BUILD_SHARED_LIB)- add_library(wgrib2_lib SHARED ${lib_src} $<TARGET_OBJECTS:gctpc> ${callable_src})+ add_library(wgrib2_lib SHARED $<TARGET_OBJECTS:obj_lib> $<TARGET_OBJECTS:gctpc> ${callable_src})
else()- add_library(wgrib2_lib STATIC ${lib_src} $<TARGET_OBJECTS:gctpc> ${callable_src})+ add_library(wgrib2_lib STATIC $<TARGET_OBJECTS:obj_lib> $<TARGET_OBJECTS:gctpc> ${callable_src})
endif()
# library and executable have same name (wgrib2) but different target names
—
Reply to this email directly, view it on GitHub
<#268>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIB7ZTD76X5JKACYDMF7L3Z27OA3AVCNFSM6AAAAABPZBK4WKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DCNJRHAYDCNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Almost every .c file is compiled twice. I think unnecessarily. Once as a dependency of obj_lib target, and second time as a dependency of wgrib2_lib target.
If this is not intended, I suggest we make this change:
The text was updated successfully, but these errors were encountered: