Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 395189 - dev-util/cmake - emits annoying warning when including SDL_sound. (with patch)
Summary: dev-util/cmake - emits annoying warning when including SDL_sound. (with patch)
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2011-12-18 19:48 UTC by Peter Asplund
Modified: 2012-09-22 22:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to get rid of warning (FindSDL_sound.cmake.patch,641 bytes, patch)
2011-12-18 19:56 UTC, Peter Asplund
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Asplund 2011-12-18 19:48:03 UTC
I don't know if this should really be going upstream, but I figured I might just put it here, including patch.

When including dependency to SDL_sound, I always get an annoying warning saying 

"CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.6)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done"

but since I've religiously added that line in every file in my project, I realized it must be somewhere else. So I checked my CMakeTmp-directory. There lies another CMakeLists.txt which is generated at build time, and is used by the SDL_sound-modules to check sound dependencies for the system:

$ cat CMakeTmp/CMakeLists.txt 
PROJECT(DetermineSoundLibs)
        INCLUDE_DIRECTORIES(/usr/include/SDL /usr/include/SDL)
        ADD_EXECUTABLE(DetermineSoundLibs DetermineSoundLibs.c)
        TARGET_LINK_LIBRARIES(DetermineSoundLibs  "/usr/lib64/libSDL_sound.so" "/usr/lib64/libSDLmain.a" "/usr/lib64/libSDL.so" "-lpthread")

So THIS is the file which is actually lacking the cmake_minimum line of code.

So by patching the FindSDL_sound.cmake in /usr/share/cmake/Modules/ I could finally get rid of it. I'm including the patch, hope you like it!
Comment 1 Peter Asplund 2011-12-18 19:56:07 UTC
Created attachment 296303 [details, diff]
Patch to get rid of warning

I also fixed the indent. Just a one liner!
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-19 13:12:14 UTC
./Modules/FindSDL_sound.cmake
Comment 3 Peter Asplund 2011-12-20 18:08:00 UTC
Whut? Yes I guess that's the relative path to it...
Comment 4 Johannes Huber (RETIRED) gentoo-dev 2011-12-22 21:54:39 UTC
Fixed in =dev-util/cmake-2.8.6-r4. Which is under stabilisation, already stable for amd64, x86, hppa. See bug #391425.
Comment 5 Peter Asplund 2012-09-22 22:10:36 UTC
This was said to be fixed in 2.8.6 but I see it in 2.8.9.