Skip to content

Commit

Permalink
Add /Zc:__cplusplus
Browse files Browse the repository at this point in the history
Trying to build tests will fail if it's only added to wpiutil's list
  • Loading branch information
Gold856 committed Jul 12, 2024
1 parent f60e465 commit 16a9499
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ include(OptionValidation)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
if(MSVC)
add_compile_options(/Zc:__cplusplus)
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${WPILIB_BINARY_DIR}/lib)
Expand Down
2 changes: 1 addition & 1 deletion wpiutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ target_compile_features(wpiutil PUBLIC cxx_std_20)
if(MSVC)
target_compile_options(
wpiutil
PUBLIC /permissive- /Zc:preprocessor /Zc:throwingNew /MP /bigobj /utf-8
PUBLIC /permissive- /Zc:preprocessor /Zc:__cplusplus /Zc:throwingNew /MP /bigobj /utf-8
)
target_compile_definitions(wpiutil PRIVATE -D_CRT_SECURE_NO_WARNINGS)
endif()
Expand Down

0 comments on commit 16a9499

Please sign in to comment.