Skip to content

Commit

Permalink
Test compilation with clang-cl
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Aug 18, 2023
1 parent 5337b9e commit 7d51054
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/windows-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mkdir %BUILD_DIR%
cd %BUILD_DIR%
cmake --version || EXIT /B 1
cmake -DCMAKE_UNITY_BUILD=%UNITY_BUILD% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -GNinja ^
-DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_CXX_COMPILER="clang-cl.exe" ^
.. || EXIT /B 1
type variables.bat
call variables.bat
Expand Down
6 changes: 3 additions & 3 deletions source/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")

# Only do MSVC code analysis on CI
if(DEFINED ENV{CI})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /analyze")
endif()
#if(DEFINED ENV{CI})
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /analyze")
#endif()

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \
/DYNAMICBASE /NXCOMPAT /MAP /debug")
Expand Down
4 changes: 2 additions & 2 deletions source/thirdparty/cryptopp/config_cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@
#if defined(__clang__)
# if __EXCEPTIONS && __has_feature(cxx_exceptions)
# if __cpp_lib_uncaught_exceptions >= 201411L
# define CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS 1
//# define CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS 1
# endif
# endif
#elif (CRYPTOPP_MSC_VERSION >= 1900) || (__INTEL_COMPILER >= 1800) || \
(CRYPTOPP_GCC_VERSION >= 60000) || (__cpp_lib_uncaught_exceptions >= 201411L)
# define CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS 1
//# define CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS 1
#endif // uncaught_exceptions compilers

#endif // CRYPTOPP_CXX17
Expand Down
2 changes: 1 addition & 1 deletion source/thirdparty/cryptopp/config_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// Some relevant bug reports can be found at:
// * Clang: http://github.com/weidai11/cryptopp/issues/147
#if (defined(_MSC_VER) && defined(__clang__) && !(defined( __clang_analyzer__)))
# error: "Unsupported configuration"
//# error: "Unsupported configuration"
#endif

// Windows platform
Expand Down

0 comments on commit 7d51054

Please sign in to comment.