Skip to content

Commit

Permalink
Only built control if both matlab AND snopt are present
Browse files Browse the repository at this point in the history
  • Loading branch information
wxmerkt committed Feb 25, 2016
1 parent 21566d5 commit 9424bb9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions software/control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ cmake_minimum_required(VERSION 2.6.0)
set(POD_NAME control)
include(cmake/pods.cmake)

# check whether matlab is present, else skip the entire control directory
# check whether snopt is available, else skip the control/matlab directory
pods_find_pkg_config(snopt_c)
if (NOT snopt_c_FOUND)
message(WARNING "SNOPT not found, skipping control/matlab")
endif()

# check whether matlab is present, else skip the control/matlab directory
find_program(matlab matlab)
if (NOT matlab)
message(WARNING "Matlab not found, skipping control")
Expand Down Expand Up @@ -48,7 +54,7 @@ endif()

include_directories(${INCLUDE_INSTALL_PATH})

if (matlab)
if (matlab AND snopt_c_FOUND)
add_subdirectory(src)
add_subdirectory(matlab/@QPReactiveRecoveryPlan)
endif()
Expand Down Expand Up @@ -91,7 +97,6 @@ if (matlab)
COMMAND testAtlasFallDetector)
endif()

#find_program(matlab matlab)
#if (NOT matlab-NOTFOUND)
# add_test(NAME MATLAB_Unit_Tests
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Expand Down

0 comments on commit 9424bb9

Please sign in to comment.