diff options
author | Brad King <brad.king@kitware.com> | 2020-01-28 16:59:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-28 18:57:05 (GMT) |
commit | a7b844d6d4135933808ff82ed149107f6e3e63cb (patch) | |
tree | b4fcef6c7347f587f0313229a558bd72033413c6 /Modules/CMakeAddFortranSubdirectory.cmake | |
parent | 228dc92b09fc02990247eee9c3448dd0154ba71a (diff) | |
download | CMake-a7b844d6d4135933808ff82ed149107f6e3e63cb.zip CMake-a7b844d6d4135933808ff82ed149107f6e3e63cb.tar.gz CMake-a7b844d6d4135933808ff82ed149107f6e3e63cb.tar.bz2 |
CMakeAddFortranSubdirectory: Simplfy logic to always build subdir
In the case that we use ExternalProject_Add to drive the subdirectory
build, replace the `forcebuild` step with the official `BUILD_ALWAYS`
option.
Issue: #20179
Diffstat (limited to 'Modules/CMakeAddFortranSubdirectory.cmake')
-rw-r--r-- | Modules/CMakeAddFortranSubdirectory.cmake | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake index c02aa2c..69a8417 100644 --- a/Modules/CMakeAddFortranSubdirectory.cmake +++ b/Modules/CMakeAddFortranSubdirectory.cmake @@ -149,17 +149,9 @@ function(cmake_add_fortran_subdirectory subdir) -P ${build_dir}/config_mingw.cmake BUILD_COMMAND ${CMAKE_COMMAND} -P ${build_dir}/build_mingw.cmake + BUILD_ALWAYS 1 INSTALL_COMMAND "" ) - # make the external project always run make with each build - externalproject_add_step(${project_name}_build forcebuild - COMMAND ${CMAKE_COMMAND} - -E rm -f - ${CMAKE_CURRENT_BUILD_DIR}/${project_name}-prefix/src/${project_name}-stamp/${project_name}-build - DEPENDEES configure - DEPENDERS build - ALWAYS 1 - ) # create imported targets for all libraries foreach(lib ${libraries}) add_library(${lib} SHARED IMPORTED GLOBAL) |