direwolf/cmake/modules/FindCompiler.cmake
ra1nb0w 0f92f463f4
github actions implementation (#396)
* Create codeql-analysis.yml

* cmake: add support for Visual Studio 2019

* enable github actions (aka continuous integration)

basic implementation to enable github actions with:
- triggered each push or pull request
- built on ubuntu (multiple version), macOS, windows
- the binary has debug facilities enabled
- ignore any commit/push on the .github folder
- run all tests
- create an archive with binaries (available for 90 days)
- can manually triggered setting custom cmake flags

* cmake: fix MSVC check

* github actions: remove ubuntu 18.04; add ubuntu 22.04

* github actions: fix windows ci

---------

Co-authored-by: wb2osz <wb2osz@comcast.net>
2023-01-28 16:07:56 -05:00

16 lines
568 B
CMake

# Clang or AppleClang (see CMP0025)
if(NOT DEFINED C_CLANG AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(C_CLANG 1)
elseif(NOT DEFINED C_GCC AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(C_GCC 1)
elseif(NOT DEFINED C_MSVC AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(C_MSVC 1)
if(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS_EQUAL 1929)
set(VS2019 ON)
elseif(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
set(VS2017 ON)
elseif(MSVC_VERSION GREATER 1899 AND MSVC_VERSION LESS 1910)
set(VS2015 ON)
endif()
endif()