diff --git a/CMakeLists.txt b/CMakeLists.txt index a459f69..436d015 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,9 +104,18 @@ endif() set( FCKIT_LIBRARIES fckit ) ################################################################################################ +# find fypp + +find_program(FYPP fypp) +if( FYPP ) + ecbuild_info("fckit found fypp: ${FYPP}") +endif() + # sources -set( FYPP ${CMAKE_CURRENT_SOURCE_DIR}/tools/fckit-eval.sh ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/fckit-fypp.py ) +if( NOT FYPP ) + set( FYPP ${CMAKE_CURRENT_SOURCE_DIR}/tools/fckit-eval.sh ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/fckit-fypp.py ) +endif() set( FCTEST_GENERATOR ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/fctest-generate-runner.py ) include( fckit_preprocess_fypp ) include( add_fctest ) @@ -127,7 +136,9 @@ if( ECBUILD_INSTALL_FORTRAN_MODULES ) endif() if( NOT PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME ) set( FCTEST_GENERATOR ${FCTEST_GENERATOR} PARENT_SCOPE ) - set( FYPP ${FYPP} PARENT_SCOPE ) + if( NOT FYPP ) + set( FYPP ${FYPP} PARENT_SCOPE ) + endif() endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/add_fctest.cmake ADD_FCTEST) file(READ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/fckit_preprocess_fypp.cmake FCKIT_PREPROCESS_FYPP )