Skip to content

Commit 7a0d20e

Browse files
committed
fix: Add MSVC flag
- Previously, The MSVC version was not well recognized --> Hence, there was some bugy macro specific to MSVC/c++20 - This Commit resolve the issue and I am now able to compile the problematic testcase - Question : SHould we add this flag not at the tets level but at the main CMakeFiles level ?
1 parent 2f2e5a8 commit 7a0d20e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Intel"
7474
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -DSKIP_ON_WERROR")
7575
endif()
7676
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
77-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_cxx_std_flag} /MP /bigobj")
77+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_cxx_std_flag} /Zc:__cplusplus /MP /bigobj")
7878
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
7979
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
8080
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)

0 commit comments

Comments
 (0)