clangupc / clang-upc

Clang UPC Front-End
https://clangupc.github.io/
Other
16 stars 5 forks source link

improper use of CMake's "APPLE" #59

Closed PHHargrove closed 10 years ago

PHHargrove commented 10 years ago

Currently runtime/libupc/CMakeLists.txt contains

if(APPLE)
  set(config_dir darwin)
else()
  set(config_dir default)
endif()

However CMake docs say:

APPLE
    is TRUE on Apple systems. Note this does *not* imply the system is Mac OS X,
    only that __APPLE__ is #defined in C/C++ header files. Obtain more specific
    system information via CMAKE_SYSTEM_VERSION i.e.
    IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin"), then it's Mac OS X.
nenadv commented 10 years ago

Don't know about this one. 2.8.12 and 3.0 documentation explicitly list this as Max OS X - http://www.cmake.org/cmake/help/v3.0/variable/APPLE.html#variable:APPLE

APPLE

True if running on Mac OS X.
Set to true on Mac OS X.
PHHargrove commented 10 years ago

Ok, since 2.18.x is the minimum supported version of CMake then everything should be fine as-is.