Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify build workflow #469

Merged
merged 11 commits into from
Jun 26, 2024
Prev Previous commit
Next Next commit
Always copy over default config from config/default_config_[msvc].cmake
  • Loading branch information
s-zanella committed May 20, 2024
commit 84e70aa46f64ae945fd80cf7e89954661182f773
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ endif()
set(hacl_VERSION_TWEAK "")

# Load global config from external file.
# This file must be generated before running cmake with ./mach.py --configure
# For a Clang build, this file can be generated before running cmake with
# ./mach.py --configure
# If the build is invoked through ./mach.py, a separate configuration is not
# needed.
# If the file is not present, i.e. cmake was invoked directly, we copy the default
# config from config/default_config.cmake
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/build/config.cmake)
configure_file(${PROJECT_SOURCE_DIR}/config/default_config.cmake ${PROJECT_SOURCE_DIR}/build/config.cmake COPYONLY)
# 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)
endif()

# Now include the config.
Expand Down