[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [clazy] /: CMakeLists.txt - remove CLAZY_MACPORTS option; use if(APPLE) instead
From:       Allen Winter <allen.winter () kdab ! com>
Date:       2016-11-01 14:05:39
Message-ID: E1c1Zh5-0006fh-KQ () code ! kde ! org
[Download RAW message or body]

Git commit d06a981605de9c3c4f7ab6bf2ef4de952ee345bf by Allen Winter.
Committed on 01/11/2016 at 14:04.
Pushed by winterz into branch 'master'.

CMakeLists.txt - remove CLAZY_MACPORTS option; use if(APPLE) instead
update README for MacPorts and Homebrew

CCBUG: 352896

M  +2    -3    CMakeLists.txt
M  +20   -3    README.md

http://commits.kde.org/clazy/d06a981605de9c3c4f7ab6bf2ef4de952ee345bf

diff --git a/CMakeLists.txt b/CMakeLists.txt
index def9211..9ca83df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS)
 add_definitions(-D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H)
 
-option(CLAZY_MACPORTS "Enable this option to build against llvm from MacPorts" OFF)
 option(CLAZY_INSTALL_NO_HEADERS "Enable this option to suppress installation of \
headers" OFF)  option(CLAZY_ON_WINDOWS_HACK "Enable this option if you're using a \
patched clang to support plugins on Windows" OFF)  if(CLAZY_ON_WINDOWS_HACK)
@@ -87,7 +86,7 @@ macro(add_clang_plugin name)
     target_link_libraries(${name} version.lib)
   endif()
 
-  if(CLAZY_MACPORTS)
+  if(APPLE)
     target_link_libraries(${name} LLVM)
   endif()
 
@@ -122,7 +121,7 @@ link_directories("${LLVM_INSTALL_PREFIX}/lib" \
${LLVM_LIBRARY_DIRS})  add_library(clazylib SHARED ${CLAZY_LIB_SRC})
 link_to_llvm(clazylib)
 
-if(CLAZY_MACPORTS)
+if(APPLE)
   target_link_libraries(clazylib LLVM)
 endif()
 
diff --git a/README.md b/README.md
index 6b07c2b..11ff17c 100644
--- a/README.md
+++ b/README.md
@@ -63,10 +63,11 @@ jom, nmake, git, cmake and cl should be in your PATH.
   > cmake -DCMAKE_INSTALL_PREFIX=c:\my_install_folder\llvm\ \
-DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles JOM" -DCLAZY_ON_WINDOWS_HACK=ON  > jom \
&& nmake install  ```
+
 --------------------------------------------------------------------------------
-# Build Instructions (macOS)
+# Build Instructions (macOS with MacPorts)
 
-#### Install clang and llvm from macports
+#### Install clang and llvm from MacPorts
 
 ```
 $ sudo port install clang-3.8 llvm-3.8
@@ -76,7 +77,23 @@ $ sudo port select --set clang mp-clang-3.8
 #### Build the clazy plugin
 ```
   $ export CXX=clang++
-  $ cmake -DCLAZY_MACPORTS=ON
+  $ cmake
+  $ make
+  $ make install
+```
+
+--------------------------------------------------------------------------------
+# Build Instructions (macOS with Homebrew)
+
+#### Install clang and llvm from Homebrew
+
+```
+$ brew install --with-clang llvm
+
+#### Build the clazy plugin
+```
+  $ export LLVM_ROOT=/usr/local/opt/llvm
+  $ cmake
   $ make
   $ make install
 ```


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic