c++ - Cmake produces file extensions in static library archives -


I have recently switched to autotools to cement, since the limiter cross platform is better for development and what I saw When I build a stable library of my C ++ code, all the files inside .cpp.o is a suffix

  ar income tax PA8 / libgenericTZR.a genericTZR.cpp.o   

I have seen other libraries made by other tools and they do not do it, I'm not sure this is the realm And there is a bad thing, but how can I create static libraries without cpp file extension?

This is my CMake file

  add_executable (PA8 ISP_Charges.cpp genericTZR.cpp genericTZR.h) set (LIBSRC genericTZR.c genericTZR.h) add_library (genericTZR shared $ {LIBSRC}) add_library (genericTZR shared $$ TARGET_OBJECTS: myObjects & gt;) install add_library (Generic TZR-static static $ {LIBSRC}) set_target_properties (Generic TZR-Static Properties OUTPUT_NAME $ install (TARGETS PA8 DESTINATION BIN) TARGETS GENICTZR GENERICTZR-STATIC DESTINATION lib) Installed (files "$ {PROJECT_BINARY_DIR} /PA8/genericTZR.h" destina $   

thanks

(and I agree with it), change the output file names It is not good to try it.

Consider the example given in this link:

  add_executable (foo foo.c foo.cpp)  < / pre> 

generated items foo.co and foo will be .cpp.o . If you force them to just .o extensions If they do, they will fight.

You can

 set  set (CMAKE_C_OUTPUT_EXTENSION_REPLACE 1) (CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1) Try using non-documented, internal   

I do not know if they are still available or if they work on all I've never used them.

As a comment on your post, it has been clarified that names inside the stationary trust are not actually used, you should not worry about them.

Comments

Popular posts from this blog

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -

python - Writing Greek in matplotlib labels, titles -