From 829c842df144bbb94b2906dd59ce6d94d20f5181 Mon Sep 17 00:00:00 2001 From: Santiago Zanella-Beguelin Date: Fri, 17 May 2024 11:51:42 +0100 Subject: [PATCH] Fix build --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47d6f695..cbab1cde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,10 +56,12 @@ set(hacl_VERSION_TWEAK "") # needed. # We copy a default config from config/default_config.cmake or # config/default_config_msvc.cmake -if(USE_MSVC) - configure_file(${PROJECT_SOURCE_DIR}/config/default_config_msvc.cmake ${PROJECT_SOURCE_DIR}/build/config.cmake COPYONLY) -else() - configure_file(${PROJECT_SOURCE_DIR}/config/default_config.cmake ${PROJECT_SOURCE_DIR}/build/config.cmake COPYONLY) +if(NOT EXISTS ${PROJECT_SOURCE_DIR}/build/config.cmake) + if(USE_MSVC) + configure_file(${PROJECT_SOURCE_DIR}/config/default_config_msvc.cmake ${PROJECT_SOURCE_DIR}/build/config.cmake COPYONLY) + else() + configure_file(${PROJECT_SOURCE_DIR}/config/default_config.cmake ${PROJECT_SOURCE_DIR}/build/config.cmake COPYONLY) + endif() endif() # Now include the config.