From 434a36f0b9c4f3aa38a1ab680d04e527c5ca6986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20B=C3=B6ger?= Date: Mon, 31 May 2021 08:39:15 +0100 Subject: [PATCH] remove error on apple/unix and set platform string --- CMakeLists.txt | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c02b5b82..5c0bde2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,14 +15,7 @@ project(chibi-scheme LANGUAGES C VERSION ${version} include(CheckIncludeFile) -if(APPLE) - message(FATAL_ERROR - "DYLD platforms are not supported with this CMakeLists.txt. Use Makefile instead.") -endif() -if(UNIX) - message(FATAL_ERROR - "UNIX platforms are not supported with this CMakeLists.txt. Use Makefile instead.") endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -257,8 +250,20 @@ endif() if(WIN32) set(platform "windows") +elseif(CYGWIN) + set(platform "cygwin") +elseif(APPLE) + set(platform "macosx") +elseif(CMAKE_SYSTEM MATCHES "[Bb][Ss][Dd]") + set(platform "bsd") +elseif(CMAKE_SYSTEM MATCHES "[Aa]ndroid") + set(platform "android") +elseif(CMAKE_SYSTEM MATCHES "[Ss]un[Oo][Ss]") + set(platform "solaris") +elseif (CMAKE_SYSTEM MATCHES "[Ll]inux") + set(platform "linux") else() - set(platform "unknown") + set(platform "unix") endif()