Changeset 6486

Show
Ignore:
Timestamp:
04/12/07 12:06:09
Author:
robert
Message:

From Eric Wing, "Adding back missing search paths in FindOpenThreads?.cmake. Also fixed
a bug regarding when to set the debug version. It waited until both
include and library were set, but it shouldn't wait on include.

Also added a fix to the optional warning flags."

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OpenSceneGraph/trunk/CMakeLists.txt

    r6475 r6486  
    242242    # -Wshadow and -Woverloaded-virtual are also interesting flags, but OSG 
    243243    # returns too many hits. 
    244     # # FYI, if we do implement GNUCC, then -Wmissing-prototypes in another  
     244    # FYI, if we do implement GNUCC, then -Wmissing-prototypes in another  
    245245    # interesting C-specific flag. 
    246     SET(OSG_AGGRESSIVE_WARNING_FLAGS "-Wall -Wparentheses -Wformat=2 -Wno-long-long -Wno-import -pedantic -Wnewline-eof -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused") 
     246        # Also, there is a bug in gcc 4.0. Under C++, -pedantic will create 
     247        # errors instead of warnings for certain issues, including superfluous 
     248        # semicolons and commas, and the use of long long. -fpermissive seems 
     249        # to be the workaround.  
     250    SET(OSG_AGGRESSIVE_WARNING_FLAGS "-Wall -Wparentheses -Wformat=2 -Wno-long-long -Wno-import -pedantic -Wnewline-eof -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive") 
    247251ELSE(CMAKE_COMPILER_IS_GNUCXX) 
    248252    IF(MSVC) 
  • OpenSceneGraph/trunk/CMakeModules/FindOpenThreads.cmake

    r6442 r6486  
    2626  ${CMAKE_INSTALL_PREFIX}/include 
    2727        $ENV{OPENTHREADS_DIR}/include 
     28        $ENV{OPENTHREADS_DIR} 
    2829        $ENV{OSG_DIR}/include 
     30        $ENV{OSG_DIR} 
    2931        ~/Library/Frameworks 
    3032        /Library/Frameworks 
     
    4345        PATHS 
    4446        ${CMAKE_INSTALL_PREFIX}/lib 
     47        $ENV{OPENTHREADS_DIR}/lib64 
    4548        $ENV{OPENTHREADS_DIR}/lib 
     49        $ENV{OPENTHREADS_DIR} 
     50        $ENV{OSG_DIR}/lib64 
    4651        $ENV{OSG_DIR}/lib 
     52        $ENV{OSG_DIR} 
    4753        ~/Library/Frameworks 
    4854        /Library/Frameworks 
     
    6167        PATHS 
    6268        ${CMAKE_INSTALL_PREFIX}/lib 
     69        $ENV{OPENTHREADS_DIR}/lib64 
    6370        $ENV{OPENTHREADS_DIR}/lib 
     71        $ENV{OPENTHREADS_DIR} 
     72        $ENV{OSG_DIR}/lib64 
    6473        $ENV{OSG_DIR}/lib 
     74        $ENV{OSG_DIR} 
    6575        ~/Library/Frameworks 
    6676        /Library/Frameworks 
     
    7686) 
    7787 
    78 SET(OPENTHREADS_FOUND "NO") 
    79 IF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY) 
    80   SET(OPENTHREADS_FOUND "YES") 
    81   # MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY}) 
     88IF(OPENTHREADS_LIBRARY) 
    8289  IF(NOT OPENTHREADS_LIBRARY_DEBUG) 
    8390          #MESSAGE("-- Warning Debug OpenThreads not found, using: ${OPENTHREADS_LIBRARY}") 
     
    8592          SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}" CACHE FILEPATH "Debug version of OpenThreads Library (use regular version if not available)" FORCE) 
    8693  ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG) 
     94ENDIF(OPENTHREADS_LIBRARY) 
     95         
     96SET(OPENTHREADS_FOUND "NO") 
     97IF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY) 
     98  SET(OPENTHREADS_FOUND "YES") 
     99  # MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY}) 
    87100ENDIF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY) 
    88101