Skip to content

Commit 3f7caa7

Browse files
committed
Update libenvpp.cmake to redefine PPC_FMT_FLAGS with exception handling flags for both Windows and non-Windows platforms.
1 parent 68f6b42 commit 3f7caa7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/libenvpp.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ include_directories(${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/include)
22
include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/external/fmt/include)
33

44
if(WIN32)
5-
set(PPC_FMT_DISABLE_CONSTEVAL "/DFMT_CONSTEVAL=inline")
5+
set(PPC_FMT_FLAGS "/EHsc /DFMT_CONSTEVAL=inline")
66
else()
7-
set(PPC_FMT_DISABLE_CONSTEVAL "-DFMT_CONSTEVAL=inline")
7+
set(PPC_FMT_FLAGS "-fexceptions -DFMT_CONSTEVAL=inline")
88
endif()
99

1010
include(ExternalProject)
@@ -20,7 +20,7 @@ ExternalProject_Add(ppc_libenvpp
2020
-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
2121
-DCMAKE_CXX_STANDARD_REQUIRED=ON
2222
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
23-
-DCMAKE_CXX_FLAGS=${PPC_FMT_DISABLE_CONSTEVAL}
23+
-DCMAKE_CXX_FLAGS=${PPC_FMT_FLAGS}
2424
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --config ${CMAKE_BUILD_TYPE} --parallel
2525
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/install"
2626
)

0 commit comments

Comments
 (0)