Notes |
|
(0036331)
|
Brad King
|
2014-07-09 09:27
|
|
|
|
(0036336)
|
Brad King
|
2014-07-10 10:09
|
|
Copying an email-sent comment from the mailing list: http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10447/focus=10461 [^]
On 07/10/2014 12:10 AM, Greg Jung wrote:
> The CMake module scripting is weak regarding the variable that should be taking care of this,
> CMAKE_SYSTEM_PREFIX_PATH (i.e., /usr; /opt) will be used in find_path (after appending /include)
> and for find_library(after appending /lib) - according to cmake.html documentation. For my mingw/msys
> builds I set this and the /include, /lib mostly located in platform/MingW.cmake:
> ----------------
> if(MSYS)
> # enhance the system prefix path. (picks up /Mingw/lib)
> find_path( MINGWPATH msys
> PATH ${CMAKE_USR_PATH}/../../
> NO_DEFAULT_PATH)
> list(APPENDCMAKE_SYSTEM_PREFIX_PATH ${MINGWPATH} )
> list(APPEND CMAKE_SYSTEM_INCLUDE_PATH ${MINGWPATH}/include )
> list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGWPATH}/lib )
> -------
> then LDFLAGS is inspected:
> ____
> set(LDFLAGS "$ENV{LDFLAGS}")
> if(LDFLAGS)
> message(STATUS "\n"
> " <Platform/Mingw> inspecting LDFLAGS: ${LDFLAGS}")
> string( REGEX MATCHALL "-L([^\" ]+)" librarylist
> "${LDFLAGS}")
> foreach(element IN LISTS librarylist)# LDFLAGS is more specific.
> ------------ etc., leading to
> message(STATUS
> "<Platform/Mingw> adding system library path: ${library}")
> list(INSERT CMAKE_SYSTEM_LIBRARY_PATH 0 ${library})
> list(INSERT CMAKE_SYSTEM_INCLUDE_PATH 0 ${library}/../include )
> ------------------------------------------------------- |
|
|
(0036338)
|
Brad King
|
2014-07-10 10:25
|
|
> imho, the value of CPPFLAGS should be honoured here
CPPFLAGS has no defined behavior for CMake. See 0012928. |
|
|
(0036341)
|
Fritz H
|
2014-07-10 11:15
|
|
reverting this one:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e4a2c7e [^]
results in previous behaviour, i.e., bootstrap/gmake succeed, specifying -I... with CPPFLAGS, and -L/-R... with LDFLAGS
but taking a closer look reveals that "previous behaviour" is actually: ignore ncurses completely. otoh, libidn and libiconv, also installed below /var/imb/..., are found and used as expected.
activating patch 0e4a2c7e results in using libncurses from /var/imb/lib but
searching ncurses.h in /usr/include which clearly does not work.
looking at FindCurses.cmake, the following changes worked for me
@@ -104,9 +104,9 @@
find_file(CURSES_HAVE_CURSES_H curses.h
HINTS "${_cursesParentDir}/include")
- find_path(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h
+ find_path(CURSES_NCURSES_INCLUDE_PATH ncurses/ncurses.h ncurses.h
ncurses/curses.h)
- find_path(CURSES_NCURSES_INCLUDE_PATH curses.h
+ find_path(CURSES_CURSES_INCLUDE_PATH curses.h
HINTS "${_cursesParentDir}/include")
# for compatibility with older FindCurses.cmake this has to be in the cache
though in my opinion both changes fix an error / misconception, i can not really judge all the consequences of what i did here :-) |
|
|
(0036345)
|
Brad King
|
2014-07-10 14:22
|
|
|
|
(0036355)
|
Fritz H
|
2014-07-11 08:47
|
|
trying to build cmake-3.0.0 using FindCurses.cmake from fcca1eb9 does not work for me, compilation of the files in Source/CursesDialog/form/ fails due to non-found include files
ncurses include files, at least recent versions, get installed below __includepath__/ncurses/, and expect to be included via #include <ncurses/something.h>
without further measures you even don't get a __includepath__/ncurses.h when compiling/installing recent ncurses from source (e.g., on suse, a sym link ncurses.h -> ncurses/ncurses.h is added to the ncurses package)
so, find_path really should look for ncurses/ncurses.h
looking additionally for ncurses.h after ncurses/ncurses.h shouldn't hurt as find_path returns after the first match (doesn't it?) -- i don't remember the history of the ncurses software right now, so i can't tell whether old versions only installed __includepath__/ncurses.h |
|
|
(0036361)
|
Brad King
|
2014-07-14 09:16
|
|
Re 0015011:0036355: Thanks for testing.
Ugh, my entire rewrite was based on the incorrect assumption that the ncurses/ layout was an artifact of the early find module design and not an actual requirement of the headers. The modern ncurses.h on my Debian system does not do that.
I've reverted the change linked in 0015011:0036345 from 'next'. It was never merged to 'master'. I'll revise with the ncurses/ layout in mind. |
|
|
(0036373)
|
Brad King
|
2014-07-14 11:27
|
|
|
|
(0036376)
|
Fritz H
|
2014-07-14 13:37
|
|
|
|
(0036380)
|
Brad King
|
2014-07-14 15:11
|
|
Re 0015011:0036376: Thanks for testing. The rewrite of FindCurses is too big a change to put in a patch release (e.g. 3.0.1) but this can go in 3.1. It should still be possible to build CMake 3.0 without the change by manually setting the find results correctly with -D... options. |
|
|
(0038711)
|
Robert Maynard
|
2015-05-04 09:05
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|