From 6ae5a0ea574870f359322839886c36ad7e0aa2b3 Mon Sep 17 00:00:00 2001 From: faisal-bhuiyan Date: Wed, 2 Oct 2024 11:52:30 -0600 Subject: [PATCH] Make slight adjustments to how OpenFAST_ADI is built - build type follows openturbine build type - trailing spaces removed --- cmake/Dependencies.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 0816646d..4742ff67 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -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")