Move to another optparse fork

This commit is contained in:
Robin Jadoul 2016-05-28 15:29:34 +02:00
parent 27540745fe
commit 536b4f44ac
3 changed files with 7 additions and 11 deletions

View File

@ -18,7 +18,6 @@ if (NOT mstch_FOUND)
GIT_SUBMODULES "NONE\ COMMAND\ true\ ERROR_QUIET"
CMAKE_ARGS -DWITH_UNIT_TESTS=NO
INSTALL_COMMAND ""
EXCLUDE_FROM_ALL 1
)
add_library(mstch::mstch IMPORTED STATIC GLOBAL)
@ -30,17 +29,13 @@ if (NOT mstch_FOUND)
endif()
ExternalProject_Add(ext-optparse
GIT_REPOSITORY https://github.com/weisslj/cpp-optparse
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/OptParse.cmakelists" "${CMAKE_CURRENT_BINARY_DIR}/ext-optparse-prefix/src/ext-optparse/CMakeLists.txt"
GIT_REPOSITORY https://github.com/myint/optparse
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
EXCLUDE_FROM_ALL 1
)
add_library(cpp-optparse IMPORTED STATIC GLOBAL)
add_dependencies(cpp-optparse ext-optparse)
ExternalProject_Get_Property(ext-optparse source_dir binary_dir)
set_target_properties(cpp-optparse PROPERTIES "IMPORTED_LOCATION" "${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}cpp-optparse${CMAKE_STATIC_LIBRARY_SUFFIX}")
ExternalProject_Get_Property(ext-optparse source_dir)
include_directories(${source_dir})
##########################################
@ -54,6 +49,7 @@ set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}")
include_directories(include)
add_subdirectory(src)
add_dependencies(Lexesis ext-optparse)
install(DIRECTORY templates
DESTINATION share/Lexesis

View File

@ -15,7 +15,7 @@ add_executable(Lexesis
inputparser.cpp
template.cpp
)
target_link_libraries(Lexesis Lexesis-backends mstch::mstch cpp-optparse)
target_link_libraries(Lexesis Lexesis-backends mstch::mstch)
install(TARGETS Lexesis
RUNTIME DESTINATION bin

View File

@ -2,7 +2,7 @@
#include "Lexesis/backends/cpp.h"
#include "Lexesis/driver.h"
#include "OptionParser.h"
#include "optparse.h"
#include <fstream>
#include <iostream>