Bug 145506 - cmake error on Solaris - Uses SunOS directory when directory is called Solaris
Summary: cmake error on Solaris - Uses SunOS directory when directory is called Solaris
Status: RESOLVED FIXED
Alias: None
Product: ksysguard
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-16 15:55 UTC by Steve Evans
Modified: 2007-05-16 16:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Cope with difference between ${CMAKE_SYSTEM_NAME} and directory name on Solaris (1019 bytes, patch)
2007-05-16 15:57 UTC, Steve Evans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Evans 2007-05-16 15:56:00 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.6 
OS:                Solaris

I get this cmake error on Solaris

CMake Error: Error in cmake code at
/cad4/stevee/kde-svn/kdebase/workspace/ksysguard/ksysguardd/CMakeLists.txt:25:
ADD_SUBDIRECTORY given source "SunOS" which is not an existing directory.

This is because CMakeLists.txt has:

if( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
  add_subdirectory( "FreeBSD" )
  include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/FreeBSD )
else( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
  add_subdirectory( ${CMAKE_SYSTEM_NAME} )
  include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME} )
endif( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )

and ${CMAKE_SYSTEM_NAME} is "SunOS", but the directory is called Solaris. I changed CMakeLists.txt to 

if( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
  add_subdirectory( "FreeBSD" )
  include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/FreeBSD )
else( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )
  if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
    add_subdirectory( "Solaris" )
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Solaris )
  else( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
    add_subdirectory( ${CMAKE_SYSTEM_NAME} )
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME} )
  endif( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
endif( ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" )

which fixed it
Comment 1 Steve Evans 2007-05-16 15:57:20 UTC
Created attachment 20592 [details]
Cope with difference between ${CMAKE_SYSTEM_NAME} and directory name on Solaris
Comment 2 Greg Martyn 2007-05-16 16:18:24 UTC
Fixed in r665302.