Files
intx/test/CMakeLists.txt
Paweł BylicaandGitHub 1caaf59ab6 cmake: Force MSVC standards conformance mode (#326)
Enable `-Zc:preprocessor` and `-permissive-` compiler flags when testing MSVC builds.
2024-10-09 11:13:05 +02:00

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()