Skip to content

Commit

Permalink
added build/not build option to enable global switch off with GBX_DIS…
Browse files Browse the repository at this point in the history
…ABLE_ALL var

git-svn-id: https://orca-robotics.svn.sf.net/svnroot/orca-robotics/orca/trunk@5681 534d5172-be3c-0410-9a3e-ccaa6372a113
  • Loading branch information
russo2503v committed Nov 12, 2009
1 parent 1438f68 commit ca3e4c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions cmake/BuildLibProjectInterfacesCpp.cmake
Expand Up @@ -4,34 +4,34 @@ set( _lib_version ${GBX_PROJECT_VERSION} )
GBX_ADD_LICENSE( LGPL )

set( build TRUE )
# GBX_REQUIRE_OPTION( build LIB ${_lib_name} ON )
GBX_REQUIRE_OPTION( build LIB ${_lib_name} ON )

if( build )
#
# Defines macros for parsing Slice source files.
#
include( ${ORCA_CMAKE_DIR}/Slice2Cpp.cmake )

#
# All Slice source files are defined in one place (loads ORCA_SLICE_SOURCE_FILES)
#
include( ${PROJECT_SOURCE_DIR}/src/interfaces/slice/${GBX_PROJECT_NAME_LOWER}/slice_sources.cmake )

#
# Work out the list of generated files from the list of slice sources
#
ORCA_GENERATE_SLICE2CPP_RULES( _gen_sources _gen_headers ${ORCA_SLICE_SOURCE_FILES} )

include( ${ORCA_CMAKE_DIR}/UseBasicRules.cmake )
include( ${ORCA_CMAKE_DIR}/UseIce.cmake )
include( ${ORCA_CMAKE_DIR}/UseLibProjectInterfaces.cmake )

include_directories( ${PROJECT_BINARY_DIR}/src/interfaces/cpp )

if( NOT ORCA_MOTHERSHIP )
include( ${ORCA_CMAKE_DIR}/UseOrca.cmake )
endif( NOT ORCA_MOTHERSHIP )

# IceStorm is not included in UseIce.cmake
set( _dep_libs IceStorm )

Expand All @@ -42,13 +42,13 @@ if( build )
if( NOT ORCA_MOTHERSHIP AND IS_SUPER_PROJECT )
add_dependencies( ${_lib_name} OrcaInterfaces )
endif( NOT ORCA_MOTHERSHIP AND IS_SUPER_PROJECT )
if( ORCA_MOTHERSHIP )

if( ORCA_MOTHERSHIP )
# only Orca installs generated headers
foreach( _gen_header ${_gen_headers} )
set( slice_generated_headers_full ${slice_generated_headers_full} ${CMAKE_CURRENT_BINARY_DIR}/${_gen_header} )
endforeach( _gen_header )

GBX_ADD_HEADERS( ${_lib_namespace} ${slice_generated_headers_full} )
endif( ORCA_MOTHERSHIP )

Expand Down
12 changes: 6 additions & 6 deletions src/libs/orcaice/CMakeLists.txt
Expand Up @@ -2,7 +2,7 @@ ORCA_SET_LIBRARY_NAME( OrcaIce )
GBX_ADD_LICENSE( LGPL )

set( build TRUE )
# This is one of fundamental libs. It is not optional.
GBX_REQUIRE_OPTION( build LIB ${LIB_NAME} ON )

set( dep_libs GbxUtilAcfr GbxIceUtilAcfr HydroUtil )
GBX_REQUIRE_LIBS( build LIB ${LIB_NAME} ${dep_libs} )
Expand All @@ -16,16 +16,16 @@ if( build )
include( ${ORCA_CMAKE_DIR}/UseHydroIceUtil.cmake )
# debug only! comment out when finished.
# include( ${ORCA_CMAKE_DIR}/UseOrcaIfaceUtil.cmake )

file( GLOB hdrs *.h )
file( GLOB srcs *.cpp detail/*.cpp )

GBX_ADD_LIBRARY( ${LIB_NAME} DEFAULT ${LIB_VERSION} ${srcs} )

target_link_libraries( ${LIB_NAME} ${dep_libs} )

GBX_ADD_HEADERS( ${LIB_INSTALL} ${hdrs} )

if( ORCA_BUILD_TESTS )
add_subdirectory( test )
add_subdirectory( detail/test )
Expand Down
10 changes: 5 additions & 5 deletions src/libs/orcaobj/CMakeLists.txt
Expand Up @@ -3,7 +3,7 @@ set( LIB_INSTALL orcaobj )
GBX_ADD_LICENSE( LGPL )

set( build TRUE )
# This is one of fundamental libs. It is not optional (but maybe it should change)
GBX_REQUIRE_OPTION( build LIB ${LIB_NAME} ON )

# these 2 lines just check prereq's, but linking is specified in the macros below.
set( dep_libs GbxUtilAcfr GbxIceUtilAcfr HydroIceUtil OrcaIfaceUtil )
Expand All @@ -15,14 +15,14 @@ if( build )
include( ${ORCA_CMAKE_DIR}/UseOrcaIce.cmake )
include( ${ORCA_CMAKE_DIR}/UseLibProjectInterfaces.cmake )
include( ${ORCA_CMAKE_DIR}/UseLibProjectIfaceUtil.cmake )

file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )

GBX_ADD_LIBRARY( ${LIB_NAME} DEFAULT ${LIB_VERSION} ${srcs} )

GBX_ADD_HEADERS( ${LIB_INSTALL} ${hdrs} )

if( ORCA_BUILD_TESTS )
add_subdirectory( test )
endif( ORCA_BUILD_TESTS )
Expand Down

0 comments on commit ca3e4c3

Please sign in to comment.