# Copyright 2012 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# where to put generated libraries
set(LIBRARY_OUTPUT_PATH "${BUILD_OUTPUT_ROOT_DIRECTORY}/statestore")

# where to put generated binaries
set(EXECUTABLE_OUTPUT_PATH "${BUILD_OUTPUT_ROOT_DIRECTORY}/statestore")

add_library(Statestore STATIC
  failure-detector.cc
  query-resource-mgr.cc
  simple-scheduler.cc
  statestore.cc
  statestore-subscriber.cc
  query-schedule.cc
)

add_executable(statestored statestored-main.cc)
target_link_libraries(statestored ${IMPALA_LINK_LIBS})

# Binary used only for testing
add_executable(statestore-test-client statestore-test-client.cc)
target_link_libraries(statestore-test-client ${IMPALA_LINK_LIBS})

ADD_BE_TEST(simple-scheduler-test)
ADD_BE_TEST(statestore-test)

# Copyright 2012 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# where to put generated libraries
set(LIBRARY_OUTPUT_PATH "${BUILD_OUTPUT_ROOT_DIRECTORY}/statestore")

# where to put generated binaries
set(EXECUTABLE_OUTPUT_PATH "${BUILD_OUTPUT_ROOT_DIRECTORY}/statestore")

add_library(Statestore
  failure-detector.cc
  query-resource-mgr.cc
  simple-scheduler.cc
  statestore.cc
  statestore-subscriber.cc
  query-schedule.cc
)

add_executable(statestored statestored-main.cc)
target_link_libraries(statestored ${IMPALA_LINK_LIBS})

# Binary used only for testing
add_executable(statestore-test-client statestore-test-client.cc)
target_link_libraries(statestore-test-client ${IMPALA_LINK_LIBS})

ADD_BE_TEST(simple-scheduler-test)
ADD_BE_TEST(statestore-test)

Remove STATIC marker on libStatestore
Remove STATIC marker on libStatestore

Change-Id: If7fec2b7e4c598fcacf2823dc07e8fe2543bb3f2
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3890
Reviewed-by: Lenni Kuff <724b7df200764f5dc1b723c05ee6c6adabd11bb1@cloudera.com>
Tested-by: jenkins
