Skip to content

Commit

Permalink
MMVII: support cmake 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
meynardc committed Mar 8, 2024
1 parent f6d6d66 commit dbf1935
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions MMVII/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,21 @@ else()
unset(make_parallel_prefix)
endif()

if(CMAKE_VERSION VERSION_LESS "3.17")
set(rmdir_command remove_directory)
else()
set(rmdir_command rm -fr)
endif()

## distclean : clean + remove generated source files for symbolic calculus
add_custom_target(distclean
COMMAND ${make_parallel_prefix} ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --config $<CONFIG> --target clean
COMMAND ${make_parallel_prefix} ${CMAKE_COMMAND} -E rm -rf ${mmv2_gencode_dir}
COMMAND ${make_parallel_prefix} ${CMAKE_COMMAND} -E ${rmdir_command} ${mmv2_gencode_dir}
VERBATIM)

## full : generate source files for symbolic calculus and recompile
add_custom_target(full
COMMAND ${make_parallel_prefix} ${CMAKE_COMMAND} -E rm -rf ${mmv2_gencode_dir}
COMMAND ${make_parallel_prefix} ${CMAKE_COMMAND} -E ${rmdir_command} ${mmv2_gencode_dir}
COMMAND ${make_parallel_prefix} ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --config $<CONFIG>
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MMVII GenCodeSymDer
COMMAND ${make_parallel_prefix} ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --config $<CONFIG>
Expand Down

0 comments on commit dbf1935

Please sign in to comment.