From f3f9230280c74f7d35cc7bbe950f2029e22651fe Mon Sep 17 00:00:00 2001 From: matken11235 Date: Tue, 29 Jan 2019 16:23:15 +0900 Subject: [PATCH 1/3] Fix CMakeLists.txt --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c0c91b9a..8f9df2eb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,10 @@ endif() include_directories( "/usr/local/include" ) link_directories( "/usr/local/lib" ) -include_directories( "/usr/local/opt/openssl/include" ) -link_directories( "/usr/local/opt/openssl/lib" ) +if(${APPLE}) + include_directories( "/usr/local/opt/openssl/include" ) + link_directories( "/usr/local/opt/openssl/lib" ) +endif() add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} From 37060621e0f3f3a3a2f095224e552753c7594e13 Mon Sep 17 00:00:00 2001 From: matken11235 Date: Wed, 30 Jan 2019 13:57:02 +0900 Subject: [PATCH 2/3] Fix CMakeLists.txt --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f9df2eb0..ff923dfd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,16 @@ link_directories( "/usr/local/lib" ) if(${APPLE}) include_directories( "/usr/local/opt/openssl/include" ) link_directories( "/usr/local/opt/openssl/lib" ) + execute_process( + COMMAND bash -c "sw_vers | head -n 2 | tail -n 1 | cut -f 2 | cut -f 2 -d \".\"" + OUTPUT_VARIABLE OSX_VERSION + ) + if(NOT ${OSX_VERSION} EQUAL 14) + message(STATUS "Set to homebrew's llvm") + set(CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang++") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/local/opt/llvm/include") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/opt/llvm/lib") + endif() endif() add_executable(${PROJECT_NAME} main.cpp) From e68e03825a9f66bcb1fdaeb9e876ed777b7d1a1b Mon Sep 17 00:00:00 2001 From: matken11235 Date: Wed, 30 Jan 2019 13:57:49 +0900 Subject: [PATCH 3/3] Fix .travis.yml --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45b41640e..ee8b772c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,11 +20,7 @@ before_install: - brew update - brew upgrade boost; return 0 install: - - brew install llvm - - export CXX=/usr/local/opt/llvm/bin/clang++ - - export LDFLAGS="-L/usr/local/opt/llvm/lib" - - export CPPFLAGS="-I/usr/local/opt/llvm/include" - - brew install yaml-cpp + - brew install llvm yaml-cpp script: - mkdir build - cd build