Commit bbdaf9ef authored by Ole Christian Eidheim's avatar Ole Christian Eidheim
Browse files

Do not run add_compile_options when libclangmm is a sub-project

parent 0e017948
Pipeline #160567935 passed with stage
in 2 minutes and 44 seconds
......@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.8)
project(clangmm)
add_compile_options(-std=c++11 -Wall -Wextra)
if(APPLE)
set(CMAKE_MACOSX_RPATH 1)
endif()
......@@ -15,14 +13,15 @@ endif()
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
find_package(LibClang REQUIRED)
add_subdirectory(src)
option(BUILD_TESTING OFF)
if(${NOT_SUB_PROJECT})
add_compile_options(-std=c++11 -Wall -Wextra)
set(BUILD_TESTING ON)
endif()
add_subdirectory(src)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
......
......@@ -15,7 +15,6 @@ add_library(clangmm
utility.cpp
)
include_directories(${LIBCLANG_INCLUDE_DIRS})
target_link_libraries(clangmm ${LIBCLANG_LIBRARIES})
target_include_directories(clangmm PUBLIC ${LIBCLANG_INCLUDE_DIRS} .)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment