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

Need to fix compilation flag lost in CMake refactor #1005

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ option(
option(MANIFOLD_EXCEPTIONS "Build manifold with exception enabled" ON)
option(MANIFOLD_EXPORT "Build mesh export (via assimp) utility library" OFF)
option(MANIFOLD_PAR "Enable Parallel backend" OFF)
option(
MANIFOLD_OPTIMIZED
"Force Optimized build, even with debugging enabled"
OFF
)
option(MANIFOLD_TEST "Enable testing suite" ON)
option(BUILD_SHARED_LIBS "Build shared library" ON)
include(CMakeDependentOption)
Expand Down Expand Up @@ -171,6 +176,13 @@ else()
list(APPEND WARNING_FLAGS -Werror)
endif()
list(APPEND MANIFOLD_FLAGS ${WARNING_FLAGS})
if(
MANIFOLD_OPTIMIZED
OR "${CMAKE_BUILD_TYPE}" STREQUAL "Release"
OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"
)
list(APPEND MANIFOLD_FLAGS -O3)
endif()
endif()

if(CODE_COVERAGE AND NOT MSVC)
Expand Down
Loading