• unknown's avatar
    CMakeLists.txt (several), make_win_bin_dist: · 7bd93758
    unknown authored
      Aligned client library build and use with the Unix version when it
      comes to what source to include directly in the builds, and what
      libraries to link with (bug#30118).
    
      Also reviewed, corrected and made more clear when static or dynamic
      Thread Local Storage is to be used. Some code duplication was removed,
      and some redundant library usage were removed, reducing the risk of
      incorrect TLS usage.
    
    
    client/CMakeLists.txt:
      - Removed code duplication by moving build of "mysqlclient" to
        the "libmysql" directory
      - Link clients with the new "mysqlclient_notls", to protect for
        the case the clients use more than the client API, and access
        thread data directly.
      - Synced explicit target addition of sources with Unix.
    dbug/CMakeLists.txt:
      No need to set CXX flags, no C++ code
    libmysql/CMakeLists.txt:
      - Aligned more with Unix version when it comes to included source files
      - Build both DLL and static library in this directory
      - Produce separe static TLS version of the static client library, for
         use when building clients in this build that might access TLS
         storage directly.
    mysys/CMakeLists.txt:
      We only have to build the static TLS version, as no clients are
      linking directly with the "mysys" library.
    scripts/make_win_bin_dist:
      Ajusted paths to new "mysqlclient.lib" location in source tree
    sql/CMakeLists.txt:
      Removed duplicate "ha_blackhole.cc" in file listing
      Removed explicit link to "dbug.lib" not needed
      Link with the static TLS "mysqlclient_notls"
    tests/CMakeLists.txt:
      Removed explicit link to "dbug", "mysys", "yassl", "taocrypt" and
      "zlib" not needed.
      Added explicit source addition "../mysys/my_memmem.c".
      No need for setting CXX flags, no C++ code.
      Use the static TLS "mysqlclient_notls" for linkage.
    zlib/CMakeLists.txt:
      No need for a dynamic TLS version of this library, no access to thread
      storage is done from it. Also no need to define MYSQL_CLIENT, not used,
      or __WIN32__ that is handled by the library header without this define.
    7bd93758
CMakeLists.txt 1.3 KB