Skip to content

Commit

Permalink
Make slight adjustments to how OpenFAST_ADI is built
Browse files Browse the repository at this point in the history
- build type follows openturbine build type
- trailing spaces removed
  • Loading branch information
faisal-bhuiyan committed Oct 2, 2024
1 parent b516270 commit 6ae5a0e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,29 @@ function(openturbine_setup_dependencies)
message(STATUS "Building OpenFAST AerodynInflow (ADI) library")
include(ExternalProject)
ExternalProject_Add(OpenFAST_ADI
PREFIX ${CMAKE_BINARY_DIR}/external/OpenFAST_ADI
PREFIX ${CMAKE_BINARY_DIR}/external
GIT_REPOSITORY https://github.com/OpenFAST/openfast.git
GIT_TAG dev # Use the "dev" branch
GIT_SHALLOW TRUE # Clone only the latest commit
GIT_SUBMODULES_RECURSE OFF # Avoid unnecessary submodule cloning
GIT_SUBMODULES "" # Skip downloading r-test
CMAKE_ARGS
-DBUILD_TESTING=OFF # Disable testing
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} # Use the same build type as the main project
BUILD_IN_SOURCE OFF # Build in a separate directory for cleaner output
BINARY_DIR ${CMAKE_BINARY_DIR}/OpenFAST_ADI_build
# Build only the aerodyn_inflow_c_binding target and do it sequentially (avoid parallel build)
BUILD_COMMAND ${CMAKE_COMMAND} --build . --target aerodyn_inflow_c_binding -- -j 1
INSTALL_COMMAND
# Copy the built library to the tests directory
${CMAKE_COMMAND} -E copy
${CMAKE_BINARY_DIR}/OpenFAST_ADI_build/modules/aerodyn/libaerodyn_inflow_c_binding${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/tests/unit_tests/
${CMAKE_BINARY_DIR}/OpenFAST_ADI_build/modules/aerodyn/${CMAKE_SHARED_LIBRARY_PREFIX}aerodyn_inflow_c_binding${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/tests/unit_tests/aerodyn_inflow_c_binding.dll
)
endif()

# Conditionally add external project to build the ROSCO Controller library
if(OpenTurbine_BUILD_ROSCO_CONTROLLER)
if (NOT ROSCO_BUILD_TAG)
if (NOT ROSCO_BUILD_TAG)
set(ROSCO_BUILD_TAG "v2.9.4")
endif()
message(STATUS "Building ROSCO Controller library")
Expand Down

0 comments on commit 6ae5a0e

Please sign in to comment.