You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Thorsten Schöning (Jira)" <lo...@logging.apache.org> on 2021/01/04 19:34:00 UTC

[jira] [Reopened] (LOGCXX-510) Build problems using CMAKE and Visual Studio 2019 Community

     [ https://issues.apache.org/jira/browse/LOGCXX-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Schöning reopened LOGCXX-510:
--------------------------------------

I'm running into problems again when building the current MASTER:

 
{quote}Schweregrad Code Beschreibung Projekt Datei Zeile UnterdrückungszustandSchweregrad Code Beschreibung Projekt Datei Zeile UnterdrückungszustandFehler CMake Error at C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C++\Logging\log4cxx\master\src\src\CMakeLists.txt:4 (target_link_libraries):  Attempt to add link library "EXPAT::EXPAT" to target "log4cxx" which is not  built in this directory.
  This is allowed only when policy CMP0079 is set to NEW. C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C++\Logging\log4cxx\master\src\src\CMakeLists.txt 4
{quote}
 

The already added "cmake_policy(SET CMP0079 NEW)" needs to be moved tot he top of the file to take EXPAT into account as well to workaround this problem.

Though, the already mentioned problem with "log4cxx.rc" comes up again:

 
{quote}Schweregrad Code Beschreibung Projekt Datei Zeile UnterdrückungszustandSchweregrad Code Beschreibung Projekt Datei Zeile UnterdrückungszustandFehler CMake Error at main/cpp/CMakeLists.txt:6 (add_library):  Cannot find source file:
    log4cxx.rc
  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm  .hpp .hxx .in .txx C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C++\Logging\log4cxx\master\src\src\main/cpp/CMakeLists.txt 6
{quote}
I couldn't find how I worked around that in the past... :-/

> Build problems using CMAKE and Visual Studio 2019 Community
> -----------------------------------------------------------
>
>                 Key: LOGCXX-510
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-510
>             Project: Log4cxx
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 0.11.0
>            Reporter: Thorsten Schöning
>            Assignee: Thorsten Schöning
>            Priority: Major
>             Fix For: 0.12.0
>
>         Attachments: CMP00079.png, CMakeSettings.json, cmake_settings_using_vs_gui 02.png, cmake_settings_using_vs_gui.zip, missing_log4cxx_rc.png, set_target_properties.png
>
>
> I just tested building log4cxx using CMAKE and Visual Studio 2019 Community. Things failed and I want to use this bug to document everything that I've found, because for some things I'm not sure how to handle them properly. Will create a new branch to maintain the fixes I came along, so that those can at best be later reviewed by others. The branch of interest is currently named "logcxx_510_cmake_vs2019_compat".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)