[ 
https://issues.apache.org/jira/browse/LOGCXX-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17146047#comment-17146047
 ] 

Thorsten Schöning commented on LOGCXX-510:
------------------------------------------

{quote}Hmm, I'm able to compile perfectly fine using VS2019(after compiling 
APR, APR-util, and expat of course).{quote}

I just opened VS, said to just want to open some folder to work on the 
containing code and VS did things automatically when opening the CMAKE-files 
afterwards. I didn't care about APR etc. yet, but the printed errors didn't 
seem to be related anyway at first. When I'm doing the same right now, I get 
APR-related errors:

{quote}1> [CMake] CMake Error at C:/Program Files (x86)/Microsoft Visual 
Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164
 (message):
1> [CMake]   APR_INCLUDE_DIR (missing: APR_LIBRARIES)
1> [CMake] Call Stack (most recent call first):
1> [CMake]   C:/Program Files (x86)/Microsoft Visual 
Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445
 (_FPHSA_FAILURE_MESSAGE)
1> [CMake]   src/cmake/FindAPR.cmake:57 (find_package_handle_standard_args)
1> [CMake]   CMakeLists.txt:16 (find_package)
1> [CMake] -- Configuring incomplete, errors occurred!
{quote}

So maybe the order of execution of whatever really has an influence of what is 
considered an error when. I love the fun build tools regularly introduce into 
work... :-/

{quote}Are you running the non-bundled version of CMake?  Do you have 
cygwin/mingw on your PATH?{quote}

No, issuing "cmake" on the shell fails as well and VS prints the following in 
the console output:

{quote}1> Befehlszeile: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL 
STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"
  -G "Ninja" 
-DCMAKE_INSTALL_PREFIX:PATH="C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C++\Logging\log4cxx\0.11.0-SNAPSHOT\src\out\install\x64-Debug
 (Standard)" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft 
Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/HostX64/x64/cl.exe"  
-DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES 
(X86)\MICROSOFT VISUAL 
STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe"
 
"C:\Users\tschoening\Documents\Svn\Src\Libs\trunk\C++\Logging\log4cxx\0.11.0-SNAPSHOT\src"
 2>&1"{quote}

{quote}Alternatively, could your path be too deep?  Windows can act funny if 
you have too many characters in the path.  I'm not sure if you're there yet, 
but that path does look very long.{quote}

I's just ~120 chars, that shouldn't be a problem yet. And to my surprise it 
seems that CMAKE properly supports long Unicode paths on Windows anyway:

{quote}[...]It also mentions the \\?\ UNC prefix for accessing paths beyond the 
limit with no special settings.  CMake internally uses that extended path 
syntax when accessing Windows filesystem APIs, and CMake itself has no problem 
using long paths.{quote}

https://gitlab.kitware.com/cmake/cmake/-/issues/19675#note_621318

> 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
>         Attachments: CMP00079.png, 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)

Reply via email to