remove error on apple/unix and set platform string

This commit is contained in:
Lukas Böger 2021-05-31 08:39:15 +01:00
parent 83aefd12d0
commit 434a36f0b9

View file

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