Skip to content

Commit

Permalink
Order CMake options before configure_file
Browse files Browse the repository at this point in the history
Summary:
The variables need to be defined before `configure_file` is invoked, otherwise
the wrong value will be used.

Reviewed By: zalecodez

Differential Revision: D52893954

fbshipit-source-id: dfffcea37a10c0e5b06532320a8fc6d40356bdbc
  • Loading branch information
Mingtao Yang authored and facebook-github-bot committed Jan 19, 2024
1 parent 20082fb commit 5c04392
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fizz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ else()
list(APPEND FIZZ_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR})
endif()

# Fizz build time options
option(FIZZ_BUILD_AEGIS "Compiles Fizz with AEGIS support (experimental)" OFF)

configure_file(fizz-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/generated/fizz/fizz-config.h)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/generated/fizz/fizz-config.h DESTINATION ${INCLUDE_INSTALL_DIR}/fizz/)

Expand Down Expand Up @@ -155,7 +158,6 @@ foreach(dir ${FIZZ_TEST_HEADER_DIRS})
${headers})
endforeach()

option(FIZZ_BUILD_AEGIS "Compiles Fizz with AEGIS support (experimental)" OFF)


if(FIZZ_BUILD_AEGIS)
Expand Down

0 comments on commit 5c04392

Please sign in to comment.