Move to another optparse fork
This commit is contained in:
parent
27540745fe
commit
536b4f44ac
|
@ -18,7 +18,6 @@ if (NOT mstch_FOUND)
|
||||||
GIT_SUBMODULES "NONE\ COMMAND\ true\ ERROR_QUIET"
|
GIT_SUBMODULES "NONE\ COMMAND\ true\ ERROR_QUIET"
|
||||||
CMAKE_ARGS -DWITH_UNIT_TESTS=NO
|
CMAKE_ARGS -DWITH_UNIT_TESTS=NO
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
EXCLUDE_FROM_ALL 1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(mstch::mstch IMPORTED STATIC GLOBAL)
|
add_library(mstch::mstch IMPORTED STATIC GLOBAL)
|
||||||
|
@ -30,17 +29,13 @@ if (NOT mstch_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(ext-optparse
|
ExternalProject_Add(ext-optparse
|
||||||
GIT_REPOSITORY https://github.com/weisslj/cpp-optparse
|
GIT_REPOSITORY https://github.com/myint/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"
|
CONFIGURE_COMMAND ""
|
||||||
|
BUILD_COMMAND ""
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
EXCLUDE_FROM_ALL 1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(cpp-optparse IMPORTED STATIC GLOBAL)
|
ExternalProject_Get_Property(ext-optparse source_dir)
|
||||||
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}")
|
|
||||||
include_directories(${source_dir})
|
include_directories(${source_dir})
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
|
@ -54,6 +49,7 @@ set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
add_dependencies(Lexesis ext-optparse)
|
||||||
|
|
||||||
install(DIRECTORY templates
|
install(DIRECTORY templates
|
||||||
DESTINATION share/Lexesis
|
DESTINATION share/Lexesis
|
||||||
|
|
|
@ -15,7 +15,7 @@ add_executable(Lexesis
|
||||||
inputparser.cpp
|
inputparser.cpp
|
||||||
template.cpp
|
template.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(Lexesis Lexesis-backends mstch::mstch cpp-optparse)
|
target_link_libraries(Lexesis Lexesis-backends mstch::mstch)
|
||||||
|
|
||||||
install(TARGETS Lexesis
|
install(TARGETS Lexesis
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "Lexesis/backends/cpp.h"
|
#include "Lexesis/backends/cpp.h"
|
||||||
#include "Lexesis/driver.h"
|
#include "Lexesis/driver.h"
|
||||||
|
|
||||||
#include "OptionParser.h"
|
#include "optparse.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
Loading…
Reference in New Issue