mirror of
https://github.com/luxfi/intx.git
synced 2026-10-30 16:22:26 +00:00
Enable `-Zc:preprocessor` and `-permissive-` compiler flags when testing MSVC builds.
27 lines
761 B
CMake
27 lines
761 B
CMake
# intx: extended precision integer library.
|
|
# Copyright 2019 Pawel Bylica.
|
|
# Licensed under the Apache License, Version 2.0.
|
|
|
|
add_compile_options(
|
|
$<$<CXX_COMPILER_ID:MSVC>:-wd5030> # allow unknown attributes
|
|
$<$<CXX_COMPILER_ID:MSVC>:-permissive-> # standards conformance
|
|
$<$<CXX_COMPILER_ID:MSVC>:-Zc:preprocessor> # preprocessor conformance mode
|
|
|
|
# prevent gtest build failure on 32-bit arch
|
|
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<EQUAL:${CMAKE_SIZEOF_VOID_P},4>>:-Wno-restrict>
|
|
)
|
|
|
|
add_subdirectory(analysis)
|
|
add_subdirectory(experimental)
|
|
add_subdirectory(utils)
|
|
add_subdirectory(integration)
|
|
add_subdirectory(unittests)
|
|
|
|
if(INTX_BENCHMARKING)
|
|
add_subdirectory(benchmarks)
|
|
endif()
|
|
|
|
if(INTX_FUZZING)
|
|
add_subdirectory(fuzzer)
|
|
endif()
|