I have tried to find a way to build PLplot on the windows platform without overriding the CMAKE_C_FLAGS and CMAKE_Fortran_FLAGS with little success.
Background When MSVC, IVF and CVF compile (and maybe other windows compilers) code they insert into the object file the default library information. Normally this is not a problem, however, if you want to build a library that can be used in some body of code you have three options: 1) Build your library for every permutation of libraries 2) Build your library without default library information 3) Monkey around with the link options to tell it to ignore some of the default library information. The preferred solution is #2, unfortunately, I cannot find a clean way of doing it in CMake. The only solution I can find is to put a small piece of code in several of the CMakeLists.txt files (e.g. src/CMakeLists.txt) that switches the CMAKE_C_FLAGS and CMAKE_Fortran_FLAGS. In fact, I cannot even rely on the default CMAKE_C_FLAGS that get generated by CMake when doing a debug build because they stick a library option (/MDd) into the string. The preference that has been expressed in this list is not override the flags if there is another solution. Before I make an appeal to the CMake mailing list, I would like to exhaust the CMake knowledge that is resident in this list. Question: Is there a method in CMake for specifying compiler flags if the target is a library vice an executable (where you want to the default library information to be left in)? ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
